claudraband has one user model:
- prompt new work
- continue a saved session by passing
--session <id> - send input without waiting
- watch a session's event stream
- interrupt an in-progress turn
- inspect or close tracked sessions
Live sessions live in ~/.claudraband/. Existing live sessions route through that registry automatically. Historical transcripts can still be resumed or inspected when the command needs them, but sessions only lists live entries.
claudraband runs against bundled Claude Code @anthropic-ai/claude-code@2.1.96 by default. For advanced override cases, set CLAUDRABAND_CLAUDE_PATH.
The package also installs cband as a shorthand alias for the same CLI.
Start a new session and send a prompt. This is shorthand for cband prompt.
Send a prompt and wait for Claude to finish its turn.
- Without
--session, a new session is created. - With
--session <id>, the saved session is auto-resumed. If the id has no saved transcript, the command errors withsession not found. - With
--select <choice>, answers a pendingAskUserQuestionor permission prompt, then returns the turn that follows. If the selected option accepts free text, pass it as the trailing prompt argument. --selectuses Claude's raw option numbers. For example, the bypass-permissions warning is accepted with--select 2.- New sessions can stop immediately on a startup permission prompt. When that happens,
cbandprints the new session id and waits for a follow-up--selectcommand unless you opt into--auto-accept-startup-prompts.
Examples:
cband prompt "review the staged diff"
cband prompt --session abc-123 "keep going"
cband prompt --session abc-123 --select 2
cband prompt --session abc-123 --select 3 "xyz"
cband prompt --session abc-123 --select 3 "new direction"Send input without waiting for a turn to complete. Returns as soon as the input is delivered. Use watch, status, or last to observe the response.
--session <id>auto-resumes the saved session (errors if missing).--select <choice>fires a pending-answer selection. If the selected option accepts free text, pass it as the trailing argument.--selectuses Claude's raw option numbers.
Examples:
cband send --session abc-123 "quick note"
cband send --session abc-123 --select 2
cband send --session abc-123 --select 3 "new direction"Stream events from a session. When a daemon owns the session this connects to the SSE stream; otherwise it replays the local transcript and, if the local session is still live, continues following new events. One event per line as JSON by default.
For daemon-backed sessions, watch is mainly the streaming companion to send. prompt already waits for the turn and prints the completed assistant response directly.
--prettyrenders events as human-readable text.--no-followexits after the next liveturn_endwhen the session is still running; otherwise it exits after replaying the transcript.
Cancel the in-progress turn on a live session (equivalent to sending Ctrl-C inside Claude).
Show status and metadata for a session, including whether a turn is in progress and whether input is pending.
--jsonemits the same payload the daemon returns.
Positional form cband status <session-id> is also accepted.
Print the last complete assistant turn from a session's transcript. Exits with status 1 if no completed turn is available.
--jsonemits{ sessionId, cwd, text }as JSON.
Positional form cband last <session-id> is also accepted.
Open a simple REPL against a live session.
This does not reattach the original terminal UI. It just gives you an interactive way to keep talking to an already-live session, which is especially useful for daemon-hosted sessions. It does not restart dead sessions.
List live tracked sessions from ~/.claudraband/.
Use --cwd <dir> to filter by working directory.
Close one live tracked session.
Close all live tracked sessions for one working directory.
Close every live tracked session.
Run the persistent daemon for headless sessions.
The daemon defaults to tmux. xterm is still available, but it is currently experimental.
For the raw HTTP reference, see docs/daemon-api.md.
Use --connect <host:port> with prompt or send when you want to create a new session on a running daemon:
cband --connect localhost:7842 "start a headless refactor"Run claudraband as an ACP server over stdio.
| Flag | Description |
|---|---|
-h, --help |
Show contextual help for the current command |
--session <id> |
Resume (prompt, send) or target (watch, interrupt, status, last) a session |
--cwd <dir> |
Working directory for new sessions, or filter for sessions |
--model <model> |
haiku, sonnet, or opus |
--permission-mode <mode> |
Claude permission mode |
--auto-accept-startup-prompts |
Auto-accept startup-native prompts like trust-folder or bypass-permissions warnings |
--backend <backend> |
auto, tmux, or xterm |
-c, --claude <flags> |
Advanced Claude CLI passthrough flags |
--json |
Emit JSON for status, last, watch |
--debug |
Show debug logging |
| Flag | Description |
|---|---|
--session <id> |
Resume the saved session with this id |
--select <choice> |
Answer a pending question or permission prompt. If that option expects text, pass it as the trailing argument. Uses Claude's raw option number and requires --session. |
--auto-accept-startup-prompts |
Auto-accept startup-native prompts instead of leaving the session blocked for a later --select |
--connect <host:port> |
Route the session through a running daemon. Valid for new sessions. |
| Flag | Description |
|---|---|
--session <id> |
Target session (required) |
--pretty |
Human-readable output instead of JSON lines |
--no-follow |
Exit after the next turn_end |
| Flag | Description |
|---|---|
--session <id> |
Target session |
--cwd <dir> |
Disambiguate if the id matches multiple cwds |
--json |
Emit JSON payload |
| Flag | Description |
|---|---|
--cwd <dir> |
Filter the session list by working directory |
| Flag | Description |
|---|---|
--cwd <dir> |
Close all live sessions for one working directory |
--all |
Close every live tracked session |
| Flag | Description |
|---|---|
--host <addr> |
Host to listen on. Default: 127.0.0.1 |
--port <n> |
Port to listen on. Default: 7842 |
| Backend | Behavior |
|---|---|
auto |
Prefer tmux, then fall back to headless xterm |
tmux |
Run Claude Code inside a shared local tmux session |
xterm |
Run Claude Code in a headless PTY-backed terminal. Experimental. |
| Mode | Description |
|---|---|
default |
Ask before tool use |
plan |
Plan-only mode; no edits |
auto |
Bypass permission checks |
acceptEdits |
Auto-accept file edits |
dontAsk |
Skip all confirmations |
bypassPermissions |
Dangerous full bypass |
tmuxis the first-class backend for both local sessions and the daemon.xtermis experimental, both locally and underserve, while the backend continues to improve.attachand--selectrequire a live tracked session.prompt --selectwaits for the turn that follows the selection.send --selectis fire-and-forget.