claude-pool can run as a Unix-socket daemon so non-Python programs can send
one JSON request per line and read one JSON response per line.
doctor checks the Claude Code binary, runs claude --version, and makes one
real test request.
claude-pool doctor
claude-pool doctor --claude-bin /path/to/claude --timeout 60Start one daemon for one profile:
claude-pool serve \
--socket /tmp/claude-pool-default.sock \
--warm 1 \
--max-workers 4Use the TUI backend when you need to avoid Claude Code print mode:
claude-pool serve \
--backend tui \
--socket /tmp/claude-pool-tui.sock \
--warm 1The default socket is $XDG_RUNTIME_DIR/claude-pool.sock when
XDG_RUNTIME_DIR is set, otherwise /tmp/claude-pool-$(id -u).sock.
Send one prompt through the daemon:
claude-pool ask "Reply with exactly: OK" --socket /tmp/claude-pool-default.sock
claude-pool ask "This may take longer" --timeout 120 --socket /tmp/claude-pool-default.sockask prints result text to stdout. It exits 1 for daemon errors, timeouts, and
Claude result messages with is_error: true.
claude-pool status --socket /tmp/claude-pool-default.sockStatus prints warm worker count, in-flight request count, daemon pid, and a small profile summary.
Run one daemon per profile and give each daemon a distinct socket:
claude-pool serve \
--socket /tmp/claude-pool-sonnet.sock \
--model sonnet \
--warm 2
claude-pool serve \
--socket /tmp/claude-pool-opus.sock \
--model opus \
--warm 1
claude-pool ask "Use the sonnet profile" --socket /tmp/claude-pool-sonnet.sock
claude-pool ask "Use the opus profile" --socket /tmp/claude-pool-opus.sockSave as ~/.config/systemd/user/claude-pool.service and adjust paths:
[Unit]
Description=claude-pool default profile
[Service]
ExecStart=%h/.local/bin/claude-pool serve --socket %t/claude-pool.sock --warm 1
Restart=on-failure
[Install]
WantedBy=default.targetThen run:
systemctl --user daemon-reload
systemctl --user enable --now claude-pool.service
claude-pool status --socket "$XDG_RUNTIME_DIR/claude-pool.sock"