Artificial intelligence · 8 min read
The approval rulelives in a file.
On 23 November Anthropic shipped an agent that approves pull requests in place of a human. The decision does not come from the model: it comes from a few lines in .claude/approvals.yml. Here is how to read that file, and the four settings that let a pull request through when nobody has read it.
TL;DR
- Claude Ship (Code Review, PR Steward, Claude Approvals) is in beta on Team and Enterprise plans: the only agent that approves is driven by a versioned YAML file, not by a prompt.
- The semantics fit in three keys:
pathsfor scope,verdictfor seat count and Claude's role,overrideto relax when review passes. When rules disagree, the strictest one wins. - Four settings produce a merge with no human read:
seats: 1(the author holds the seat),claude: approveswithout a review condition, a check that is not required, and GitHub auto-merge on top of a policy that asks for nobody.
Three agents, one decision-maker
On 23 November Anthropic announced Claude Ship, a set of three agents that take over a pull request once it opens. Code Review reads the diff alongside the surrounding files, collects findings, verifies them adversarially, ranks them by severity and comments inline; it is already generally available and offers Quick, Standard and Deep levels. PR Steward restarts failing checks, resolves conflicts, answers feedback, and comments after every push with what it changed and how to undo it; it is designed never to approve or merge.
The third one, Claude Approvals, changes what the pipeline is: it returns an approval verdict. It is a GitHub check named Claude Approvals that reports what is still missing ("Waiting on human review from any person (1/2)") and, where the policy file allows it, posts an approving review as Claude. What matters for an engineer: the decision is not the model's call. It is read from a repository file on the default branch and evaluated the same way on every pull request. It is a policy, not a judgement.
Anthropic cites its own numbers to justify the product: on the Claude Code team, where Claude writes most of the code, merged pull requests more than doubled between June and September while the share of reverted changes fell by more than 40%. Those are internal figures, not replicated; they say a well-tuned automatic review absorbs volume, not that it replaces a human decision.
Availability bounds the subject: Team and Enterprise plans, GitHub repositories, and no access for organisations on Zero Data Retention, HIPAA configuration or customer-managed keys. Code Review is GA; PR Steward and Approvals are in public beta, billed on tokens through usage credits.
Anatomy of the file that decides
The file is .claude/approvals.yml, at the repository root, and it only applies once merged into the default branch. Three levels: the document (version, mode, rules), each rule (purpose, paths, and at least one of verdict), and the verdict itself (claude and seats). The example policy from Anthropic's docs gives the skeleton:
# .claude/approvals.yml
version: 1
mode: observe
rules:
- purpose: "A change takes two people. When Claude's review passes, one is enough and Claude approves."
paths: ["**"]
verdict: { claude: comments, seats: 2 }
override:
- { if: "claude/code_review = pass", verdict: { claude: approves, seats: 1 } }
- purpose: "A change to the review rules takes two people."
paths: ["**/.claude/**"]
nested: inherit
verdict: { claude: comments, seats: 2 }
Four behaviours decide in practice. The strictest verdict wins: a file under .claude/ matches both rules, and because the second has no override, changing the policy itself needs two people. That is what stops an agent with git rights from relaxing its own constraint in the same diff.
Seats count people, not bots, but the pull request author can fill one of them. seats: 2 with an override down to 1 means, literally: nobody but the author reads the change when review passes. Defensible on test fixtures, not on a billing module.
Conditions read facts and classifiers, never CI: pr/files_changed, pr/diff_lines, pr/authors, pr/approved_by, pr/base, plus classifier answers such as claude/code_review or repo/change_risk. A condition cannot read a GitHub job, so tests stay a separate required check — otherwise you just replaced CI with an opinion.
observe mode blocks nothing but still bills. The check shows what the policy would decide, prefixed "(observe mode)", and the reviews and classifier runs it starts are charged. That is the right mode for a two-week comparison, provided you know it consumes credits.
Four settings that merge code nobody read
Anthropic's docs have a whole page titled "Merges without human review", and it is worth reading before enabling anything. The four cases, ordered by how often I expect them:
| Setting | What happens | Fix |
|---|---|---|
seats: 1 | The author holds the only seat; with seats: 0, a bot-authored pull request merges without a human reading it. | Require a non-author approver on sensitive paths, through pr/approved_by. |
claude: approves | A rule that approves starts no review of its own: Claude can approve a diff nothing examined. | Use claude: comments in the rule and approve only under if: "claude/code_review = pass". |
| Check not required | The check only blocks a merge where it is a required check in GitHub, and normally not in observe. | Observe first, then add the check to required checks, then delete mode: observe. |
| Auto-merge / merge queue | A policy that asks for nobody, combined with GitHub auto-merge, merges with no action at all. | At least one human seat on critical paths, or disable auto-merge on those branches. |
A fifth side effect is quieter and costs visibility: as soon as a policy file covers every file in a pull request, automatic Code Review runs stop unless a rule names claude/code_review — typically under advisory. You think you added a guardrail; you removed the review. Two more of the same kind: turning off usage credits does not stop an agent that is already on, it keeps billing; and a policy change only applies once merged, open pull requests keeping the old rules until their next evaluation — hence @claude approvals rerun to force one.
Writing a rule that cannot relax itself
Once those cases are known, the design trap is letting the policy become more permissive than intended through composition. Two mechanisms allow it, and two habits neutralise them.
ANY or ALL, depending on where the verdict goes. Lists in pr/authors and pr/approved_by take a quantifier. When the condition leads to a lighter verdict, use ALL: with ANY, one listed author relaxes the rule for everyone else's commits. When it leads to a stricter verdict, use ANY: with ALL, one unlisted author switches the requirement off. The docs state it plainly; it is the kind of detail you discover after a merge.
Every if needs a sibling without one. A conditional rule does not apply while its condition is false; if no other rule covers those files the check fails, which is safe. But if a neighbouring rule covers the same paths with a weak verdict, that one decides, and you have opened a hole. Rule of thumb: on a given path, exactly one unconditional rule sets the floor, and conditional rules may only harden it.
Subdirectories can ask for less. A services/billing/.claude/approvals.yml decides alone for that directory and may require less than the root; only rules marked nested: inherit survive the hop. If your root holds security rules, mark them nested: inherit, or a team adds a local file and silently removes them.
Version the policy like code, with a regression test. The file is refused for an unknown key, an unquoted ! item or YAML anchors: keep it minimal, and read the diff of any pull request touching **/.claude/**. That is exactly why Anthropic's example demands two people on those paths, with no override.
Rollout checklist
- One repository, one agent. Enable Code Review, then PR Steward in manual start (
@claude steward), then Approvals. All three at once makes every regression unattributable. - Write the floor before the exceptions. One unconditional rule on
**, then sensitive paths (migrations, billing, CI,.claude/) with a non-author human seat. - Two weeks in observe, with a measurement. Count the pull requests where the policy would have differed from the human decision: that number is the only one telling you whether the threshold is right. Observe mode costs, so budget for it.
- Name
claude/code_reviewin a rule before adding the file, or you switch off the automatic reviews you thought you were keeping. - Make the check required, then drop
mode: observe, in that order. Set a spend limit on every enabled agent; it is the only thing bounding a token bill.
Need to frame an approval policy or an agent pipeline that touches production? See how we work at Kaleido-Lab.