/goalKeep going until the
condition is actually met.
A per-turn condition check built into Claude Code's CLI. You write the completion criterion; a separate small fast model reads each turn and decides whether you're done — closing the gap between “Claude says it's finished” and “the tests actually pass.”
A second model, judging from the transcript.
A normal prompt stops when Claude judges its own work done. /goaladds a fresh judge after every turn, so completion isn't decided by the model with skin in the game.
The loop, simulated.
Pick a scenario, set the goal, and watch each turn get judged by Haiku. The status overlay tracks elapsed time, turns, and tokens — exactly as the real overlay does.
Status overlay
Try a goal
Forward motion to a verifiable state.
Mechanical, long-horizon, verifiable
- Migrating a module to a new API until every call site compiles and tests pass.
- Splitting a large file into focused modules until each is under a size budget.
- Working through a labeled issue backlog until the queue is empty.
- Implementing a design doc until all acceptance criteria hold.
- Backfilling docs, changelogs, or test coverage to a measurable target.
Vague quality goals
- "The code is clean and idiomatic." — no objective signal in the transcript.
- "The architecture is well-designed." — Haiku can't judge taste.
- Anything where Claude could fool the judge by summarising rather than showing.
- Open-ended exploration — you want plan mode, not goal mode.
- Production deploys with no spend cap and no human in the loop.
One layer in a larger control plane.
/goal is the missing per-turn check. Compose it with auto mode for fully unattended runs; reach for the others when you need scheduling, isolation, or rubrics.
| Feature | What starts the next turn | What stops the loop | Scope |
|---|---|---|---|
| /goal | Previous turn finishes | Haiku confirms condition met (or /goal clear) | Per-turn |
| /loop | A time interval elapses | You stop it, self-declared done, or 7-day expiry | Schedule |
| Stop hook | Previous turn finishes | Your script decides | Settings file |
| Auto mode | Tool call requested | Claude judges work done | Within a turn |
| Routines / Desktop tasks | A cron schedule | Each invocation is one-shot | Schedule |
| Cowork | User prompt | User stops; runs in isolated VM | Desktop session |
| Managed Agents Outcomes | Managed-agent session start | Rubric-based grader returns satisfied | Per-agent |
The pattern is older than the command.
Anthropic productised something the community had bolted on for the better part of a year. The novelty is the chrome — first-class slash command, status overlay, headless support — not the loop itself.
jthack/claude-goal and chrischabot/claude-code-goal ship as Claude Agent skills with pause/resume and token caps./goal — durable runtime state, pause/resume across process restarts./goal is not announced.fdfbc06 by ashwin-ant. One-line changelog, no blog post.What it doesn't do — yet.
The feature is days old. Treat the first week as a public beta, even though it isn't labelled as one.
No native spend cap
Misjudged conditions can run for hours. Bound it in the condition ("…or stop after 20 turns") or rely on plan-level rate limits.
Evaluator can be fooled
Haiku reads text only. If Claude summarises results instead of showing exit codes, the judge may green-light an unmet goal.
Trust dialog required
Built on the hooks system. If your enterprise policy sets disableAllHooks, /goal tells you why instead of silently no-op'ing.
One goal per session
Setting a new one replaces the old. No native parallel goals; subagent-with-verifier fanout is manual orchestration.
Resume resets counters
Condition survives --resume and --continue. Elapsed time, turn count, and token baseline all restart at zero.
Bedrock / Vertex / Foundry
Evaluator runs on your configured provider. Tokens billed there. Anthropic notes the cost is typically negligible — but not free.
Start small. Bound the loop. Always.
Try it first on a goal you know has two or three small failures — calibrate how Haiku reads your conditions before you trust it overnight. Pair with auto mode only inside a worktree, and always include a bounding clause until your phrasing is dialed in.
or stop after 15 turns