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 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.
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.
/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 |
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.The feature is days old. Treat the first week as a public beta, even though it isn't labelled as one.
Misjudged conditions can run for hours. Bound it in the condition ("…or stop after 20 turns") or rely on plan-level rate limits.
Haiku reads text only. If Claude summarises results instead of showing exit codes, the judge may green-light an unmet goal.
Built on the hooks system. If your enterprise policy sets disableAllHooks, /goal tells you why instead of silently no-op'ing.
Setting a new one replaces the old. No native parallel goals; subagent-with-verifier fanout is manual orchestration.
Condition survives --resume and --continue. Elapsed time, turn count, and token baseline all restart at zero.
Evaluator runs on your configured provider. Tokens billed there. Anthropic notes the cost is typically negligible — but not free.
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.