No runnable check? You become Claude Code's verification loop

Four ranked skills from Anthropic's Claude Code docs: verification, plan mode, context hygiene, CLAUDE.md.

No runnable check? You become Claude Code's verification loop
Share

The fastest way to make Claude Code shippable isn't a cleverer prompt — it's naming the check that decides when the work is actually done. In 2026, Anthropic ranks that discipline first, and everything else follows from it.

What Anthropic's ranking prescribes for Claude Code interaction in 2026

Screenshot of https://claude.com/blog/steering-claude-code-skills-hooks-rules-subagents-and-more

Anthropic places verification at the top of its Claude Code best-practices ranking because, without a runnable check, "looks done" is the only signal available — and you become the verification loop . As the official guide puts it:

"Claude stops when the work looks done. Without a check it can run, 'looks done' is the only signal available, and you become the verification loop." — Anthropic, Claude Code best practices (source: code.claude.com/docs)

July 2026 primitives make that check concrete rather than aspirational. A Stop hook blocks a turn from ending until a script passes, with an 8-consecutive-block override as a safety valve; a /goal condition is re-checked by a separate evaluator after every turn; and auto permission mode routes routine, reversible commands through without gating destructive ones .

Anthropic's June 18, 2026 steering post widens the frame, naming seven instruction mechanisms — CLAUDE.md files, rules, skills, subagents, hooks, output styles, and system-prompt append — each with different persistence and enforcement guarantees; hooks are deterministic, while CLAUDE.md is advisory . The through-line is a shift in the human role: build the rails — exit conditions, plan gates, CLAUDE.md hygiene — then let the agent run, instead of watching every keystroke.

How to apply Claude Code's ranked interaction disciplines

How to apply Claude Code's ranked interaction disciplines (source: cdn.prod.website-files.com)

Applying the ranking means turning each discipline into a concrete keystroke, command, or config entry. Start with verification, then plan gating, then front-loaded prompts, then context hygiene — the same order Anthropic weights in its best-practices guide . The table below maps each discipline to the mechanism that enforces it; the paragraphs that follow give the copy-paste path.

DisciplineTrigger / mechanismWhen to skip
1. VerificationName the check per request; Stop hook in .claude/settings.jsonNever — always name a check
2. Plan modeShift+Tab to enter, Ctrl+G to open plan in editorSingle-sentence diffs
3. Rich first turnObjective, scope, non-goals, @ files, definition of doneTrivial follow-ups
4. Context hygiene/clear, /compact, /btwSame-task continuation

Discipline 1 — verification. Every coding request should name the check to run and the acceptable output. The canonical template is: "write the failing test, implement, run the focused test, then run typecheck." To enforce this without a human watching, wire a Stop hook in .claude/settings.json that blocks the turn from completing until your script passes; Claude Code overrides the hook only after 8 consecutive blocks . Because hooks are deterministic and CLAUDE.md is advisory, the hook — not a written instruction — is what guarantees the check actually runs .

Discipline 2 — plan mode. Press Shift+Tab to enter plan mode, then Ctrl+G to open the plan in your editor and review it before Claude proceeds; switch out of plan mode to implement and verify against the plan . A good plan names files, interfaces, edge cases, tests, and rollback risks. Skip it for single-sentence diffs — typo fixes, log lines, single-file renames. Anthropic is explicit that plan-mode overhead is non-trivial: "If you could describe the diff in one sentence, skip the plan" .

Discipline 3 — rich first-turn prompts. Put intent, constraints, and acceptance criteria in turn one; progressive ambiguity across many turns costs tokens and sometimes quality . Include objective, scope, non-goals, file locations via @, definition of done, and the verification command. For a larger job, use the AskUserQuestion "let Claude interview you" pattern to produce a self-contained SPEC.md, then start a fresh implementation session from it .

Discipline 4 — context hygiene. Run /clear between unrelated tasks, and /compact "Focus on the API changes" to preserve what matters while shedding the rest. The fix for correcting over and over: after two failed corrections, /clear and write a better initial request rather than patching a decayed thread. Use /btw for side questions that should not pollute history . These habits compound — the July 2026 changelog even added per-session caps of 200 WebSearch calls and 200 subagent spawns in version 2.1.212 , a reminder that context and tool budgets are finite resources worth guarding.

What stalls unattended Claude Code: CLAUDE.md bloat and interaction decay

What stalls unattended Claude Code: CLAUDE.md bloat and interaction decay

Unattended runs stall for two structural reasons, and both are context problems. The first is a bloated CLAUDE.md. Anthropic states the failure mode plainly:

"Bloated CLAUDE.md files cause Claude to ignore your actual instructions." — Anthropic, Claude Code best practices (source: code.claude.com/docs)

The root CLAUDE.md loads on every session at full context cost, so the June 18, 2026 steering post sets a hard budget: keep it under 200 lines. Move path-specific constraints into rules files and multi-step procedures into skills, so the always-loaded file stays lean.

The second stall is interaction decay. Mixing unrelated tasks in one thread — the "kitchen-sink session" Anthropic names explicitly — degrades performance as the window fills, and the fix is /clear between unrelated work. The same logic governs corrections: after two failed patches, resist reworking the decayed conversation. Every correction compounds context debt, so /clear and write a better initial request from scratch.

The deeper distinction is advisory versus deterministic. CLAUDE.md is advisory — Claude reads it and applies discretion. A Stop hook, configured in .claude/settings.json, is deterministic: Claude cannot end a turn until the hook script passes. For anything that must happen every time, CLAUDE.md advises; hooks guarantee.

What comes after mastery: subagents and Claude Code in CI

Once verification, planning, prompting, context hygiene, and permissions are habitual, subagents and non-interactive runs are the next layer. A subagent runs in its own isolated context window and returns only a summary plus metadata, so deep search, dependency audits, security review, and adversarial diff review happen without polluting the main thread [1]. The bundled /code-review skill uses this directly: it reviews the current diff in a fresh subagent that isn't biased toward code it just wrote [1].

Guardrails arrived in July 2026. Version 2.1.212 added default per-session hard caps of 200 subagent spawns and 200 WebSearch calls [8], which prevent runaway token use in unattended background scenarios. For horizontal scaling, claude -p drives CI pipelines and pre-commit hooks non-interactively, and /batch fans migrations out to many worktree agents in isolated git checkouts [1][3].

One caution: a reviewer prompted to find gaps always finds some, which drives over-engineering. Constrain it — instruct the subagent to "flag only gaps that affect correctness or the stated requirements" [1]. The takeaway across all seven disciplines is one shift: build the rails — a runnable check, a lean CLAUDE.md, a deterministic hook — then let the agent run against them, and reserve your attention for reviewing evidence rather than typing.

Frequently asked questions

What counts as a runnable exit condition in Claude Code?

A runnable exit condition is any check Claude can execute on its own and read as a binary pass or fail — a focused test suite, a build exit code, a linter, a fixture diff, or a screenshot comparison against a design for UI work . The point is that no human has to interpret output. A Stop hook makes this concrete: it blocks the turn from ending until the check script returns a passing exit code, and Claude Code only overrides after 8 consecutive blocks .

When should I skip plan mode in Claude Code?

Skip plan mode when you could describe the diff in one sentence — a typo fix, a log line, or a single-file rename. Anthropic states this directly and warns that plan mode adds non-trivial overhead for simple changes . Reserve the Explore → Plan → Implement → Commit workflow for multi-file work or unfamiliar codebases, where separating research from execution avoids solving the wrong problem.

How long should a root CLAUDE.md file be?

Keep the root CLAUDE.md under 200 lines. Anthropic's June 18, 2026 steering guidance notes that the root file loads every session and carries high context cost, so bloat causes Claude to start ignoring your actual instructions . Move path-specific constraints into rules files and procedures into skills, and prune ruthlessly rather than accumulate.

What is the difference between CLAUDE.md and a Stop hook?

CLAUDE.md is advisory: Claude reads it and interprets it with discretion, so guidance can be weighed against other context. A Stop hook, configured in .claude/settings.json, is deterministic: Claude cannot end a turn until the hook script returns a passing exit code, guaranteeing the action happens . The 8-consecutive-block override is the only safety valve when a hook keeps failing .

When do subagents help versus hurt in Claude Code?

Subagents help when isolation matters — deep research, dependency and security audits, and adversarial review of a diff — because they run in their own context window and return only a summary, keeping the main thread clean . They hurt on complex multi-file tasks where review overhead outweighs the isolation benefit; experienced users report excess token burn in these cases . Scope them narrowly and instruct the reviewer to flag only gaps that affect correctness or the stated requirements.

Enjoyed this article? Subscribe to get new stories by email whenever they're published.

Subscribe