Deterministic budgets
--budget N enforces a hard token ceiling across worker + subagent turns. The hook math is plain SQLite — no model in the loop deciding when to stop.
claude-goal drives the Claude Code agent through an autonomous loop until a goal is provably met. You set an objective; the plugin self-iterates each turn through a Stop-hook continuation; a tool-equipped evaluator subagent checks completion — not by trusting the worker’s self-narrative, but by running tests, reading files, and checking exit codes.
It’s the production-grade companion to Claude Code 2.1.139+‘s built-in /goal — adding deterministic budgets, lifecycle controls, /compact recovery, persistence across restarts, and a real verifier.
/plugin marketplace add nuko-nova-dynamics/claude-marketplace/plugin install claude-goal@nuko-nova-toolsgit clone https://github.com/nuko-nova-dynamics/claude-goal.gitcd claude-goal(cd mcp/goal-server && npm ci && npm run build)claude --plugin-dir "$PWD"mkdir -p ~/.claude/plugins/local/claude-goaltar -xzf claude-goal-v0.1.1.tar.gz \ -C ~/.claude/plugins/local/claude-goalclaude --plugin-dir ~/.claude/plugins/local/claude-goalDeterministic budgets
--budget N enforces a hard token ceiling across worker + subagent turns. The hook math is plain SQLite — no model in the loop deciding when to stop.
Tool-equipped evaluator
The completion check runs as a fresh-context subagent with Bash, Read, and sqlite3. It verifies with evidence, not optimistic transcript language.
Lifecycle controls
Pause, resume, abandon, extend. Caps for turns and wall-clock. All persisted in SQLite — survives claude restart and --resume.
`/compact` recovery
When Claude Code rewrites the transcript, the goal flips to accounting_uncertain. /goal-reconcile --accept-reset advances cleanly. No silent token drift.
Independent verifier
Worker self-audit AND evaluator. Distinct completion events (goal_completed_by_evaluator vs goal_completed_by_self_update) so post-hoc audit can tell them apart.
Plays well with native `/goal`
Compatible with Claude Code 2.1.139+‘s built-in /goal. The two coexist — use the native one for casual conditions, this one when budgets and persistence matter.
/goal-start "list every .ts file under src/ and print a line count for each"Claude confirms the goal, begins working, and the Stop hook feeds it a continuation prompt at the end of each turn. When the objective is met, it dispatches the evaluator subagent for verification, then calls update_goal and stops.
For a budget-bounded run — note that real autonomous goals run for hours and millions of tokens, so budgets are sized in millions:
/goal-start "refactor the auth module to use async/await" --budget 3000000When (tokens_used + subagent_tokens) >= 3000000, the hook transitions the goal to budget_limited and emits a one-shot budget-limit prompt. See Budgets and caps for how to size a budget for the shape of your goal.