What to do
Keep the audit and the fix apart
Do not let your AI fix the bugs it finds in the same session. At Cloudflare, the agents that hunt bugs never check their own finds, because a hunter that grades its own homework will confidently validate everything it outputs[1].
Keep a person before the merge
Cloudflare's fixing agent cannot merge code until a human reviews the branch, because a model left to patch freely may break an unrelated feature[1].
Make the auditor read-only
In Claude Code, run the audit as a subagent with read-only tools. Claude Code then enforces the limit, not your prompt[2].
Save the report as a file
A good setup saves each audit report as a file, with no code changes in the audit[3].
Fix in a separate session
A new session reads the report later and makes the fixes[3].
Do not fix every finding
Anthropic warns that fixing every finding adds extra layers to your code and tests for cases that cannot happen[2].
The prompt
Paste this into your coding agent before it writes any code.
Audit this codebase for bugs and security problems. Report only. Don't change any code. Save the full report as a file named audit-report.md. For each finding, say where it is and why it matters.
Use it in the first session. In Claude Code, run it as a subagent with read-only tools (Read, Grep, Glob), so it cannot edit anything[2].
Read audit-report.md. Do not fix every finding. First sort them into real problems and noise. Skip extra layers and tests for cases that can't happen. Fix the real problems one at a time, and show me each change before you move on. Do not merge anything yourself.
Use it in a new session after the audit report exists. You review the branch before it merges[1]. The audit finds common problems, but it is not a complete list of checks.
Did not fit in the video
Cloudflare's design goes further than the video says. Its checking agent cannot log findings of its own, and its only job is to try hard to disprove the hunter's theory[1]. Cloudflare calls the human review before a merge its non-negotiable safeguard[1].
Cloudflare's split is between finding a bug and checking it, inside one audit. It is not the same as an audit session and a fix session. The audit-then-fix split in this post is a working routine, not an official rule: every audit prompt ends with "don't change any code", and the fix session reads the saved report later[3]. Anthropic does not tell you to split them this way. No source tests whether a combined session audits worse.
The reason to sort findings before you fix them is Anthropic's own warning. If you fix every finding a review turns up, you end up with extra abstraction layers and tests for cases that cannot happen, so the report needs triage first[2].
Cloudflare's warning about a model that patches freely is a design reason, not a measured rate[1]. No source gives a number for how many new bugs an unreviewed fix adds.