Command reference
Every command lives under the /goal-* namespace.
Lifecycle
Section titled “Lifecycle”/goal-start
Section titled “/goal-start”/goal-start "<objective>" [--budget quick|standard|deep|overnight|auto|N]Start a new autonomous goal. Replaces any prior complete or abandoned goal for this session. Fails if an active, paused, blocked, or budget_limited goal already exists — abandon it first.
<objective>— quoted. Concrete, achievable objectives work best. Auto-mode’s classifier may block vague objectives like"do the task".--budget quick|standard|deep|overnight— optional. Selects a full run envelope: token budget, continuation cap, and wall-clock cap.--budget auto— optional. Deterministically picks a profile from the objective. Explicit overnight/weekend wording selectsovernight; broad migrations, redesigns, integrations, or repo-wide work selectdeep; bounded features and bug fixes with tests selectstandard; small inspection-style work falls back toquick.--budget N— optional advanced form. Sets a raw hard cap on(tokens_used + subagent_tokens)and leaves turn/wall-clock at the practical-unlimited defaults.- Omit
--budgetfor practical-unlimited token, turn, and wall-clock budget.
You can also start a goal with explicit natural language:
set up a goal to refactor the auth module to async/await and keep goingmake this a goal with a deep budget: migrate the billing integration and verify testsThis is intentionally explicit. Ordinary prompts like “fix this bug” do not become goals on their own. When the prose request does not include a budget, Claude calls create_goal without token_budget or budget_profile, so the goal is unbounded. Ask for quick, standard, deep, overnight, auto, or a raw token number only when you want a limiter.
/goal-status
Section titled “/goal-status”/goal-statusShow the active goal’s status, budget profile/source, token totals, continuations remaining, wall-clock used, and any warnings (e.g. accounting_uncertain after /compact).
/goal-pause · /goal-resume
Section titled “/goal-pause · /goal-resume”/goal-pause/goal-resumeUser pause/resume. While paused, the Stop hook stops emitting continuations but token accounting still runs (the model can still respond manually if you address it directly). /goal-resume also restarts a blocked goal after the blocker is resolved.
/goal-resume only works on user-paused, degraded, or blocked goals. For cap-paused goals use /goal-extend.
/goal-abandon
Section titled “/goal-abandon”/goal-abandon/goal-stop # aliasMark the goal abandoned. Permanent — the row stays in goals.db for history but the Stop hook stops driving it.
/goal-extend
Section titled “/goal-extend”/goal-extend --add-continuations N/goal-extend --add-hours N/goal-extend --add-tokens NRaise a cap or token budget and resume when the matching state is extendable.
--add-continuations N— only valid whenpaused_reason=continuation_cap. Adds N turns and resumes.--add-hours N— only valid whenpaused_reason=wall_clock_cap. Adds N hours to the wall-clock cap and resumes.--add-tokens N— valid foractiveorbudget_limitedgoals. Adds N tokens to the current budget; for unbudgeted active goals, sets the budget totokens_used + subagent_tokens + N. Resumes budget-limited goals.
All three flags require positive integers and are mutually exclusive.
Maintenance
Section titled “Maintenance”/goal-reconcile
Section titled “/goal-reconcile”/goal-reconcile --accept-resetClear the accounting_uncertain flag set after /compact or a cursor reset. Resets transcript_cursor to the current end-of-file. Resumes the goal if it was paused for accounting_error.
--accept-reset is required — the flag exists explicitly so you opt in to “yes, I know I’m losing some token accounting between the last advance and the compact event.”
/goal-doctor
Section titled “/goal-doctor”/goal-doctorPreflight self-test. Checks:
| Check | What it validates |
|---|---|
| SQLite | sqlite3 on PATH, can open goals.db, WAL mode enabled |
| MCP | claude-goal MCP server registered and responding |
| Hooks | Stop hook + PostToolBatch hook + SessionStart hook all registered |
| Shell | jq, bash, tr, cut, sed all on PATH |
| Plugin data dir | ${CLAUDE_PLUGIN_DATA} exists and is writable |
Exit 0 with a green report = ready to use. Anything red is a config issue to fix before /goal-start.
History + cleanup
Section titled “History + cleanup”/goal-history
Section titled “/goal-history”/goal-history # just this session/goal-history --all # all sessions, newest first/goal-history --format=json # machine-readable/goal-history --format=json --allReturns one row per tracked goal. Columns: status, paused reason, worker tokens, subagent tokens, time started, time elapsed, continuations remaining, budget profile, budget source, and token budget.
--format=json is the audit hook — pipe it to jq for analysis.
/goal-cleanup
Section titled “/goal-cleanup”/goal-cleanup --list # show orphans/goal-cleanup --list --older-than 1 # show orphans older than 1h
/goal-cleanup --delete # delete orphans older than 24h (default)/goal-cleanup --delete --older-than 48/clear creates a new session ID and orphans the prior goal’s row. /goal-cleanup surfaces and reaps those orphans.
The default --older-than 24 (hours) protects fresh paused goals. Pass an explicit value to override.
Exit codes
Section titled “Exit codes”All commands exit:
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | User-recoverable error (e.g. no active goal, version conflict) |
| 2 | System error (e.g. SQLite unavailable, MCP not registered) |