Should AI Approve Pull Requests? Claude Ship Guardrails

Should AI approve pull requests? Learn how to set Claude Ship guardrails that keep sensitive changes under human review and protect your API.

Ashley Innocent

Ashley Innocent

24 November 2026

Should AI Approve Pull Requests? Claude Ship Guardrails

Apidog for Enterprise

On-Premises Deploy

SSO & RBAC

SOC 2 Compliant

Explore Apidog Enterprise

Should AI approve pull requests? Give it that authority only for a narrow set of low-risk changes after you’ve tested the policy in observe mode. Require an independent human reviewer for authentication, migrations, secrets, and breaking API changes. Use GitHub to enforce required checks, including an OpenAPI compatibility check, on the revision that will merge.

A PR can have passing unit tests and still drop a response field that a mobile client uses. That’s a contract problem. An approval policy should decide who reviews the change, while a tool such as oasdiff checks the contract and Apidog CLI helps you pull a candidate spec for investigation.

What Claude Ship actually approves

Claude Ship combines three agents with different jobs. Code Review leaves findings on the PR. PR Steward works on failed checks, review feedback, and merge conflicts and can push fixes. Claude Approvals evaluates your repository’s policy and can post an approving review when the policy allows it. GitHub decides whether the merge requirements are met.

Claude Approvals, CI and designated reviewers feed separate requirements into the GitHub merge decision

Anthropic introduced Claude Ship on November 23, 2026. Code Review is generally available. PR Steward and Claude Approvals are in beta for Claude Team and Enterprise as part of the repository-wide offering. Anthropic says Claude Ship may miss bugs and security issues, and lists Zero Data Retention among the restrictions on availability.

The documented terminal workflow for /ship requires Claude Code v2.1.330 or later and a local clone. It can commit your work, push the branch, open a GitHub PR, review it, and watch for feedback and failing checks. The repository-wide Claude Approvals policy is configured separately. For GitHub Enterprise or fork-based PRs, Anthropic’s command docs say to open the PR yourself first. The launch post also announced a desktop rollout. The terminal workflow is the one documented in the command guide.

If you’re choosing a tool for review comments, see our AI code review tools guide or CodeRabbit review. For examples of review feedback in practice, see our guides to Codex code review and Cursor Bugbot, or browse our second roundup of AI review tools. When you’re delegating approval, review quality is one part of the decision. You also have to know whose approval GitHub will accept and which checks it will enforce.

Which pull requests should always require a human?

Start with an explicit allowlist for low-risk changes and send everything else to a human. A typo fix in an internal handbook is a reasonable pilot candidate. A typo fix bundled with an authentication change follows the stricter policy. Classify the whole diff, including files added by a follow-up commit.

Change Who should review What they should look for
Authentication or authorization Security or service owner Changes to identity validation, access rules, or tenant boundaries
Database migrations Database or service owner Compatibility across mixed app versions, lock impact, and recovery
Secrets and credential handling Security or infrastructure owner Storage, access scope, rotation, and accidental exposure
Breaking API changes API owner with the affected consumers Client impact, versioning, and migration plan
CI, approval policy, or ownership files Maintainer responsible for merge controls Changes to required checks, bypasses, and who can approve

Match the paths that actually implement those controls. For example, permission rules may live in a shared library that sits outside an auth/ directory. Include its path and require a maintainer on changes to the ownership file itself. Be conservative with broad globs such as docs/** if the directory also contains generated API contracts or executable examples.

Count independent people explicitly. The Claude Approvals docs explain that the author can fill a human seat, so a rule asking for one seat can still let a human author ship without a second person. GitHub can also count Claude’s approving review toward a generic one-review requirement. Check both systems on a sample PR opened by someone who already has write access.

How to enforce approval rules in GitHub

Protect the target branch with a pull request requirement and required status checks. Require code-owner review for designated sensitive paths, and protect the files that define ownership, CI, and approval policy. In an enforced Claude Approvals rollout, make its check required too. Each rule should have a clear owner who can explain when it blocks a merge.

  1. Start in observe mode. Commit .claude/approvals.yml through normal review. Start with comments and human review. Keep automatic Code Review where you need it by naming claude/code_review in the policy. Compare the observed decisions with what your reviewers would do.
  2. Make the branch rules enforce the policy. In GitHub’s branch protection settings, require the code-owner review and the CI checks that apply to the branch. Use unique check names, and select the expected check source where GitHub offers that option. Review who’s allowed to bypass the rules.
  3. Recheck after fixes. Enable dismissal of stale approvals if you want edits to invalidate an earlier approval. Test a PR where Steward pushes a fix after a human review. Confirm the new revision runs the required checks and any approval you rely on still meets your policy.
  4. Test the edge cases before expanding. Try a handbook-only edit, a handbook edit bundled with a migration, and a PR changing a CI workflow. Check which people must sign off each time. Keep manual review in place during the pilot.

An approval rule can limit bot sign-off to routine files and require Claude Code Review to pass. Anthropic’s policy conditions can’t read your CI results, so make build, test, and compatibility jobs independently required in GitHub. A reviewer can then see which control blocked the merge and what has to happen next.

Require an OpenAPI breaking-change check

Compare the base and candidate OpenAPI contracts in CI, and make the diff job a required GitHub check. For example, adding a required field to the request body for POST /orders breaks clients that still send the old payload. A schema validator can accept both versions as valid OpenAPI files. A compatibility check compares what each version requires.

CI compares the base and candidate OpenAPI specs and reports the compatibility result to GitHub

For a Git-backed spec, read the baseline from the PR’s base revision and the candidate from the exact revision CI is evaluating. Keep referenced files with their respective snapshots. If the API contract is generated, build it reproducibly from each revision. When the latest release differs from the base branch, add a comparison against the released contract so you also test what existing clients have in production.

With oasdiff’s breaking-change command, the core of the job looks like this after CI has prepared both files:

oasdiff breaking base-openapi.json candidate-openapi.json --fail-on ERR

Pin the tool version in CI and run the job for every PR subject to the rule. A job that can’t read or parse a spec should fail. If your workflow uses a merge queue, run the check for the queue’s candidate revision as well. Confirm the job reports a result when there are no spec changes and fails on a deliberate break before you make it required.

The diff covers changes expressed in the spec. Keep behavioral contract tests for a changed default, a new side effect, or a change in how an endpoint treats an expired session. For an intentional break, use a human-reviewed exception or introduce a new API version. Record which callers need to migrate, and keep the versioned spec and its tests with the PR.

Export the candidate contract with Apidog CLI

If you design the candidate contract in Apidog, ask your coding agent to export it and compare it with the released spec. This gives you a local report before CI runs. Install the CLI, log in with your Apidog access token, and install its agent skill. See the Apidog CLI guide for Claude Code for setup.

npm install -g apidog-cli@latest
apidog login --with-token "$APIDOG_ACCESS_TOKEN"
apidog skill install

Put the released contract in base-openapi.json and install oasdiff. Give your agent your project ID and use this prompt:

Export the candidate OpenAPI contract from my Apidog project. Compare it with the released contract in base-openapi.json and report breaking changes by method and path. Leave the project and pull request unchanged.

Here’s the export command with an example project ID. If you’re working from an Apidog branch, tell the agent the branch name and have it add --branch. Otherwise the CLI uses the project’s main branch.

apidog export --project 1314366 --format openapi --output ./candidate-openapi.json
oasdiff breaking base-openapi.json candidate-openapi.json --fail-on ERR
Apidog CLI exports the sandbox project's OpenAPI contract to a local JSON file

Ask the agent to show the changed operation and the old and new requirements in its report. Then check the candidate spec into the PR, so reviewers and CI see the same file even if the Apidog project changes later.

If several people need to investigate API changes, Sharkly lets your team assign those checks as tasks to coding agents on your own computers and review their findings before merging.

Frequently asked questions

Can Claude Ship merge my pull request?

PR Steward is designed to work on fixes and leave approval and merging to others. Claude Approvals can post an approving review under your policy. The actual merge depends on your GitHub settings, including any auto-merge configuration and which checks and reviews the branch requires.

Is an approval the same as a code review?

Code review gives you findings about a change. An approval tells GitHub that a reviewer signed off and may count toward a merge requirement. Anthropic documents that enabling Claude approval in a policy rule alone doesn’t start Code Review. Require the review result explicitly if it should inform the approval.

Does observe mode enforce the approval policy?

Observe mode shows the decision the policy would have made. Use it alongside your existing merge requirements while evaluating real changes. When you switch to enforcement, make Claude Approvals a required check on the protected branch where its result should block merges.

Can a PR pass the OpenAPI diff and still break clients?

Yes. The diff can see a removed response property or a newly required request field. A change in server behavior can leave the spec untouched. Maintain integration tests for important client flows and have API owners review those changes even when the contract diff passes.

What’s a good first candidate for AI approval?

Start with a text-only edit in a tightly scoped internal documentation folder. Check the full set of changed files and require the usual CI checks. Keep the human review requirement whenever the PR also touches production code, an API contract, or the rules that decide whether changes merge.

Explore more

Virtual Patching vs Patching: When to Shield an API Instead of Redeploying

Virtual Patching vs Patching: When to Shield an API Instead of Redeploying

Considering virtual patching for your API? Learn when to use a temporary shield, when to deploy the fix, and how to verify both.

24 November 2026

Shirudo API Testing With Apidog CLI: Did the Shield Break Your API?

Shirudo API Testing With Apidog CLI: Did the Shield Break Your API?

Need a Shirudo API testing workflow? Learn how to compare staging results with Apidog CLI before and after your operator loads a shield.

24 November 2026

What Is Shirudo? OpenAI and Cisco's Open-Source eBPF Shield, Explained

What Is Shirudo? OpenAI and Cisco's Open-Source eBPF Shield, Explained

What is Shirudo? Learn how OpenAI and Cisco's open-source eBPF shield blocks Linux exploits without a reboot, and whether it's ready for you.

24 November 2026

Practice API Design-first in Apidog

Discover an easier way to build and use APIs

Should AI Approve Pull Requests? Claude Ship Guardrails