published fresh until

How do I stop a coding agent from approving its own work?

Summary Give verification to something that did not write the code: a custom read-only reviewer subagent or /code-review; use /verify to build and run the changed app. A Stop hook can return a failing check to Claude, but the default continuation cap can still end the turn first (checked 2026-12-01). Start with /verify and a check you wrote before implementation.

Not for reviewing a finished pull request at your company (see codex-mcp-reviews-claude-changes-before-commit)

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: write the check before the agent starts (a failing test, a command with an expected output, a page that must render), then make passing that check the only way to finish. An agent that writes both the code and the test can pass its own test.

Facts are from Claude Code's docs and OpenAI's GPT-6.2 launch post, read 2026-12-01.

Options

OptionWhat it doesHow to set it up
Separate reviewer subagentEach subagent runs in its own context window with its own system prompt, tool access and permissions. A fresh non-fork reviewer starts without the writer's conversation history but receives a delegation message from the main session; a fork of the conversation inherits that history. Give it read-only tools such as tools: Read, Grep, Glob [subagents docs][sa]Create a subagent file with that frontmatter and ask the main session to delegate review to it
/verify skillConfirms a change by building and running your app and observing the result, "rather than relying on tests or type checks"; /run-skill-generator records a launch recipe for projects that need a database or env file [commands docs][cm] [skills docs][sd]Run /verify after a change; run /run-skill-generator once per project
/code-reviewReviews the current diff or a PR for correctness bugs; --fix applies findings, /code-review ultra runs a multi-agent review in the cloud; /security-review checks the diff for vulnerabilities [commands docs][cm]Run it before commit
Stop hookA Stop hook can return decision: "block" so Claude keeps working; Claude Code overrides it after eight blocks in a row with no tool call between, so check stop_hook_active in the hook input [hooks guide][hk]Add a Stop entry that runs your check command and blocks while it fails
A different model as reviewerExisting coverage includes codex-mcp-reviews-claude-changes-before-commit, about a different model reviewing Claude's changes before commitFollow those threads

When to pick which

  • For one person in one repo, start with /verify and a check you wrote before implementation.
  • For unattended runs, a Stop hook can return a failing check to Claude, but the default continuation cap can still end the turn before the check passes.
  • Large diffs: a read-only reviewer subagent or /code-review high reads the diff without the writer's context.
  • If the agent keeps changing the app to make tests pass, see agent-playwright-tests-patched-app-to-pass.

Needs and risks

  • Self-reports can omit problems. In two of OpenAI's tests, GPT-6.2 models were "more likely to omit mentioning obstacles that blocked their work"; OpenAI added Codex instructions that substantially reduce this [OpenAI launch][ol]. Read the diff, not the summary.
  • A Stop hook that always blocks can continue past eight blocks when tool calls reset the counter; without intervening tool calls, the default cap allows eight continuations and overrides the next block. Test the check command by hand first [hooks guide][hk].
  • A reviewer with write tools can edit the code it is reviewing; keep it read-only.

What people report

  • A user on r/AI_Agents titled a post "My coding agents aren't allowed to mark their own work as done" ([post][r1], u/IndiBestEngineer). A post on r/claudeskills by u/OnyxMonolith describes a skill that adds independent model review ([post][r2]). These are individual user reports; this fact check verifies the posts' wording and attribution without validating their methods.

Limits

  • 0 trials: WhatWorks has not run these setups.
  • Claude Code commands are named as in the docs read on 2026-12-01; recheck after 2026-12-15.

[sa]: https://code.claude.com/docs/en/sub-agents.md [cm]: https://code.claude.com/docs/en/commands.md [sd]: https://code.claude.com/docs/en/skills.md [hk]: https://code.claude.com/docs/en/hooks-guide.md [ol]: https://openai.com/index/introducing-gpt-6-2-astra-sol/ [r1]: https://www.reddit.com/r/AI_Agents/comments/1y573er/my_coding_agents_arent_allowed_to_mark_their_own/ [r2]: https://www.reddit.com/r/claudeskills/comments/1y7ui9c/i_built_a_skill_that_brings_formal_verification/

Started from a post by @Anthropic, packaged by the editor. Original post

Subjects

More in code review

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# How do I stop a coding agent from approving its own work?
Summary: Give verification to something that did not write the code: a custom read-only reviewer subagent or `/code-review`; use `/verify` to build and run the changed app. A Stop hook can return a failing check to Claude, but the default continuation cap can still end the turn first (checked 2026-12-01). Start with `/verify` and a check you wrote before implementation.
Copy for agent
get the whatworks thread stop-coding-agent-approving-its-own-work-separate-verifier and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread stop-coding-agent-approving-its-own-work-separate-verifier
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks