Skip to content

Agents & lifecycle

FeatureDescription
Prompt-spawnwarden start "<prompt>" — no repo or type needed. Runs claude in the caller’s directory (or --dir).
Auto-classificationThe daemon classifies a prompt-spawned agent’s type with claude -p shortly after creation (falls back to other).
Auto-generated subjectEach agent gets a one-line ≤8-word summary of what it’s doing, seeded from the prompt and refreshed by the poller from the transcript or tmux pane (throttled, change-gated).
Managed worktree spawn--type creates/adopts a git worktree where the type needs one.
Worktree adoptionIf a worktree for the ticket already exists, the spawn reattaches to it instead of erroring.
Supervised mode--supervised launches with --permission-mode acceptEdits (risky tools prompt → feed the approvals inbox) instead of the default --dangerously-skip-permissions bypass. Persisted and reused on restore.
Command / featureDescription
stopThe single umbrella teardown verb. Default = full teardown: terminate + clear (archive) record + remove worktree (asks first unless --yes). Subtractive flags: --keep-record, --keep-worktree (--keep-worktree alone == done), --hard, --pr/--base, --force, --delete-adopted-branch. Safe order: PR → terminate → clear record → remove worktree.
terminateStop an agent (kill tmux + the agent process); keeps the record and worktree. The safe, reversible “stop” default. Alias for stop --keep-record --keep-worktree.
restoreRecreate and resume a lost/orphaned agent’s session (claude --resume).
recoverSafety net for the tombstone reaper: revive an archived record whose tmux session is confirmed still alive. Bare recover only reports candidates; --apply re-inserts each one under its original id (children reconnect automatically).
doneTerminate and clear the record in one step (worktree kept). --hard purges instead of archiving. Alias for stop --keep-worktree.
deleteClear the stored record (archive by default, --hard purge). Leaves tmux + worktree alone. Alias for stop --keep-worktree (record only).
remove-worktreeRemove the git worktree + branch. Destructive — refuses while the agent runs or has uncommitted/unpushed work unless --force. Alias for stop --keep-record (worktree only).
adoptRegister an existing Claude session — resume newest-for-dir under tmux, or live-register a running tmux session.
Cascade cleanupDeleting a pipeline/agent cascades cleanup of its shared-context keys and (on hard-delete) its mailbox inbox.
StatusMeaning
spawningSession is being created
workingActively doing work
waiting_for_inputPaused on a question/notification — send it an answer
idleAlive but not currently working
rate_limitedHit a session, weekly, or monthly-spend limit — warden auto-picks “Stop and wait”, parks the agent, and auto-resumes when the limit clears (tune via rate_limit.*)
doneFinished
erroredHit an error
orphanedThe daemon lost track of its tmux session