Claude Code Goal Mode: the /goal Command for Beginners

Claude Code goal mode explained simply: set a finish line with /goal and Claude keeps working, turn after turn, until an independent checker says done.

7 min readUpdated 2026-06-12EAEvgeny ArsentyevEvgeny Arsentyev · PhD

Goal mode is the /goal command in Claude Code: you describe a completion condition once, and Claude keeps working toward it turn after turn without you prompting each step. After every turn a small fast model checks whether the condition is met — if not, Claude starts another turn; if yes, the goal clears itself.

I'm Evgeny, and this is my favorite feature to show non-programmers, because it fixes the most exhausting part of working with AI: babysitting. Normally Claude finishes a turn, declares victory, and waits for you to notice it's only half done. With /goal, a separate referee — not the model doing the work — decides when it's actually finished.

What does the /goal command actually do?

Run /goal followed by your condition, and a turn starts immediately — the condition itself is the instruction, no separate prompt needed. While it runs, a ◎ /goal active indicator shows how long it's been going. After each turn the evaluator returns a short reason why the condition is or isn't met yet, and that reason guides Claude's next turn. One goal can be active per session; setting a new one replaces the old.

Set a goal
/goal all tests in test/auth pass and the lint step is clean

Straight from the official docs, and a perfect template: a measurable end state plus a way to prove it. Claude will run, check, fix, and re-check until the referee agrees.

What does a good goal look like? (examples)

The evaluator doesn't run commands or read files itself — it only judges what Claude has surfaced in the conversation. So phrase the goal as something Claude's own output can demonstrate. A condition that survives many turns has three parts: one measurable end state (a test result, a file count, an empty queue), a stated check ("npm test exits 0"), and any constraints that must hold on the way ("no other test file is modified"). You get up to 4,000 characters — enough for real acceptance criteria. For a non-programmer site project, try: "the site builds without errors, every page has a title and description, and the contact form sends — prove each with a command — or stop after 20 turns."

The safety clause nobody mentions

A goal runs until the condition is met or you clear it — there is no built-in turn cap. The docs' own trick: write the limit into the condition, like "or stop after 20 turns". Claude reports progress against that clause and the evaluator enforces it. Cheap insurance against a very persistent robot.

How does Claude know the goal is reached?

Under the hood, /goal is a wrapper around a prompt-based Stop hook scoped to your session. Each time Claude finishes a turn, your condition plus the conversation so far go to your configured small fast model (Haiku by default), which returns a yes-or-no decision with a short reason. "No" sends Claude back to work with the reason as guidance; "yes" clears the goal and records an achieved entry. Evaluation tokens are billed on that small model and are typically negligible. Why this matters: completion is decided by a fresh model, not the one grading its own homework.

How do I check status or stop a goal?

Run /goal with no arguments to see the condition, how long it's been running, turns evaluated, token spend, and the evaluator's latest reason. To stop early, run /goal clear — stop, off, reset, none, and cancel work as aliases. If a session ends with a goal still active, resuming it with --resume or --continue restores the condition (the counters reset). And /goal works non-interactively too: claude -p "/goal CHANGELOG.md has an entry for every PR merged this week" runs the whole loop in one command.

Check in, or pull the plug
/goal

No arguments = status report. To cancel before the condition is met: /goal clear. Starting a new conversation with /clear also removes the active goal.

Goal mode vs /loop vs auto mode — what's the difference?

Three things sound similar but answer different questions. /goal starts the next turn the moment the previous one ends, and stops when a model confirms your condition. /loop re-runs on a time interval and stops when you stop it or Claude decides the work is done. Auto mode doesn't start new turns at all — it approves tool calls within a turn so Claude isn't pausing to ask permission. The docs call /goal and auto mode complementary, and that's the practical combo: auto mode removes per-tool prompts, /goal removes per-turn prompts. One requirement: /goal needs Claude Code v2.1.139 or later — run claude update if it's missing — and a workspace where you've accepted the trust dialog, since the evaluator rides on the hooks system.

Lab: your first supervised marathon

0/5

The kicker: tonight, before closing the laptop, give Claude one /goal with a verifiable finish line and a turn cap. Waking up to a completed checklist — judged by an independent referee, not by the worker's optimism — is the moment goal mode stops being a feature and becomes a habit.

#claude code#goal mode#/goal#autonomous agents#beginners
EAEvgeny Arsentyev

Author

Evgeny Arsentyev

PhD · Chief Product Officer at a healthtech company

▌ Reading is the blue pill

Want to actually build this?

Guides explain. The free course transforms — personalized, gamified, and built to get you shipping fast.

◉ Take the red pill →