One read of Claude Code CLIclaude-code-20261123T200701Z
28 pages moved out of 221 read.
What this read moved
1-25 of 28, page 1 of 2This capture is too large to show at once. Changes 1-25 of 28 are below, significant first; the rest are on the following screens.
approvals New page · 106 lines, new page
# Claude Approvals ## Find Claude Approvals on a pull request ## Example policy ## Before you turn on Approvals ### Availability ### Who can turn Approvals on or off ### Merges without human review ### Keep automatic Code Reviews ### Billing for Approvals ## Set up Claude Approvals ## Related resources
A whole new page. There's nothing to diff it against, so here is what it says.
# Claude Approvals
> Set how many people a path in your GitHub repository needs, and where Claude may approve, with a policy file and a pull request check
Claude Approvals is a check on GitHub pull requests that reports who still has to approve. It follows a [policy](https://code.claude.com/docs/en/approvals-policy.md), a file in your repository that can set how many people have to approve a change to a path and where Claude may approve.
> [!TIP]
>
> To turn on Claude Approvals in a repository, follow [Set up Claude Approvals](https://code.claude.com/docs/en/approvals-setup.md).
To evaluate a pull request, Approvals reads the policy, finds the rules that apply, and counts approvals:

Use Approvals to set how many people have to approve a change, with more on risky changes and fewer on routine ones. For example, billing code can need two people, and test fixtures can need one person once [Code Review](https://code.claude.com/docs/en/code-review.md) passes.
> [!NOTE]
>
> For permission prompts in a Claude Code session, see [Configure permissions](https://code.claude.com/docs/en/permissions.md).
## Find Claude Approvals on a pull request
Approvals adds a check named **Claude Approvals** to the pull requests that it evaluates. The check's title says what's still needed, such as **Waiting on human review from any person (1/2)**. A title that starts with **(observe mode)** means that the policy wasn't enforced when the check ran. In [observe mode](#set-up-claude-approvals), the check shows what your policy would decide.
Claude also posts a comment with the reasons. Where the policy allows it, Claude can post an approving review. For the common titles and what to do about each, see [Find your approval status and what to do next](https://code.claude.com/docs/en/approvals-pull-requests.md#find-your-approval-status-and-what-to-do-next). If a pull request has no check, see [No Claude Approvals check appeared](https://code.claude.com/docs/en/approvals-troubleshooting.md#no-claude-approvals-check-appeared).
## Example policy
You write a policy as a list of rules in `.claude/approvals.yml`.
This policy has one rule, which asks for two people on every change:
```yaml theme={null}
# .claude/approvals.yml
version: 1
mode: observe
rules:
- purpose: "A change takes two people, and Claude doesn't approve."
paths: ["**"]
verdict: { claude: comments, seats: 2 }
advisory: [claude/code_review]
```
Each part of the policy sets one thing:
* **`mode: observe`**: starts the policy in [observe mode](#set-up-claude-approvals)
* **`purpose`**: says why the rule exists
* **`paths`**: names the files that the rule matches, which here is every file
* **`seats: 2`**: asks for two people, one of whom [can be the author](https://code.claude.com/docs/en/approvals-policy.md#whether-a-pull-request’s-author-counts)
* **`claude: comments`**: means that Claude doesn't approve
* **`advisory`**: [keeps automatic Code Reviews](#keep-automatic-code-reviews)
You can also give a rule a condition, which can read facts about the pull request and classifiers' answers:
* **[Facts](https://code.claude.com/docs/en/approvals-policy.md#if) about the pull request**: such as how many lines changed, who opened it, and which branch it targets
* **A [classifier's](https://code.claude.com/docs/en/approvals-classifiers.md) answer**: a model's judgment on a question such as how risky the change is
A condition can't read CI results, so keep CI as its own required check in GitHub.
## Before you turn on Approvals
Before you add a policy file to a repository, check that your organization qualifies and who can turn Approvals on or off. Then see what Approvals changes for merges, Code Review, and billing.
### Availability
Approvals is in public beta for Claude organizations on [Team and Enterprise](https://code.claude.com/docs/en/feature-availability.md#features-that-require-a-claude-subscription) plans, as part of [Claude Ship](https://code.claude.com/docs/en/claude-ship.md). It works on github.com, including GitHub Enterprise Cloud. Compliance settings limit who can use it:
* **Not available**: with [Zero Data Retention](https://code.claude.com/docs/en/zero-data-retention.md) enabled, the [HIPAA configuration](https://code.claude.com/docs/en/hipaa-setup.md) applied, or customer-managed encryption keys (CMEK)
* **Can't start Approvals**: with FERPA or Access Transparency settings
### Who can turn Approvals on or off
Once the [prerequisites](https://code.claude.com/docs/en/approvals-setup.md#prerequisites) are met, anyone who can merge a policy file into the default branch can turn Approvals on. An Owner of the Claude organization can [turn Approvals off](https://code.claude.com/docs/en/approvals-setup.md#turn-off-approvals) for the whole organization, and it then stays off when a policy file merges.
### Merges without human review
A pull request can merge when nobody but its author has looked at it. Check your policy and your GitHub rules for cases such as these:
* **The check isn't required**: the **Claude Approvals** check blocks a merge only where you make it a required check in GitHub, and normally not in observe mode
* **The policy asks for nobody else**: the author can fill a seat, so with `seats: 1` nobody else has to look. With `seats: 0`, a pull request that a bot wrote can merge when no person has looked at it
* **GitHub counts Claude's approval**: where a GitHub branch rule requires one approval, Claude's approving review can be that approval
* **Claude approves with no review**: a rule with `claude: approves` starts no Code Review by itself, so Claude can approve a change that nothing has reviewed. To get a review first, [let Claude approve only when Code Review passes](https://code.claude.com/docs/en/approvals-setup.md#let-claude-approve-when-code-review-passes)
For the other cases, and a rule that asks for a person who isn't an author, see [Merges without human review](https://code.claude.com/docs/en/approvals-github-rules.md#merges-without-human-review).
### Keep automatic Code Reviews
[Code Review](https://code.claude.com/docs/en/code-review.md), another Claude Ship agent, can review each pull request automatically. Adding a policy file can stop those reviews. Where every file that a pull request changes lies under a policy file, automatic reviews normally stop, unless a rule for those files names `claude/code_review`. That holds in [observe mode](#set-up-claude-approvals) and when the policy is enforced.
To keep automatic reviews, [list `claude/code_review` in a rule](https://code.claude.com/docs/en/approvals-policy#advisory), as the [example policy](#example-policy) does under `advisory`.
### Billing for Approvals
Approvals bills your organization's [usage credits](https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans), by tokens, for the Code Reviews and classifier runs that a policy starts. See [what starts a charge](https://code.claude.com/docs/en/approvals-setup.md#what-approvals-costs).
## Set up Claude Approvals
To set up Approvals, start your policy in observe mode, where the **Claude Approvals** check shows what your policy would decide. Reviews and classifier runs are billed in observe mode. For starter policies and the steps, see [Set up Claude Approvals](https://code.claude.com/docs/en/approvals-setup.md).
## Related resources
* [Work with Claude Approvals on a pull request](https://code.claude.com/docs/en/approvals-pull-requests.md): check titles and comment commands
* [Approvals and your GitHub rules](https://code.claude.com/docs/en/approvals-github-rules.md): required reviews, CODEOWNERS, and merge queues
* [Policy file reference](https://code.claude.com/docs/en/approvals-policy.md): keys and an example policy
* [Troubleshoot Claude Approvals](https://code.claude.com/docs/en/approvals-troubleshooting.md): when no check appears or a policy file is refused
* [Configure permissions](https://code.claude.com/docs/en/permissions.md): permission prompts in Claude Code
approvals-classifiers New page · 287 lines, new page
# Claude Approvals classifiers ## How a classifier works ## Example classifier definition ### Use the example's rating in a rule ## Classifiers Anthropic provides ### `claude/code_review` ### `claude/diff` ## Add a custom classifier ### When a classifier's answer appears ## Read a classifier's answer from a rule ### Ways to read a classifier in a condition ## Classifier definition file keys ### `outputs` ### `inputs` ### `tools` #### `labels` #### `reviewers` ### `budget` ## How a classifier run behaves ### When a classifier runs ### What a classifier run can read and change ### What a rule sees when a classifier run gives no answer ## What a classifier run costs ### Limit what a custom classifier costs ## Related resources
A whole new page. There's nothing to diff it against, so here is what it says.
# Claude Approvals classifiers
> Let a Claude Approvals rule depend on Code Review's answer or on a question you define. Add a classifier, read its answer, and limit what a run costs.
In [Claude Approvals](https://code.claude.com/docs/en/approvals.md), the rules in your [policy file](https://code.claude.com/docs/en/approvals-policy.md) decide who has to approve a pull request. A classifier lets a rule depend on a judgment about the change, such as whether Code Review passed or how risky the change is. For example, a rule can ask for two people, and for only one when a classifier rates the change as low risk.
A rule can decide from paths, facts, and classifiers:
* **Paths**: which files the pull request changes
* **[Facts](https://code.claude.com/docs/en/approvals-policy.md#if)**: details of the pull request itself, such as how many lines changed or who opened it
* **Classifiers**: the answer to a question about the change. Use one for what paths and facts can't express
Claude Approvals is in [public beta](https://code.claude.com/docs/en/approvals.md#availability) for organizations on Team and Enterprise plans.
## How a classifier works
A classifier has a name, a question, and the answers that it can give. Its answer reaches a rule in these steps:
1. **Choose or define a classifier**: `claude/code_review` and `claude/diff` [come with Claude Approvals](#classifiers-anthropic-provides). A custom classifier is a folder in your repository, `.claude/classifiers/<name>/`, on the default branch
2. **Name it in a rule**: write the classifier's name in a rule's condition in your policy file, `.claude/approvals.yml`. For a custom classifier in the folder `change_risk`, the name is `repo/change_risk`, as in `"repo/change_risk = low"`
3. **Approvals runs it on a pull request**: for example, when a pull request opens ready for review and changes a file that the rule matches. See [When a classifier runs](#when-a-classifier-runs). Each run that calls a model is [billed](#what-a-classifier-run-costs) to your organization's usage credits
4. **The rule uses the answer**: the answer helps decide who has to approve. It shows under **Classifier results** in Claude's comment on the pull request, unless a [`reuse`](https://code.claude.com/docs/en/approvals-policy#reuse) condition reads it
## Example classifier definition
You define a custom classifier in a file named `def.yml`. The file holds the question for the model, in `prompt`, and the answers that the model can pick, in `outputs`.
This example defines a classifier named `change_risk`. Its `prompt` asks the model to rate how risky a change is, and its `outputs` lets the model answer `low`, `medium`, or `high`:
```yaml theme={null}
# .claude/classifiers/change_risk/def.yml
version: 1
description: "How risky is this change to ship?"
model: opus
prompt: |
Rate how risky this change is to ship.
high: it touches sign-in, billing or a data migration.
medium: it changes behavior a user can see.
low: anything else.
When two ratings fit, pick the higher.
outputs:
risk: { type: ordinal, values: [low, medium, high] }
```
Each key in the example does one job:
| Key | In this example |
| :- | :- |
| `version` | The format's version, `1` |
| `description` | One line that says what the classifier asks |
| `model` | The Claude model that answers, here the newest Opus model |
| `prompt` | The question. It says what each rating means, and which one to pick when two fit |
| `outputs` | The answers that the model picks from. This classifier has one output, `risk`, and its `values` run from least to most |
A definition can also set `inputs`, `tools`, and `budget`. See [Classifier definition file keys](#classifier-definition-file-keys).
### Use the example's rating in a rule
A classifier takes its name from its folder. The example is saved at `.claude/classifiers/change_risk/def.yml`, so you write `repo/change_risk` in your policy file's rules.
To use the rating, compare it with a value in a rule's condition. For example, `if: "repo/change_risk = low"` is true when the model answered `low`. For a rule that asks for fewer people under that condition, see [Read a classifier's answer from a rule](#read-a-classifier’s-answer-from-a-rule).
## Classifiers Anthropic provides
Claude Approvals comes with prebuilt classifiers, `claude/code_review` and `claude/diff`. To use one, write its name in a condition in one of your rules.
### `claude/code_review`
`claude/code_review` tells a rule whether [Code Review](https://code.claude.com/docs/en/code-review.md) passed. For example, `if: "claude/code_review = pass"` is true while its answer is `pass`.
`claude/code_review` gives one of these answers:
| Answer | When |
| :- | :- |
| `pass` | A review finished with no [Important finding](https://code.claude.com/docs/en/code-review-pull-requests.md#severity-levels) open |
| `fail` | A review finished with an Important finding open |
You can read it in any condition, or list it under [`advisory`](https://code.claude.com/docs/en/approvals-policy#advisory).
* **To read the severity of its open findings**: write `claude/code_review.severity`, which is `none`, `minimal`, or `high`
* **To let people turn `fail` into `pass`**: name them in your policy's [`findings`](https://code.claude.com/docs/en/approvals-policy#findings) lists. They do it by closing the Important findings
### `claude/diff`
`claude/diff` tells a rule how much a pull request changed since an approval or an earlier answer. It answers `trivial`, `same_intent`, or `different`.
Read it in a condition under [`reuse`](https://code.claude.com/docs/en/approvals-policy#reuse), which says what continues to count after a push.
## Add a custom classifier
With a custom classifier, you write a question about a pull request, and a Claude model answers it. You define the classifier in a file in your repository, then name it in a rule:
1. **Define the classifier**: create a folder under `.claude/classifiers/`, named in lower-case letters, digits, and `_`. In it, save a [`def.yml`](#classifier-definition-file-keys) that holds the question and the answers to pick from. In a rule, you write the folder `change_risk` as `repo/change_risk`.
2. **Name it under `advisory`**: in the root `.claude/approvals.yml`, pick a rule that has a `verdict` and whose `paths` match the files that you want judged, and list the classifier under that rule's [`advisory`](https://code.claude.com/docs/en/approvals-policy#advisory). Under `advisory`, the classifier runs and [is billed](#what-a-classifier-run-costs), and decides nothing.
3. **Merge both files**: open one pull request with both, and Claude comments on the pull request. If the rule that you edited is enforced, expect a warning that says "rules still hold on these files", which doesn't block the merge. Merge the pull request once the **Policy files in this change** section of that comment reports no refusal.
4. **Read its answers**: open a pull request that changes those files, and [look for the answer](#when-a-classifier’s-answer-appears) in Claude's comment.
5. **Let a rule depend on it**: once you trust the answers, [read them from a rule](#read-a-classifier’s-answer-from-a-rule).
### When a classifier's answer appears
After you merge a classifier's definition and the rule that names it, wait five minutes. Then open a pull request that isn't a draft and that changes a file that rule's `paths` match. Look for the classifier's line in one of these places:
* **Claude's comment**: under **Classifier results**
* **The Claude Approvals check's summary**: under **Advisory classifiers (not counted toward this verdict)**
At first, the line reads "no result recorded yet". A run can take up to 10 minutes, or longer where the classifier's `def.yml` sets a longer [time limit](#budget). Under an enforced rule, the line stays as it is when the run ends.
The answer shows the next time Approvals evaluates the pull request, for example when someone approves it or requests changes. The line then reads, for example, "`repo/change_risk`: reported `low` (advisory)".
* **The line still shows no result**: wait until the run's time limit is up, then have someone approve the pull request or request changes
* **Your classifier has no line**: check that the rule that names the classifier has a `verdict`, and that its `paths` match the file you changed
## Read a classifier's answer from a rule
To make a rule depend on a classifier's answer, write the classifier's name in a condition: the rule's own `if`, or the `if` of an [`override`](https://code.claude.com/docs/en/approvals-policy#override). Once `repo/change_risk` answers well under `advisory`, move its name into an override's `if`.
Keep the strict verdict on the rule itself, because the rule's verdict applies [when a run gives no answer](#what-a-rule-sees-when-a-classifier-run-gives-no-answer).
This rule asks for two people, and for one while `repo/change_risk` answers `low`:
```yaml theme={null}
# .claude/approvals.yml
version: 1
rules:
- purpose: "Two people. One is enough when the risk is low."
paths: ["**"]
verdict: { claude: comments, seats: 2 }
override:
- { if: "repo/change_risk = low", verdict: { claude: comments, seats: 1 } }
```
### Ways to read a classifier in a condition
A condition can read a classifier in these forms:
| Form | Example | Reads |
| :- | :- | :- |
| Name alone | `"repo/change_risk <= medium"` | The only output |
| `.output` | `"repo/api_review.breaking = yes"` | One output by name. Required when the classifier's definition has several |
| `.severity` | `"repo/api_review.severity >= high"` | The worst open finding, from `none`, `minimal`, `low`, `medium`, `high`, or `critical`. Needs `findings` in `tools` |
| `(input=value)` | `"claude/code_review(level=deep) = pass"` | A run with that input. Code Review's `level` is `quick`, `standard`, or `deep` |
| `= error`, `= incomplete` | `"repo/change_risk = error"` | How a run ended with no answer |
## Classifier definition file keys
Write a classifier's definition in `def.yml`, which can be up to 64 KiB. For a whole file, see [Example classifier definition](#example-classifier-definition).
You can write these keys in `def.yml`:
| Key | Required | Values |
| :- | :- | :- |
| `version` | Yes | `1`, as a bare number |
| `description` | Yes | One line, up to 1,000 characters |
| `model` | Yes | A model family in lower case, such as `opus` or `sonnet`, or the exact Claude API ID of a generally available model from the [models overview](https://platform.claude.com/docs/en/about-claude/models/overview). The model has to [support auto mode](https://code.claude.com/docs/en/permission-modes.md#eliminate-prompts-with-auto-mode) |
| `prompt` | This or `prompt.md` | The question. For a long one, save `prompt.md` beside `def.yml`, up to 512 KiB |
| [`outputs`](#outputs) | No | A map of output names to their types and values |
| [`inputs`](#inputs) | No | A map of input names that a rule can set |
| [`tools`](#tools) | No | A list |
| [`budget`](#budget) | No | `{ time, cost }` |
If you name a model family, the classifier uses that family's newest model, so cost and answers can change with no pull request. If you name an exact ID, the classifier stops loading when that model is retired. Your organization's list of allowed models applies to these runs.
### `outputs`
Give each output a `type`, and write names and values in lower-case letters, digits, and `_`. Don't name an output `severity`, and don't use `true`, `false`, `error`, `incomplete`, or `complete` as a value. Put quotes around `"yes"` and `"no"`.
| `type` | Also needs | [Operators](https://code.claude.com/docs/en/approvals-policy.md#if) in a condition |
| :- | :- | :- |
| `criteria` | `values`, a list of words | `=`, `!=` |
| `ordinal` | `values`, least first | All six |
| `numeric` | `min` and `max`, whole numbers | All six |
### `inputs`
An input is a value that a rule can set for a run. Define each input under `inputs` in `def.yml`, then set it from a rule in parentheses after the classifier's name, as in `repo/change_risk(rigor=thorough)`. Give each input a `default`, and either `values` or `min` and `max`, as in `rigor: { values: [quick, thorough], merge: right, default: quick }`. Say in your prompt what each value changes.
An input's `merge` says what happens when rules ask for different values on one pull request:
| `merge` | What runs |
| :- | :- |
| `left`, `right` | One run, with the word that stands earlier or later in `values` |
| `min`, `max` | One run, with the smaller or larger number |
| `list` | One run, with every word asked for |
| Omitted | A separate billed run for each value |
### `tools`
List an entry under `tools` to let a run do more:
| Entry | Lets a run | Limit |
| :- | :- | :- |
| `findings` | Read parts of the pull request's review threads, report findings as new ones, and resolve or reopen its own | 16 open threads |
| `comment` | Post one comment | 5,000 characters |
| `code` | Read files beyond the diff | Read-only |
| `labels` | Add labels that the repository already has, and remove the ones it added | 8 labels. None whose name starts with `approvals:` or `claude-` |
| `reviewers` | Add reviewers, and remove the ones it added | 8 reviewers |
Approvals holds back some of a run's `tools` in observe mode and on some pull requests:
* **In observe mode**: a run keeps only `findings` and `code` from its `tools`. Approvals can list the findings in its own comment, and opens no new review threads. That holds while your policy file, or every rule that names the classifier and matches a changed file, says [`mode: observe`](https://code.claude.com/docs/en/approvals-policy#rule-keys).
* **On some pull requests**: a run adds no comment, label, review thread, or GitHub review request. Examples are a pull request from a fork, and one where an author lacks write access
#### `labels`
Don't grant `labels` where a label gates a merge, a deploy, or a workflow. A label that a run adds is a real label on the pull request, and anything that reads labels can act on it.
#### `reviewers`
Say in your prompt whom to add, by login. Where a rule that [applies](https://code.claude.com/docs/en/approvals-policy.md#how-rules-combine-into-one-verdict) [reads the classifier's answer](#read-a-classifier’s-answer-from-a-rule), the **Claude Approvals** check can wait for their approval, on top of [`seats`](https://code.claude.com/docs/en/approvals-policy#verdict). Name people who have write access. With a policy file in a subdirectory, [list the classifier only under `advisory`](https://code.claude.com/docs/en/approvals-policy#policy-files-in-subdirectories).
To drop a reviewer who can't approve, first merge a change to the prompt if it names that person, and allow five minutes. Then comment [`@claude approvals rerun`](https://code.claude.com/docs/en/approvals-pull-requests#comment-commands-for-approvals) on the pull request.
### `budget`
Set `time`, `cost`, or both under `budget`, as in `budget: { time: 300, cost: 5 }`. A run that reaches either limit stops, and a condition then reads `incomplete`. If you ask for more than the maximum, the run gets the maximum and Approvals warns you.
| Key | Unit | Default | Maximum |
| :- | :- | :- | :- |
| `time` | Whole seconds | `600` | `3600` |
| `cost` | Whole US dollars | `10` | `10` |
Approvals stops a run when its estimated spend reaches `cost`, and the bill can be higher. Under \$5, a run on a large pull request can stop before it answers.
## How a classifier run behaves
A rule's result can turn on when its classifier runs, what the run can read, and what happens when it gives no answer.
### When a classifier runs
A `repo/` classifier runs on a pull request only if you name it in a matching rule: in an `if`, an override's `if`, a `reuse` condition, or `advisory`. On a [pull request from a fork](https://code.claude.com/docs/en/approvals-pull-requests.md#pull-requests-from-forks-and-outside-contributors), `repo/` classifiers don't start before a maintainer vouches for the commit. For `claude/code_review`, see [when Approvals starts a review](https://code.claude.com/docs/en/approvals-setup.md#what-approvals-costs).
* **What can start a run**: a pull request opens ready for review, is marked ready, or is reopened. A push that changes the diff, a change of base branch, and a [rerun of the Claude Approvals check](https://code.claude.com/docs/en/approvals-pull-requests.md#comment-commands-for-approvals) can also start one. After [your policy stops observing](https://code.claude.com/docs/en/approvals-setup.md#enforce-your-policy-and-require-claude-approvals), Approvals evaluates some open pull requests by itself, which can start a run.
* **Which definition runs**: the default branch's copy of the definition and prompt. A pull request's own copy doesn't run. The folder's files are [protected files](https://code.claude.com/docs/en/approvals-policy.md#protected-files).
* **A changed definition ends earlier answers**: an edit to `def.yml` or `prompt.md` counts once it's on the default branch. An open pull request keeps its check until its next evaluation, such as a push or a rerun. That evaluation drops the earlier answer, and the classifier can run again.
* **After a push that changes the diff**: an earlier answer can count where [`reuse`](https://code.claude.com/docs/en/approvals-policy#reuse) keeps it, or where the push changes only covered files whose rules don't name the classifier
* **Order**: with `run: sequential`, the default, an override's classifiers normally wait for the overrides above it. With `run: parallel`, they can all start at once, which can bill runs that no verdict needed.
### What a classifier run can read and change
A `repo/` classifier's run is a Claude Code cloud session on Anthropic's infrastructure. If your organization requires self-hosted compute, a condition reads `error` in place of that run's answer.
Check what the session can read and what it can change:
* **What it can read**: the pull request's title, description, labels, author, changed files, diff, approvals, and required reviewers, the classifier's earlier runs, your policy files, and the files under `.claude/classifiers/`. With `findings` in `tools`, it reads parts of the review threads
* **What `code` adds**: read-only copies of files at the pull request's head and on the default branch, without some files, such as `CLAUDE.md`, `AGENTS.md`, `.claude/`, `.mcp.json`, and files whose names end in `.pdf`
* **What it can change**: the session's GitHub access is read-only. Where [`tools`](#tools) lists an entry that writes, the run records what it asks for, and Approvals can carry it out after the run.
A run reads text that the pull request's author wrote, and that text can try to steer the classifier's answer. On paths that matter, [ask for a person](https://code.claude.com/docs/en/approvals-github-rules.md#ask-for-a-person-who-isn’t-an-author) in a rule that reads no classifier.
### What a rule sees when a classifier run gives no answer
When a run ends with no answer, a condition normally reads one of these values:
| A condition reads | When |
| :- | :- |
| `incomplete` | The run began and ended with no answer |
| `error` | The run couldn't start, was broken off, or outlasted the check's wait |
In both cases, an override that needs the answer leaves the rule's own `verdict` in place. A rule's own `if` that needs the answer fails the **Claude Approvals** check, with the title **A classifier had no result**.
To choose another verdict, put [an override](https://code.claude.com/docs/en/approvals-policy.md#override) on `= error` or `= incomplete` above the overrides that read the answer. An override can't choose another verdict for a missing answer in a rule's own `if`. Move the comparison that reads the classifier from the rule's `if` into an override.
## What a classifier run costs
A run that calls a model is billed to your organization's usage credits, by tokens:
| Classifier | What's billed |
| :- | :- |
| A custom classifier, `repo/<name>` | Each run. That includes runs in observe mode, runs under `advisory`, and runs that end with no answer. After an error, Approvals can start the run again by itself, more than once, and each of those runs is billed |
| `claude/diff` | Each answer that calls a model |
| `claude/code_review` | Billed as [Code Review](https://code.claude.com/docs/en/code-review-costs.md) |
### Limit what a custom classifier costs
You can cap one run, cap the month, pick a lower-cost model, or start fewer runs:
* **Cap one run**: in the classifier's `def.yml`, add `budget: { cost: 5 }`. Approvals stops a run when its estimated spend reaches that many US dollars, and the bill can be higher. With no [`budget`](#budget), the cap is \$10
* **Cap the month**: set a [spend limit for classifier runs](https://code.claude.com/docs/en/approvals-setup.md#limit-what-a-policy-costs) at [**Organization settings > Usage**](https://claude.ai/admin-settings/usage), which takes an Owner role
* **Pick a lower-cost model**: in `def.yml`, change `model`, for example from `opus` to `sonnet`
* **Start fewer runs**: make your edits to `def.yml` and `prompt.md` in one pull request. After each merged edit, the classifier runs again at each open pull request's next evaluation
## Related resources
* [Claude Approvals policy file reference](https://code.claude.com/docs/en/approvals-policy.md): conditions, overrides, `reuse`, and `findings`
* [Set up Claude Approvals](https://code.claude.com/docs/en/approvals-setup.md): observe mode, enforcement, and spend limits
* [Troubleshoot Claude Approvals](https://code.claude.com/docs/en/approvals-troubleshooting.md): when a classifier gives no answer
* [Data usage](https://code.claude.com/docs/en/data-usage.md): how Anthropic handles data from Claude Code
approvals-github-rules New page · 102 lines, new page
# Claude Approvals and your GitHub rules ## Merges without human review ### Ask for a person who isn't an author ## Required reviews and CODEOWNERS ## Auto-merge and merge queues ## Who can change or loosen a policy ### Classifier answers that a pull request can steer ## Related resources
A whole new page. There's nothing to diff it against, so here is what it says.
# Claude Approvals and your GitHub rules
> See how the Claude Approvals check works with required reviews, CODEOWNERS, and merge queues, what can merge with no person, and who can change a policy
[Claude Approvals](https://code.claude.com/docs/en/approvals.md) adds a check to the GitHub pull requests that it evaluates. The check reports who has to approve a pull request, following a [policy](https://code.claude.com/docs/en/approvals-policy.md), a file in your repository. The check blocks a merge only where you make it a required check in GitHub, and your branch rules decide what merges.
If you administer a repository or review its security, check how your policy and your GitHub settings work together before you [enforce the policy](https://code.claude.com/docs/en/approvals-setup.md#enforce-your-policy-and-require-claude-approvals):
* **[Merges without human review](#merges-without-human-review)**: settings that let a pull request merge with no review but its author's, and a rule that asks for a person who isn't an author
* **[Required reviews and CODEOWNERS](#required-reviews-and-codeowners)**: how GitHub's own review rules count Claude's approving review, and what to set
* **[Auto-merge and merge queues](#auto-merge-and-merge-queues)**: what can merge without anyone acting
* **[Who can change or loosen a policy](#who-can-change-or-loosen-a-policy)**: who can edit the policy file, stop requiring the check, or steer a classifier's answer
## Merges without human review
With Approvals on, a pull request can merge with no person but its author looking at it, or with no person at all if a bot wrote it. That can happen if GitHub doesn't require the **Claude Approvals** check. It can also happen if the check passes with no person besides the author, for example with:
* `seats: 0`
* `seats: 1`, which the author can fill
* A [`from` list](https://code.claude.com/docs/en/approvals-policy#people-lists) that admits bots
* A machine user, a user account that a script or an agent drives, which [can count as a person](https://code.claude.com/docs/en/approvals-policy.md#whether-a-pull-request’s-author-counts)
* A [`reuse`](https://code.claude.com/docs/en/approvals-policy#reuse) that keeps seats after a push
* Files that no rule covers, where GitHub counts the neutral result as passing
* A condition that reads a [classifier's](https://code.claude.com/docs/en/approvals-classifiers.md) answer, in a rule's `if`, an override's `if`, or a `reuse`. That answer is one that [a pull request's text can steer](#classifier-answers-that-a-pull-request-can-steer)
A push directly to the default branch gets no check. Require pull requests there in GitHub.
Claude's [approving review](https://code.claude.com/docs/en/approvals.md#find-claude-approvals-on-a-pull-request) can meet a GitHub branch rule that requires one approval.
### Ask for a person who isn't an author
To have the **Claude Approvals** check ask for one person who isn't an author on every path, add this file's rule to a root [policy file](https://code.claude.com/docs/en/approvals-policy.md) that you [enforce](https://code.claude.com/docs/en/approvals-setup.md#enforce-your-policy-and-require-claude-approvals):
```yaml theme={null}
# .claude/approvals.yml
version: 1
rules:
- purpose: "A change takes one person who isn't an author."
paths: ["**"]
nested: inherit
verdict:
claude: comments
seats: [{ count: 1, from: [humans, "!pr/authors"] }]
advisory: [claude/code_review]
```
Each part of that rule does a job:
| Part of the rule | What it does |
| :- | :- |
| No `if` or `override` | No classifier's answer changes the rule |
| `claude: comments` | Approvals doesn't post Claude's approval |
| `nested: inherit` | The rule also applies under [policy files in subdirectories](https://code.claude.com/docs/en/approvals-policy.md#policy-files-in-subdirectories) |
| `humans` | A [machine user](https://code.claude.com/docs/en/approvals-policy.md#whether-a-pull-request’s-author-counts), a user account that a script or an agent drives, can fill this seat. To keep one out, add its login, as in `[humans, "!pr/authors", "!acme-ci"]` |
| `"!pr/authors"` | Excludes the pull request's authors. On a [fork's pull request](https://code.claude.com/docs/en/approvals-pull-requests.md#pull-requests-from-forks-and-outside-contributors), no approval counts toward this seat |
| `advisory` | [Keeps automatic Code Reviews](https://code.claude.com/docs/en/approvals.md#keep-automatic-code-reviews) |
For paths that need more people, copy the rule, narrow `paths`, and raise `count`.
## Required reviews and CODEOWNERS
Check how each GitHub setting works beside your policy, and what to set:
| GitHub setting | How it works with Approvals | What to do |
| :- | :- | :- |
| Required approvals | GitHub can count Claude's approving review as one approval. GitHub doesn't count an author who fills a seat, or an [`@claude approve`](https://code.claude.com/docs/en/approvals-pull-requests#comment-commands-for-approvals) comment | Where you require the **Claude Approvals** check, require no more than one approval in GitHub, and ask for more people in `seats`. Otherwise a pull request can stay blocked after the **Claude Approvals** check passes |
| CODEOWNERS | A branch rule can require a Code Owner's review | To name owners in your policy, use a [people list](https://code.claude.com/docs/en/approvals-policy.md#people-lists) in `seats` on their paths |
| Stale approvals | Claude posts its approving review on one commit, and GitHub can continue to count that review until it's dismissed. Approvals normally asks GitHub to dismiss the review when Approvals evaluates the next push, and GitHub can [refuse](https://code.claude.com/docs/en/approvals-pull-requests.md#approvals-waits-for-people) | Where GitHub requires approvals, turn on **Dismiss stale pull request approvals when new commits are pushed** or **Require approval of the most recent reviewable push** |
## Auto-merge and merge queues
If you use GitHub auto-merge or a merge queue with a policy that doesn't require a person's approval, a change can merge without anyone acting. To have the check ask for a person who isn't an author on every path, [add this rule](#ask-for-a-person-who-isn’t-an-author), and require the **Claude Approvals** check.
Approvals doesn't evaluate the commits that a merge queue creates:
* **The queue's commits**: Approvals normally marks them as passed, with the title **Stamped for merge queue**, except for a pull request that was evaluated only in [observe mode](https://code.claude.com/docs/en/approvals-pull-requests.md#approvals-in-observe-mode)
* **Entry to the queue**: GitHub's own rule decides it, normally after the pull request's required checks pass. A pull request can also enter while the check is still running. If the check doesn't pass after that, remove the pull request from the queue
* **Pull requests that were only observed**: after you start enforcing the policy, [rerun the check](https://code.claude.com/docs/en/approvals-setup.md#enforce-your-policy-and-require-claude-approvals) on each open pull request before you queue it. Until its latest commit passes under the policy, its commit in the queue normally gets no check, and where the check is required, it can wait there
* **The app's permission**: ask an owner of your GitHub organization to accept the Claude GitHub App's [**Merge queues** permission](https://code.claude.com/docs/en/github-actions.md#github-app-permissions). Without it, the queue's commits get no check, so where GitHub requires the check, entries wait
## Who can change or loosen a policy
A policy is a file in your repository, so your GitHub permissions decide who can change it.
| Who | What they can do |
| :- | :- |
| Anyone who can merge into the default branch | Change a policy file. A policy file is a [protected file](https://code.claude.com/docs/en/approvals-policy.md#protected-files): a pull request that changes it can need a person with write access, who can be the pull request's author. A [machine user](https://code.claude.com/docs/en/approvals-policy.md#whether-a-pull-request’s-author-counts) counts as a person |
| A GitHub repository admin | Stop requiring the **Claude Approvals** check in the repository's own branch rules |
| Anyone who can bypass every rule that requires the check | Merge past the check |
| An [Owner role](https://code.claude.com/docs/en/server-managed-settings.md#access-control) in the Claude organization | [Turn off Approvals](https://code.claude.com/docs/en/approvals-setup.md#turn-off-approvals) for a GitHub organization, a repository whose **Edit** dialog shows **Claude Approvals**, or the whole Claude organization |
### Classifier answers that a pull request can steer
Approvals applies the policy files and your classifier definitions from the default branch. A pull request's [author's text](https://code.claude.com/docs/en/approvals-classifiers.md#what-a-classifier-run-can-read-and-change) can steer a classifier's answer.
Where a rule's `if`, an override's `if`, or a `reuse` condition reads an answer, a steered answer can lower what the pull request needs. To ask for one person who isn't an author on every path, [add this rule](#ask-for-a-person-who-isn’t-an-author).
## Related resources
* [Set up Claude Approvals](https://code.claude.com/docs/en/approvals-setup.md): enforce a policy and require the **Claude Approvals** check
* [Claude Approvals policy file reference](https://code.claude.com/docs/en/approvals-policy.md): seats, people lists, and protected files
* [Claude Approvals classifiers](https://code.claude.com/docs/en/approvals-classifiers.md): what a classifier's run can read and change
approvals-policy New page · 404 lines, new page
# Claude Approvals policy file reference ## How a policy file works ## Where to put a policy file ### When a change to a policy file takes effect ### Policy files in subdirectories ## Top-level keys ## Rule keys ### `paths` ### `if` ### `verdict` ### People lists ### `override` ### `advisory` ### `reuse` ### `findings` ### `locals` and `use` ## How rules combine into one verdict ## How people's approvals are counted ### Whether a pull request's author counts ### Earlier approvals after a new push ## Protected files ### Who has to approve a change to a protected file ### When Claude approves a change to a protected file ## Policy file size and count limits ## Related resources
A whole new page. There's nothing to diff it against, so here is what it says.
# Claude Approvals policy file reference
> Reference for the Claude Approvals policy file, `.claude/approvals.yml`: its keys, how rules combine, how approvals count, and an example policy.
A policy file, `.claude/approvals.yml`, tells [Claude Approvals](https://code.claude.com/docs/en/approvals.md) who has to approve a pull request and when Claude may approve it. Look up its keys here, how its rules combine, and how approvals are counted.
> [!TIP]
>
> To set up Approvals and require the **Claude Approvals** check, see [Set up Claude Approvals](https://code.claude.com/docs/en/approvals-setup.md). To find out what a check's title means, see [Work with Claude Approvals on a pull request](https://code.claude.com/docs/en/approvals-pull-requests.md). For a file that the check refuses, see [Fix a policy file that Approvals refuses](https://code.claude.com/docs/en/approvals-troubleshooting.md#fix-a-policy-file-that-approvals-refuses). To define a `repo/<name>` classifier, see [Claude Approvals classifiers](https://code.claude.com/docs/en/approvals-classifiers.md).
## How a policy file works
A policy file is a list of rules. Each rule names the files that it's about, in `paths`, and says what a pull request that changes them needs:
* **`seats`**: how many people have to approve
* **`claude`**: whether Claude `approves`, `comments`, or `blocks`
* **`override`**: another verdict, which replaces the rule's own while its `if` is true
This policy file is the one that [Set up Claude Approvals](https://code.claude.com/docs/en/approvals-setup.md#let-claude-approve-when-code-review-passes) starts from. It asks for two people to approve a change, or one person when Claude's review passes. In both cases, the pull request's author can count as one person:
```yaml theme={null}
# .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 }
```
Each line of that file does one job:
| Line | What it does |
| :- | :- |
| [`mode: observe`](#top-level-keys) | The **Claude Approvals** check shows what the rules would decide. Delete the line to enforce them |
| `purpose` | Says why the rule exists |
| [`paths: ["**"]`](#paths) | The first rule matches every file |
| [`verdict`](#verdict) | Two people have to approve, and [the author can count as one](#whether-a-pull-request’s-author-counts). Claude comments and doesn't approve |
| [`override`](#override) | While [`claude/code_review`](https://code.claude.com/docs/en/approvals-classifiers#classifiers-anthropic-provides) reads `pass`, one person, who can be the author, is enough and Claude can approve |
| `paths: ["**/.claude/**"]` | The second rule matches the files under any `.claude/` directory, which include the policy file |
| [`nested: inherit`](#policy-files-in-subdirectories) | Once you enforce the policy, keeps the second rule in force in subdirectories that have their own policy file |
A file under `.claude/` matches both rules. Approvals [takes the strictest of the verdicts that apply](#how-rules-combine-into-one-verdict), so once you enforce the policy, a change to that file needs two people, because the second rule has no `override`.
## Where to put a policy file
Save the policy file as `.claude/approvals.yml` in your repository's root, and merge it into the default branch. Approvals reads policy files from the default branch, so the file's rules apply once it's merged.
You can also name the file `.claude/approvals.yaml`, which Approvals reads where the `.yml` file is absent. To give a directory rules of its own, add [a policy file there](#policy-files-in-subdirectories).
### When a change to a policy file takes effect
While a change to a policy file is in an open pull request, Approvals can check the changed file for errors, and applies none of its rules. The rules on the default branch decide for that pull request.
Once the change merges, new pull requests get the new rules, and open ones get them from their next evaluation. Approvals can read the earlier copy for a few minutes more. To evaluate an open pull request now, comment [`@claude approvals rerun`](https://code.claude.com/docs/en/approvals-pull-requests#comment-commands-for-approvals).
### Policy files in subdirectories
To give a directory its own rules beside the root policy file, add a `.claude/approvals.yml` inside it, such as `services/billing/.claude/approvals.yml`.
For each changed file, Approvals walks up from that file's directory. The first enforcing policy file that covers the changed file, and in which a rule with a `verdict` [applies](#how-rules-combine-into-one-verdict), decides for it. A `nested: inherit` rule in a policy file higher up counts as one of the deciding policy file's rules.
* **The nearest policy file decides**: it can ask for less than the root policy file. Above it, only rules marked `nested: inherit` still count.
* **`paths` start at the directory**: in `services/billing/.claude/approvals.yml`, write `api/**` to match the files under `services/billing/api/`
* **`locals` reach down**: in a policy file, you can use the locals of the policy files above it
* **Each policy file has its own `mode`**: while the root policy file observes, none of its rules count under a directory's enforcing policy file, the `nested: inherit` rules included
* **Some custom classifiers go only under `advisory`**: that's a classifier whose [`tools`](https://code.claude.com/docs/en/approvals-classifiers#tools) list `reviewers` or `labels`, or that has an [input](https://code.claude.com/docs/en/approvals-classifiers.md#inputs) with no `merge`. List it in an enforced rule with no `if`. If a rule reads its result, the check on pull requests under a directory's policy file can read **Cannot evaluate: classifier outside advisory**
## Top-level keys
Approvals refuses a file that has an unknown key. Write keys, and fixed words such as `observe` and `approves`, in lower case. Put double quotes around every purpose, pattern, condition, and `"!"` item.
Keep the file to one YAML document, quote each `!` item, and indent with spaces, or Approvals refuses the file. Anchors, aliases, and `!!` tags draw a warning.
Write these keys at the top level of the file:
| Key | Required | Values | Default | Description |
| :- | :- | :- | :- | :- |
| `version` | Yes | `1` | | The schema version, as a bare number |
| `rules` | Yes | List of [rules](#rule-keys) | | Rule order doesn't matter |
| `mode` | No | `enforce`, `observe` | `enforce` | `observe` shows what the rules would decide and holds for every rule in the file. For the checks that still aren't neutral, and for pull requests into other branches, see [Approvals in observe mode](https://code.claude.com/docs/en/approvals-pull-requests.md#approvals-in-observe-mode) |
| `nested` | No | `overwrite`, `inherit` | `overwrite` | The default for this file's rules. See [Policy files in subdirectories](#policy-files-in-subdirectories) |
| `run` | No | `sequential`, `parallel` | `sequential` | The default for this file's rules. See [When a classifier runs](https://code.claude.com/docs/en/approvals-classifiers.md#when-a-classifier-runs) |
| `locals` | No | Map of names to values | | Values to reuse. See [`locals` and `use`](#locals-and-use) |
## Rule keys
Give each rule a `purpose`, `paths`, and at least one of `verdict`, `advisory`, `findings`, and `reuse`. If `reuse` is the only one of the four that a rule has, the value of `reuse` has to be `false` or name a classifier. A rule with no `verdict` asks nobody and [covers](#how-rules-combine-into-one-verdict) no file.
You can write these keys on a rule:
| Key | Type | Default | Description |
| :- | :- | :- | :- |
| `purpose` | One line of text | Required | Why the rule exists |
| [`paths`](#paths) | List of patterns | Required | The changed files that the rule matches |
| [`verdict`](#verdict) | Map | | What Claude does and who has to approve |
| [`if`](#if) | Condition | `true` | The rule applies only while the condition is true |
| [`override`](#override) | List | | Other verdicts, each under a condition |
| [`advisory`](#advisory) | List of classifiers | | Classifiers that run and decide nothing |
| [`reuse`](#reuse) | Condition or map | Keep nothing | What still counts after a push that changes the diff |
| [`findings`](#findings) | Map | No list | Who may close a classifier's finding |
| [`use`](#locals-and-use) | List of `"@name"` | | Locals whose keys are copied into the rule |
| `mode` | `enforce`, `observe` | The file's | A rule that observes neither [applies nor covers](#how-rules-combine-into-one-verdict) a file |
| `nested` | `overwrite`, `inherit` | The file's | `inherit` keeps the rule in force under the policy files below |
| `run` | `sequential`, `parallel` | The file's | Whether the rule's own classifiers start in turn or together |
### `paths`
Write each pattern as a path from the directory that holds the `.claude` folder. A moved file counts at its old path and its new one.
| Pattern | Matches |
| :- | :- |
| `*` | Any characters within one folder |
| `**` | Any number of folders, dot folders too. It has to be a whole segment, as in `**/*.go` |
| `{a,b}`, `[ab]`, `?` | Alternatives, one character of a set, and any one character |
| `infra/**` | Every file in the folder. A bare `infra` matches no file in it |
| `*.md` | Markdown files beside the policy file's `.claude` folder. For any depth, write `**/*.md` |
| `"!docs/**"` | Takes the files out of this rule only. A rule needs at least one pattern with no `!` |
### `if`
Write a condition as `true`, `false`, or one double-quoted string with a fact's or a classifier's name on the left, such as `"pr/files_changed > 50"`. When you give a rule an `if`, keep another rule with no `if` on the same paths. While the `if` is false, the rule that has it doesn't apply. Where rules cover a file and none applies, [the Claude Approvals check fails](#how-rules-combine-into-one-verdict).
* **Operators**: `=`, `!=`, `<`, `<=`, `>`, `>=`
* **Joining**: `AND` and `OR` in capitals. Use parentheses to mix the two.
* **Lists**: write `ANY` or `ALL` before `pr/authors` and `pr/approved_by`. Where the condition leads to a lighter verdict, use `ALL`: with `ANY`, one listed author relaxes the rule for everyone else's commits. Where it leads to a stricter one, use `ANY`: with `ALL`, one unlisted author switches it off.
* **Quotes**: single quotes around a login or a branch pattern, and none around a team, a `bot:` name, or a fact, as in `"ALL pr/authors = ['ana-acme', acme/payments]"`
* **Classifiers**: `claude/code_review = pass`, `repo/change_risk <= medium`, and the other forms under [Read a classifier's answer from a rule](https://code.claude.com/docs/en/approvals-classifiers.md#read-a-classifier’s-answer-from-a-rule)
A fact comes from the pull request itself:
| Fact | Example | Holds |
| :- | :- | :- |
| `pr/files_changed`, `pr/files_added`, `pr/files_removed` | `"pr/files_changed > 50"` | Counts over the whole pull request |
| `pr/diff_lines` | `"pr/diff_lines <= 20"` | Changed lines in the whole pull request |
| `rule/files_changed`, `rule/files_added`, `rule/files_removed` | `"rule/files_changed = pr/files_changed"` | Counts among the files that this rule's `paths` match |
| `pr/authors` | `"ALL pr/authors = bot:dependabot"` | Accounts that wrote or pushed a commit, and the account that opened the pull request |
| `pr/opened_by` | `"pr/opened_by = acme/release"` | The account that opened the pull request. After someone else pushes to a bot's pull request, an override on `pr/opened_by = bot:dependabot` stops lowering what the rule asks for |
| `pr/approved_by` | `"ANY pr/approved_by = acme/security"` | People with write access who approved the current diff. Authors and bots aren't among them. Also takes `= empty` and `!= empty` |
| `pr/base` | `"pr/base = 'release/**'"` | The branch that the pull request targets |
### `verdict`
A `verdict` says what Claude does and who has to approve. In a rule's `verdict`, write `claude`, and write `seats` unless `claude` is `blocks`.
| Field | Values | Description |
| :- | :- | :- |
| `claude` | `approves`, `comments`, `blocks` | `approves`: Claude can post an approving review once the **Claude Approvals** check passes, if [every rule that applies says so and every changed file is covered](#how-rules-combine-into-one-verdict). The field starts no review, so where the rule reads no classifier, Claude can approve a change that no review has read. `comments`: Claude doesn't approve. `blocks`: the check fails, whoever approves |
| `seats` | `0` to `16`, or a list of up to eight sets | How many [people](#how-people’s-approvals-are-counted) have to approve. A number `N` is short for `[{ count: N, from: humans }]`. Refused beside `blocks` |
| `max_age` | A whole number and `s`, `m`, `h`, or `d`, from `1m` to `83d` | How long an evaluation's results count. After that, the check fails with the title **Results are older than the policy allows** |
Give each set in `seats` a `count`, from `1` to `16`, and a `from`, which is a [people list](#people-lists). Every set has to be filled, and one person can fill a seat in several sets.
### People lists
A people list names accounts. Write one as a set's `from` under [`seats`](#verdict), or under [`findings`](#findings), as one item or as a list in brackets. Only accounts with write access to the repository count.
| Item | Means |
| :- | :- |
| `humans` | Every person, authors included. A machine user, which is a user account that a script or an agent drives, counts as a person. The `claude` user account, which Claude's cloud sessions commit as, doesn't |
| `bots` | Every bot and GitHub App, Claude's apps and `github-actions` included |
| `everyone` | `humans` and `bots` together. Write it alone, with no brackets |
| `nobody` | Nobody. Write it alone, under `findings` only |
| `ana-acme` | One login. In a condition, put it in single quotes |
| `acme/payments` | A team of the repository's GitHub organization |
| `bot:dependabot` | One bot, with no `[bot]` suffix. `bot:claude` means Claude's apps |
| `pr/authors`, `pr/opened_by` | The accounts that the fact holds |
| `"!pr/authors"` | Takes accounts away. Quote it, and put it beside an item with no `!` |
If a set's `from` admits Claude, for example through `bots`, `everyone`, or `bot:claude`, and every rule that applies says `approves`, Approvals counts a seat in that set as filled before Claude approves. The **Claude Approvals** check can then pass with no person's approval.
### `override`
An override changes its rule's verdict while the override's own `if` is true. Approvals reads the `override` list from the top, and the first true override applies.
| Key | Required | Description |
| :- | :- | :- |
| `if` | Yes | A [condition](#if) |
| `verdict` | At least one of these three | Each field that it writes replaces the rule's. `seats` is replaced as a whole |
| `reuse`, `findings` | At least one of these three | Replaces the rule's whole value |
| `purpose`, `use` | No | As on a rule. Here `use` can copy `verdict` and `findings` |
When an override's `if` reads a classifier, the **Claude Approvals** check waits for the classifier's run:
* **The run is still going**: the check stays in progress. It can finish early when the approvals already meet every verdict that the rule could still pick, unless the classifier's `tools` list [`reviewers`](https://code.claude.com/docs/en/approvals-classifiers#reviewers). With a policy file in a subdirectory, [list such a classifier only under `advisory`](#policy-files-in-subdirectories)
* **The run ended with no answer**: reading stops at that override, and the rule's own `verdict` applies. Put the strict verdict on the rule for this reason.
* **You want to catch a missing answer**: put an override on `= error` or `= incomplete` above the ones that read the answer
In a rule's own `if`, a comparison with no answer fails the check, whoever approves, unless another part of the condition settles it.
### `advisory`
Under `advisory`, list classifier names or calls, such as `[claude/code_review, repo/change_risk]`. A `repo/` classifier listed here [can run](https://code.claude.com/docs/en/approvals-classifiers.md#when-a-classifier-runs), and each run is billed. List it in a rule that has a `verdict`.
To keep Code Review's automatic reviews, list `claude/code_review` here, or read it in an `if`, in a rule that has a `verdict` and matches the files you want reviewed.
### `reuse`
`reuse` says which earlier approvals and classifier answers continue to count after a push that changes the diff, under a condition that usually reads [`claude/diff`](https://code.claude.com/docs/en/approvals-classifiers#classifiers-anthropic-provides).
When `claude/diff`'s answer is at most `same_intent` and Claude's review of the new commit passes, this example can keep people's approvals:
```yaml theme={null}
# in .claude/approvals.yml, on a rule
reuse:
seats: "claude/diff <= same_intent AND claude/code_review = pass"
```
Write `reuse` in one of these forms:
| Form | Can keep |
| :- | :- |
| `seats: <condition>` | People's approvals |
| `<classifier>: <condition>` | That classifier's earlier answer |
| `reuse: <condition>` | Both: the seats and the classifiers that the rule reads |
| `false` | Nothing. `unset`, in an override, removes the rule's value |
Before you rely on `reuse`, check these cases:
* **Every rule that matches the files**: write `reuse` on each of them
* **When `claude/diff` gives no answer**: a condition that reads it keeps nothing
* **After a dismissal or a force-push**: the example keeps no approval that GitHub dismissed, and normally none given before a force-push. `reuse` can keep them under a `seats` condition that reads `claude/diff` and no other classifier, such as `"claude/diff <= same_intent"`.
* **Earlier authors count too**: where `reuse` keeps `seats`, people who held the [author's seat](#whether-a-pull-request’s-author-counts) at an earlier commit can continue to count. Two of them can fill `seats: 2` with nobody approving. To prevent that, exclude authors from the set with `"!pr/authors"`.
* **Files that a push left alone**: in a policy file that writes `reuse`, an approval can outlast a push to other files only. Those can be files that no rule covers, or whose rules couldn't count that person. An approval that GitHub dismissed normally doesn't
### `findings`
A classifier can report findings as review threads, and a condition can read their severity as `.severity`. Use `findings` to say who may close a finding, by resolving its thread or with [`@claude approvals resolve`](https://code.claude.com/docs/en/approvals-pull-requests#comment-commands-for-approvals).
Until a rule's `findings` lists who may close findings, a person's resolve alone doesn't lower `.severity`. A classifier needs no list to close its own finding, as Code Review can when a later review finds it fixed.
This example lets the `acme/leads` team, less the pull request's authors, close Code Review's findings:
```yaml theme={null}
# in .claude/approvals.yml, on a rule with no if, beside verdict
findings:
resolution:
claude/code_review: [acme/leads, "!pr/authors"]
```
Under `findings`, write `resolution` with one of these values:
| Value | Meaning |
| :- | :- |
| A [people list](#people-lists) | One list for every classifier's findings. `resolution: humans` lets people with write access close them, the author included |
| A map of classifier names to lists | A list for each classifier |
| A list of sets, each `{ if, from }` | Each `if` can read `finding/severity`, as in `{ if: "finding/severity >= high", from: acme/leads }`. Where each `if` reads `finding/severity` alone, the first set whose `if` is true decides. End with a set that has no `if` |
| `nobody` | No person's resolve alone closes a finding. A classifier can close its own findings |
To let people close findings, put a list on a rule that has no `if` and covers the finding's file. Put that rule in the [policy file that decides](#policy-files-in-subdirectories) for the file. For a resolve alone to count, every list that applies to that file has to admit the person who resolves.
A failed `claude/code_review` is one answer for the whole pull request. Check every changed file under a rule that compares that answer, as in `claude/code_review = pass`:
* **Every file's lists admit the person who resolves**: once every Important finding of the review is closed, it can read `pass`, with no new review
* **One file's lists don't admit the person who resolves, or that file has `nobody` or no list**: that person's resolve leaves the review `fail`. Write a list for that file that admits the person.
Closing a finding changes no code, so people can lower `.severity` and pass a failed review with nothing fixed. Keep the lists short.
### `locals` and `use`
To reuse a value, name it under `locals` at the top of the policy file. Then write `"@name"` where the value belongs, or copy a whole map into a rule with `use`.
In this example, `payments_owner` names one set of people, and `strict` names a whole verdict that the first rule copies with `use`:
```yaml theme={null}
# .claude/approvals.yml
version: 1
locals:
payments_owner: { count: 1, from: [acme/payments, "!pr/authors"] }
strict:
verdict: { claude: comments, seats: [{ count: 2, from: humans }, "@payments_owner"] }
rules:
- purpose: "The payments API takes two people, one of them a payments owner."
paths: ["services/payments/api/**"]
use: ["@strict"]
- purpose: "Everything else takes two people."
paths: ["**"]
verdict: { claude: comments, seats: 2 }
```
Check what a local can hold and where you can use it:
* **What a local holds**: text, a number, `true` or `false`, a list, or one map
* **Where `"@name"` can stand**: for the whole of `paths`, a people list, `seats`, `verdict`, or `override`, and for one item of `paths`, a people list, or `seats`. Inside a condition it takes no quotes of its own, as in `"pr/files_changed > @many"`.
* **What `use` copies**: `verdict`, `override`, `if`, `paths`, `reuse`, `advisory`, and `findings`. What the rule writes itself wins: key by key inside `verdict`, `findings`, and a `reuse` map, and whole for any other key.
## How rules combine into one verdict
Approvals takes the strictest of the verdicts that apply: `blocks` outranks `comments`, which outranks `approves`, and every rule's seats have to be filled. Which verdicts apply turns on whether a rule matches, applies to, or covers a changed file:
* **Matches**: a rule matches a changed file when its `paths` include the file and no `"!"` item takes it out
* **Applies**: a rule applies to a changed file when it matches, its [`mode`](#rule-keys) is `enforce`, and its `if` is true or absent
* **Covers**: a rule covers a changed file when it matches, its `mode` is `enforce`, and it has a `verdict`, whatever its `if` says
Cut at 300 lines. The page has the rest.
approvals-pull-requests New page · 130 lines, new page
# Work with Claude Approvals on a pull request ## Get your pull request through Claude Approvals ## Find your approval status and what to do next ### Approvals waits for people ### Approvals waits for Code Review or a classifier ### A rule or a policy file keeps Approvals from passing ### Approvals passed or nothing ran ## Approvals in observe mode ## Comment commands for Approvals ## Pull requests from Claude, forks, and outside contributors ### Pull requests that Claude opens ### Pull requests from forks and outside contributors ## Related resources
A whole new page. There's nothing to diff it against, so here is what it says.
# Work with Claude Approvals on a pull request > Find what a Claude Approvals check title means and what to do next, use the comment commands, and handle pull requests from Claude and from forks Where [Claude Approvals](https://code.claude.com/docs/en/approvals.md) is on, it adds a check named **Claude Approvals** to the pull requests that it evaluates. The check reports who still has to approve the pull request, following a [policy file](https://code.claude.com/docs/en/approvals-policy.md) in the repository. Where your repository requires the check, GitHub can block the merge until it passes. If your pull request has no check, for example because it's a draft, see [No Claude Approvals check appeared](https://code.claude.com/docs/en/approvals-troubleshooting.md#no-claude-approvals-check-appeared). ## Get your pull request through Claude Approvals Approvals evaluates your pull request after events such as a push or an approval. It reports the result in two places on the pull request: * **The Claude Approvals check**: in the list of checks at the bottom of the **Conversation** tab. The text beside its name, called its title, gives the approval status, such as **Waiting on human review from any person (1/2)** * **Claude's comment**: in the conversation, with the reasons for the result. Approvals edits the same comment as the result changes, so it stays where it first appeared To get to a passing check: 1. **Read the approval status**: the check's title says where your pull request stands, for example who still has to approve 2. **Do what the status calls for**: [find the title](#find-your-approval-status-and-what-to-do-next) to see what that is. For example, ask someone with write access to approve, fix the findings that Code Review posted, or wait for a review to finish 3. **Read the status again**: the title can change at the next evaluation, such as when someone approves or you push. After a push that changes the diff, [earlier approvals can stop counting](https://code.claude.com/docs/en/approvals-policy.md#earlier-approvals-after-a-new-push) 4. **Merge**: once the check passes, merge as your repository's GitHub rules allow. Where the policy allows it, Claude can also post an approving review ## Find your approval status and what to do next The **Claude Approvals** check gives your pull request's approval status in its title, the text beside its name in the list of checks. Find your check's title in these tables to see what it means and what to do next. For a title that isn't here, open the **Claude Approvals** check's summary, which gives the cause and the next step. To find who maintains the policy file, `.claude/approvals.yml`, see who last changed it on the default branch. ### Approvals waits for people With these titles, Approvals is waiting for a person. Outside observe mode, GitHub lists the **Claude Approvals** check among its pending checks, marked **Action required**. | Title | What to do | | :- | :- | | **Waiting on human review from any person (1/2)** | Ask someone with write access to approve. The numbers are the approvals counted so far and the approvals that the policy asks for, and the author usually [counts as one](https://code.claude.com/docs/en/approvals-policy.md#whether-a-pull-request’s-author-counts) already. In place of "any person", the title can name the people or the team that a rule asks for, or name nobody | | **Changes requested** | Have the reviewer who requested changes approve, or have a person dismiss their review | | **Claude's approval still stands; dismiss it** | [Dismiss Claude's review](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/dismissing-a-pull-request-review), or ask someone who may dismiss reviews on the branch. GitHub didn't let Approvals dismiss it | ### Approvals waits for Code Review or a classifier With these titles, Approvals is waiting for an answer from [Code Review](https://code.claude.com/docs/en/code-review-pull-requests.md) or a [classifier](https://code.claude.com/docs/en/approvals-classifiers.md), or didn't get one: | Title | What to do | | :- | :- | | **Waiting for Code Review**, **Waiting for repo/change\_risk**, **Waiting for classifiers** | Nothing yet | | **A classifier had no result**, **A classifier has not run**, or a name in place of "A classifier", as in **repo/change\_risk has not run** | [Rerun the Claude Approvals check](#comment-commands-for-approvals). See [when a run gives no answer](https://code.claude.com/docs/en/approvals-classifiers.md#what-a-rule-sees-when-a-classifier-run-gives-no-answer) | ### A rule or a policy file keeps Approvals from passing With these titles, a rule holds the pull request, no rule applies to a changed file, or a policy file can't be used: | Title | What to do | | :- | :- | | **Held by Code Review's findings** | Fix the findings that Code Review posted on the pull request, then push. If the policy's [`findings`](https://code.claude.com/docs/en/approvals-policy#findings) list names you, you can resolve the findings' threads. If the **Claude Approvals** check doesn't pass after you resolve them, push a fix | | **Held by** and a rule's purpose in quotes, **Held by a policy rule** | Ask whoever maintains the policy file what the rule in the check's summary needs, then push a fix | | **No rule applies to** and a file's name in quotes, **No rule applies to a changed file** | Ask whoever maintains the policy file for a rule with no `if` that covers the file. Rerun the check once that rule merges | | **This change breaks a policy file**, **Default branch policy file cannot be used** | [Fix the policy file](https://code.claude.com/docs/en/approvals-troubleshooting.md#fix-a-policy-file-that-approvals-refuses) | A failed Code Review from an earlier commit can still hold the check after you push a fix. If no new review starts, post a new comment with only [`@claude review`](https://code.claude.com/docs/en/code-review-pull-requests#comment-commands), which takes write access. ### Approvals passed or nothing ran With these titles, Approvals passed or didn't evaluate the pull request: | Title | What to do | | :- | :- | | **Passed; no approval from Claude** | If GitHub requires an approval, ask a person | | **Nothing ran, not blocking: no file is covered** | Nothing. If someone should review the files that the pull request changes, ask whoever maintains the [policy file](https://code.claude.com/docs/en/approvals-policy.md) to cover them | | **Observe mode ended: not evaluated yet** | Push a commit or [rerun the Claude Approvals check](#comment-commands-for-approvals). If it passes, a pull request with auto-merge on or in a merge queue can merge at once | Under **Passed; no approval from Claude**, Claude posts no approval in cases such as these: * A rule says `claude: comments` * A changed file has no rule, or is a [symlink, submodule pointer, or `.gitattributes` file](https://code.claude.com/docs/en/approvals-policy#protected-files) * `claude[bot]` opened the pull request, unless the [Claude Approvals GitHub App](#pull-requests-that-claude-opens) is installed and linked ## Approvals in observe mode In observe mode, the **Claude Approvals** check ends neutral, which GitHub counts as passing, with a title that starts **(observe mode)**. The check isn't neutral in cases such as these: | Case | What the check does | | :- | :- | | The pull request changes a policy or classifier file | It can wait for one person, who can be the author. It fails if the change breaks one of those files | | The default branch's policy file can't be used | It fails until you [fix the policy file](https://code.claude.com/docs/en/approvals-troubleshooting.md#fix-a-policy-file-that-approvals-refuses) | | The title says Withheld | Approvals holds back a passing check, for example because another open pull request has the same latest commit. The check's summary says what clears it | | The pull request targets another branch than the default | No check appears, unless the pull request changes a policy or classifier file | ## Comment commands for Approvals To use a command, post it as a new comment on the pull request. You need write access to the repository. A 😕 reaction on your comment means that the command wasn't carried out in full. | Command | What it does | | :- | :- | | `@claude approvals rerun` | Evaluates the latest commit again. Classifiers can run again, and are billed. Put it alone on the comment's first line. On a fork's pull request, [read the change first, then add the latest commit's full SHA and make that the comment's only text](#pull-requests-from-forks-and-outside-contributors) | | `@claude approve` | Can count as your approval of the latest commit, for the **Claude Approvals** check. To name a commit, add its full SHA, which a pull request from a fork requires. Make it the comment's only text | | `@claude approvals resolve <ids>` | Can close the findings with those IDs, if the policy's [`findings`](https://code.claude.com/docs/en/approvals-policy#findings) list names you. Put it alone on the first line, with one to eight finding IDs such as `f-1a2b3c4d` | Approvals can also act on `@claude approvals rerun` from a GitHub App's bot account. That comment starts an evaluation, where classifiers can run and are billed, and doesn't vouch for a [fork's commit](#pull-requests-from-forks-and-outside-contributors). Comment `@claude approve` on your own pull request when the check's summary says that you [don't count as an approval](https://code.claude.com/docs/en/approvals-policy.md#whether-a-pull-request’s-author-counts). To withdraw that approval, edit or delete each of your `@claude approve` comments. Approvals doesn't count an edited comment as an approval, so to approve again, post a new comment. ## Pull requests from Claude, forks, and outside contributors A pull request that `claude[bot]` opened needs a second GitHub App before Claude can approve it. A pull request from a fork, or from a person without write access, can need a maintainer. ### Pull requests that Claude opens GitHub doesn't let the account that opened a pull request approve it. Without a second app, Claude gives no approval on a pull request that `claude[bot]` opened, and the **Claude Approvals** check can pass with the title **Passed; no approval from Claude**. To get Claude's approval on those pull requests, add a second app: 1. **Install it**: ask an owner of your GitHub organization to install the [Claude Approvals GitHub App](https://github.com/apps/claude-approvals/installations/new) on the repository. 2. **Link it**: [link the app to your Claude organization](https://claude.ai/settings/claude-approvals/github/finish). That takes someone who is an owner of the GitHub organization and an Owner or Primary Owner of the Claude organization. If nobody is both, contact [Anthropic support](https://support.claude.com). Then [rerun the check](#comment-commands-for-approvals) on an open pull request that `claude[bot]` opened. Leave the required check's source as it is, because the [Claude GitHub App](https://github.com/apps/claude) still reports the check. ### Pull requests from forks and outside contributors Approvals can't confirm that someone with write access pushed a fork's commits. On a fork's pull request, Approvals can wait for a maintainer, meaning someone with write access: * **Until a maintainer vouches for a commit**: no classifier's answer counts, Code Review's included. Where a rule depends on one, the **Claude Approvals** check's title can read **No classifier result counts on this commit**. * **To vouch for a commit**: outside observe mode, if you have write access, read the change. Then comment `@claude approvals rerun` followed by the latest commit's full SHA, as the comment's only text. Classifiers can then run for that commit. With no SHA, the command can cover the commit that was latest when you commented. * **A pass waits for a maintainer**: outside observe mode, where a rule covers a changed file, the check also needs approval from someone with write access who didn't open the pull request. That applies to a fork's pull request, and to one that a person without write access opened. Until then, Claude doesn't approve * **A rule with `"!pr/authors"`**: no approval counts toward it on a fork's pull request, and once someone approves, the check's title can read **Cannot tell who wrote this change**. The check's summary says what whoever maintains the policy file can change ## Related resources * [Claude Approvals](https://code.claude.com/docs/en/approvals.md): what a policy is and what it affects * [Troubleshoot Claude Approvals](https://code.claude.com/docs/en/approvals-troubleshooting.md): when no check appears, or the check doesn't pass * [Claude Approvals policy file reference](https://code.claude.com/docs/en/approvals-policy.md): the keys that a check's summary names
approvals-setup New page · 194 lines, new page
# Set up Claude Approvals ## Prerequisites ## Plan your first policy ### Let Claude approve when Code Review passes ### Keep two people on each change ## Turn on Approvals in observe mode ## Enforce your policy and require Claude Approvals ### Decide which files and branches to protect ### Switch from observe mode to enforcement ### Set the source that GitHub accepts for Claude Approvals ## Control what Approvals spends ### What Approvals costs ### Limit what a policy costs ## Turn off Approvals ### Ways to turn off Approvals ## Related resources
A whole new page. There's nothing to diff it against, so here is what it says.
# Set up Claude Approvals
> Turn on Claude Approvals in a GitHub repository: start in observe mode, enforce the policy, require the check, limit what it spends, and turn it off
[Claude Approvals](https://code.claude.com/docs/en/approvals.md) is a check on GitHub pull requests that reports who still has to approve. To turn it on in a repository, commit a [policy file](https://code.claude.com/docs/en/approvals-policy.md) at `.claude/approvals.yml` in the repository's root, on its default branch. Once the file is on the default branch, Approvals can start [billing](#what-approvals-costs).
## Prerequisites
Setting up and enforcing Approvals takes each of these:
* A Claude organization that [qualifies](https://code.claude.com/docs/en/approvals.md#availability), with [usage credits](https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans) to pay for the model runs that a policy starts
* The [Claude GitHub App](https://github.com/apps/claude), installed on the repository and [linked to your Claude organization](https://code.claude.com/docs/en/admin-setup.md#connected-github-accounts)
* Permission to merge into the default branch
* Admin access to the repository on GitHub, to require the **Claude Approvals** check. A private repository also needs a [paid GitHub plan](https://docs.github.com/en/get-started/learning-about-github/githubs-plans)
* Two people with write access, before you enforce either policy on this page. With only one, the check can't pass on a change under `.claude/`, or where Claude's review fails or gives no result. Under the policy that [keeps two people on each change](#keep-two-people-on-each-change), it can't pass on any change
## Plan your first policy
A [policy file](https://code.claude.com/docs/en/approvals-policy.md) tells Approvals who has to approve a pull request. For your first one, decide whether Claude can approve, then copy the starter policy that matches:
* **[Let Claude approve when Code Review passes](#let-claude-approve-when-code-review-passes)**: a pull request that passes Claude's review usually needs no approval from another person
* **[Keep two people on each change](#keep-two-people-on-each-change)**: a pull request usually needs one person besides the author, and Claude doesn't approve
Both policies start in observe mode, where the **Claude Approvals** check shows what the policy would decide, Claude doesn't approve, and the check [normally counts as passing](https://code.claude.com/docs/en/approvals-pull-requests.md#approvals-in-observe-mode).
Both also name `claude/code_review`. Keep it in your policy file. Once the file is on the default branch, in observe mode or enforced, automatic Code Reviews normally stop where no matching rule names it.
### Let Claude approve when Code Review passes
Once this starter policy is enforced, a pull request that passes Claude's review usually needs no approval from another person, except for changes under `.claude/`. Other pull requests usually need one person [besides the author](https://code.claude.com/docs/en/approvals-policy.md#whether-a-pull-request’s-author-counts).
In this policy, the first rule asks for two people on a change. Its `override` lowers that to one and lets Claude approve when `claude/code_review` reads `pass`. The second rule asks for two people on a change under `.claude/`:
```yaml theme={null}
# .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 }
```
This policy can start a billed Code Review at each push, and observe mode is billed. If your [Code Review settings](https://code.claude.com/docs/en/code-review-setup.md#set-when-reviews-run) ask for fewer reviews, the policy adds to them.
### Keep two people on each change
This starter policy asks for two people on each change. Once the policy is enforced, a pull request usually needs one person besides the author, and Claude doesn't approve.
In this policy, both rules ask for two people. The first rule lists `claude/code_review` under [`advisory`](https://code.claude.com/docs/en/approvals-policy#advisory), so reviews follow your Code Review settings:
```yaml theme={null}
# .claude/approvals.yml
version: 1
mode: observe
rules:
- purpose: "A change takes two people."
paths: ["**"]
verdict: { claude: comments, seats: 2 }
advisory: [claude/code_review]
- purpose: "A change to the review rules takes two people."
paths: ["**/.claude/**"]
nested: inherit
verdict: { claude: comments, seats: 2 }
```
## Turn on Approvals in observe mode
Add your policy file in a pull request of its own, then open a second pull request to see the **Claude Approvals** check:
**1. Add the policy file**
In a pull request of its own, from a branch in the repository, add the policy at `.claude/approvals.yml` in the repository's root.
**2. Merge the pull request**
Merge when Claude comments that it "found the policy file in this change valid". If the file is invalid, a failed check titled **This change breaks a policy file** appears. [Fix it](https://code.claude.com/docs/en/approvals-troubleshooting.md#fix-a-policy-file-that-approvals-refuses) in this pull request.
**3. Open another pull request**
Open one into the default branch that isn't a draft. A **Claude Approvals** check appears with a title that starts **(observe mode)**.
If nothing appears, see [No Claude Approvals check appeared](https://code.claude.com/docs/en/approvals-troubleshooting.md#no-claude-approvals-check-appeared).
## Enforce your policy and require Claude Approvals
Enforce the policy once the **Claude Approvals** check titles that you see in observe mode match what your reviewers decide. From then on, the check can block a merge, and [Claude can approve](https://code.claude.com/docs/en/approvals-github-rules.md#merges-without-human-review) where the policy allows it.
### Decide which files and branches to protect
Before you [switch your policy from observe mode to enforcement](#switch-from-observe-mode-to-enforcement), decide which files need a person, which branches the check gates, and when to change GitHub's required approvals:
* **Files**: decide which ones need a person's approval whatever Claude finds, then copy [this rule](https://code.claude.com/docs/en/approvals-github-rules.md#ask-for-a-person-who-isn’t-an-author) and narrow its `paths`
* **Branches**: an enforced policy also covers pull requests into branches other than the default branch, so list each branch whose merges the **Claude Approvals** check should gate. On those branches, a pull request with no covered file gets no check, so a required check waits
* **GitHub's required approvals**: [change the number of approvals that GitHub requires](https://code.claude.com/docs/en/approvals-github-rules.md#required-reviews-and-codeowners) only after the last step of the switch
### Switch from observe mode to enforcement
A policy file's [`mode`](https://code.claude.com/docs/en/approvals-policy#top-level-keys) is one of these:
* **`observe`**: the **Claude Approvals** check shows what the policy would decide, Claude doesn't approve, and the check [normally counts as passing](https://code.claude.com/docs/en/approvals-pull-requests.md#approvals-in-observe-mode)
* **`enforce`**: the check can block a merge, and Claude can approve where the policy allows it. This is the default, so a policy file with no `mode` line is enforced
To enforce your policy, follow these steps. After the first step, an open pull request can keep a check that GitHub counts as passing until you rerun Approvals on it. Keep open pull requests out of the merge queue until you have rerun Approvals on them in step 2.
**1. Delete the mode: observe line**
Delete `mode: observe` and merge that change.
**2. Rerun Approvals on open pull requests**
Five minutes after the merge, comment `@claude approvals rerun` on each one whose check title starts with **(observe mode)** or **Observe mode ended**. On a pull request from a fork, [read the change first and add the latest commit's full SHA](https://code.claude.com/docs/en/approvals-pull-requests.md#pull-requests-from-forks-and-outside-contributors).
**3. Require Claude Approvals in GitHub**
For the default branch and each branch you listed, [require status checks to pass](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches#require-status-checks-before-merging) and add **Claude Approvals**. As its source, select the Claude app that reported it.
**4. Confirm that Approvals blocks a merge**
Open a pull request that changes a file under `.claude/`. When the check finishes, the title reads **Waiting on human review from any person (1/2)**, and GitHub's merge box lists the check as required.
Approvals later evaluates some of the pull requests that you didn't rerun, which can start [billed runs](#what-approvals-costs).
### Set the source that GitHub accepts for Claude Approvals
Set the required check's source to the Claude app. With **any source**, GitHub accepts a check named **Claude Approvals** from elsewhere. To set the source through GitHub's API, put the Claude app's ID, `1236702`, in `integration_id` in a ruleset or `app_id` in a branch protection rule.
## Control what Approvals spends
Approvals bills your organization's usage credits for the model runs that a policy starts, and observe mode is billed. Billing can start, and [continues, while usage credits are turned off](https://code.claude.com/docs/en/claude-ship.md#how-each-claude-ship-agent-is-billed). To keep any policy file from starting billing, an Owner can [turn off Approvals](#turn-off-approvals) for the whole organization.
### What Approvals costs
A policy with `claude/code_review` in an `if` condition can start a [billed Code Review](https://code.claude.com/docs/en/code-review-costs.md) when a pull request opens and at each push. To stop those reviews, move it from the conditions to `advisory`. When `claude/code_review` is only under `advisory`, with no [`level`](https://code.claude.com/docs/en/approvals-classifiers#read-a-classifier’s-answer-from-a-rule), reviews follow your Code Review settings.
A rule can also read other [classifiers](https://code.claude.com/docs/en/approvals-classifiers.md). For `claude/diff` and custom classifiers, each [run that calls a model](https://code.claude.com/docs/en/approvals-classifiers.md#what-a-classifier-run-costs) is billed. To limit each run of a custom classifier, set its [`budget`](https://code.claude.com/docs/en/approvals-classifiers#budget).
### Limit what a policy costs
To cap what your organization pays for the Code Reviews and classifier runs that a policy starts, set a spend limit. Set any of these limits at [**Organization settings > Usage**](https://claude.ai/admin-settings/usage), which takes an Owner role:
* **Your organization's spend limit for usage credits**: covers Approvals
* **Code Review's spend limit**: covers a policy's reviews together with Code Review's other reviews. Under **Services**, open the **Claude Code Review** row's menu and select **Edit spend limit**
* **Classifier runs' spend limit**: under **Services**, open the Approvals row's menu and select **Edit spend limit**. The row has no limit when it appears
On that page, the **Claude Code Review** row under **Services** can start without a limit:
* **The row shows a dash where the limit goes**: a monthly limit is set for you when a policy's first billed review starts. Change it once the amount shows
* **Code Review was turned on before your policy**: the row has no limit until you set one
If a reseller bills your organization, ask your reseller for a limit.
At Code Review's limit, a check that needs Claude's review can stop passing. Raise the limit or wait for the [next billing period](https://code.claude.com/docs/en/code-review-costs.md#limit-your-spend).
## Turn off Approvals
You can turn off Approvals for one repository, for a GitHub organization, or for your whole Claude organization.
> [!WARNING]
>
> Suspend or uninstall the Claude GitHub App, or unlink your GitHub organization, only after you turn off Approvals. If you do it first, new commits get no check, so a required check can block merges. GitHub can also continue to count Claude's approving reviews that are left on open pull requests.
Follow this order:
1. **Check how GitHub treats stale approvals**: where GitHub requires approvals, turn on [**Dismiss stale pull request approvals when new commits are pushed**](https://code.claude.com/docs/en/approvals-github-rules.md#required-reviews-and-codeowners). Otherwise, GitHub can continue to count Claude's approving review after a new push, until you dismiss the review in the last step.
2. **Stop requiring the check**: in GitHub, remove **Claude Approvals** from the required checks of each branch protection rule and ruleset.
3. **Turn Approvals off**: [choose how](#ways-to-turn-off-approvals), by the scope that you want.
4. **Dismiss Claude's reviews**: on open pull requests that Claude approved, dismiss that review in GitHub.
To stop the check from blocking without turning Approvals off, first stop requiring it on branches other than the default branch. Then put `mode: observe` in every policy file. The check then normally stops blocking, and classifiers still run and bill. Pull requests into those other branches get no check unless they change a policy or classifier file.
### Ways to turn off Approvals
To turn off Approvals, find the scope that you want in this table:
| Scope | How to turn off Approvals |
| :- | :- |
| One repository, without an Owner | Delete every policy file from the default branch |
| A GitHub organization, or a repository whose **Edit** dialog shows **Claude Approvals** | With an [Owner role](https://code.claude.com/docs/en/server-managed-settings.md#access-control), go to [**Organization settings > Claude Ship**](https://claude.ai/admin-settings/claude-ship), click **Edit** on its row, and turn off **Claude Approvals** |
| The whole Claude organization | With an Owner role, go to [**Organization settings > Claude Ship**](https://claude.ai/admin-settings/claude-ship) and click **Block globally** in the **Approve** row. To turn it back on, click **Allow policy files** in the same row |
What you turn off for the whole Claude organization stays off when a policy file merges later. If you're turning off Code Review too, turn off Approvals first, because a policy can start billed reviews where Code Review is off.
## Related resources
* [Claude Approvals policy file reference](https://code.claude.com/docs/en/approvals-policy.md): keys and an example policy
* [Approvals and your GitHub rules](https://code.claude.com/docs/en/approvals-github-rules.md): what can merge without a person, and who can change the policy
* [Troubleshoot Claude Approvals](https://code.claude.com/docs/en/approvals-troubleshooting.md): when no check appears, or the check refuses a policy file
approvals-troubleshooting New page · 98 lines, new page
# Troubleshoot Claude Approvals ## No Claude Approvals check appeared ### Check your pull request and policy file ### Claude left a comment and no Approvals check ### Ask an Owner to check your Claude organization ## Approvals doesn't pass after you resolve a review thread ## Approvals passed and GitHub still blocks merging ## Fix a policy file that Approvals refuses ### Policy file refusal messages ## A classifier gave no answer or its definition is refused ## Related resources
A whole new page. There's nothing to diff it against, so here is what it says.
# Troubleshoot Claude Approvals > Fix a Claude Approvals check that didn't appear or doesn't pass, a policy file that Approvals refuses, and a classifier that gives no answer [Claude Approvals](https://code.claude.com/docs/en/approvals.md) is a check on GitHub pull requests that reports who still has to approve. Start here when the check didn't appear or doesn't pass, when Approvals refuses a policy file, or when a classifier gives no answer. If the **Claude Approvals** check on your pull request has a title that isn't covered here, see [Find your approval status and what to do next](https://code.claude.com/docs/en/approvals-pull-requests.md#find-your-approval-status-and-what-to-do-next). ## No Claude Approvals check appeared When [Claude Approvals](https://code.claude.com/docs/en/approvals.md) can't run, it can post nothing at all. ### Check your pull request and policy file Start with the causes that you can check yourself: | Cause | What to do | | :- | :- | | The pull request is a draft | Mark it ready for review | | The [policy file](https://code.claude.com/docs/en/approvals-policy.md#where-to-put-a-policy-file) isn't where Approvals looks | Put it at `.claude/approvals.yml` in the repository's root, on the default branch, with `version: 1` | | Nothing has happened since the file merged | Push a commit to the pull request | | The policy is in observe mode, and the pull request targets a branch other than the default branch | Expect no check, unless the pull request changes a policy or classifier file | | The policy is enforced, and no rule covers any file that the pull request changes | See [what happens when no rule covers a file](https://code.claude.com/docs/en/approvals-policy.md#how-rules-combine-into-one-verdict) | ### Claude left a comment and no Approvals check Find the words of Claude's comment, then take the step beside them: | Comment says | What to do | | :- | :- | | Approvals "did not run on this change" | Do what the comment says. One cause is a pull request that moves a file into or out of the paths that the policy's rules cover. Make that move in two pull requests, one that adds the file under its new name and one that removes the old one | | "More than one Claude organization is connected to this GitHub account" | Ask an Owner of the Claude organization that should run Approvals to click **Connect** next to the repository's GitHub organization on [**Organization settings > Claude Ship**](https://claude.ai/admin-settings/claude-ship). Then push a commit | | "Claude Approvals can't start in this repository yet" | Tell an Owner that the organization has no usage credits available | ### Ask an Owner to check your Claude organization Ask an Owner to check each of these for your Claude organization: | What to check | Where | | :- | :- | | Whether the organization qualifies | [Availability](https://code.claude.com/docs/en/approvals.md#availability) | | Whether the [Claude GitHub App](https://github.com/apps/claude) can access the repository and is linked | [**Organization settings > Git providers**](https://claude.ai/admin-settings/source-control) | | Whether Approvals is turned off here | The **Approvals** column and the **Approve** row on [**Organization settings > Claude Ship**](https://claude.ai/admin-settings/claude-ship) | ## Approvals doesn't pass after you resolve a review thread Check whether your policy's [`findings`](https://code.claude.com/docs/en/approvals-policy#findings) list names you. If your resolve doesn't count, push a fix, or ask someone on the list to resolve the thread. ## Approvals passed and GitHub still blocks merging Read the rule that GitHub's merge box names. If it asks for a review, GitHub's branch rules require one that the policy doesn't, so have someone other than the author approve in a GitHub review. For what GitHub counts, see [Required reviews and CODEOWNERS](https://code.claude.com/docs/en/approvals-github-rules.md#required-reviews-and-codeowners). ## Fix a policy file that Approvals refuses Find the **Claude Approvals** check's title in this table: | Title | Copy at fault | Messages | What to do | | :- | :- | :- | :- | | **This change breaks a policy file** | The pull request's own | **Policy files in this change**, in the check's summary | Fix it in this pull request | | **Default branch policy file cannot be used**, **Default branch policy file must be version 1**, **Default branch policy file is too large** | The root policy file on the default branch | The check's summary | Fix it in a new pull request from a branch of this repository. Its **Policy files in this change** shows whether the new copy loads. That pull request's check fails, as every pull request's check does, in observe mode or enforced. Where the branch requires the check, ask someone who can bypass the branch rules to merge it | | **A policy file cannot be used** | A directory's policy file on the default branch | The check's summary | Fix it as you would the root policy file | After the fix merges, allow five minutes, then comment [`@claude approvals rerun`](https://code.claude.com/docs/en/approvals-pull-requests#comment-commands-for-approvals) on each open pull request whose check hasn't updated. On one from a fork, [read the change first and add the latest commit's full SHA](https://code.claude.com/docs/en/approvals-pull-requests.md#pull-requests-from-forks-and-outside-contributors). ### Policy file refusal messages One refusal makes the whole policy file unusable, and a warning fails nothing. Find the beginning of your message here: | Message | Fix | | :- | :- | | "no key of this name is read at this place" | Check the key's spelling and its level against [Top-level keys](https://code.claude.com/docs/en/approvals-policy.md#top-level-keys) and [Rule keys](https://code.claude.com/docs/en/approvals-policy.md#rule-keys) | | "this names no fact and no usable classifier" | Check the name against the [facts](https://code.claude.com/docs/en/approvals-policy.md#if). For `repo/<name>`, check that `.claude/classifiers/<name>/def.yml` loads, beside the policy file or in a directory above it | | "a condition has no NOT" | Write the opposite operator | | "no local has this name" | Define the local in this file or a policy file above it. Write a login or a team with no `@` | | "this is not YAML" | Look near the line that the message names for a quote or bracket that doesn't close, or a tab. Indent with spaces | ## A classifier gave no answer or its definition is refused To see each [classifier](https://code.claude.com/docs/en/approvals-classifiers.md) run's state and the reason for a missing answer, open **Classifier results** in Claude's comment on the pull request. If a run reached its budget, split the pull request, or raise a `time` or `cost` that is under its [maximum](https://code.claude.com/docs/en/approvals-classifiers.md#budget). Then find the **Claude Approvals** check's title here: | Title | What to do | | :- | :- | | **A classifier definition is not valid**, or **This change breaks a policy file** where a policy file names the classifier | Fix the definition in this pull request. The refusal messages are under **Policy files in this change** | | **A classifier's definition cannot be used** | Fix the definition on the default branch. A pull request that changes it shows why it's refused | | **Cannot evaluate: classifier outside advisory** | With a policy file in a subdirectory, some custom classifiers [belong only under `advisory`](https://code.claude.com/docs/en/approvals-policy#policy-files-in-subdirectories). Move the classifier there | | **repo/change\_risk reached its run limit**, with your classifier's name, or **A classifier reached its run limit** | Push a change to the diff. Or comment `@claude approvals rerun` for one more run, which can drop every classifier's result, passing ones too | ## Related resources * [Work with Claude Approvals on a pull request](https://code.claude.com/docs/en/approvals-pull-requests.md): check titles and comment commands * [Set up Claude Approvals](https://code.claude.com/docs/en/approvals-setup.md): requirements, the starter policy, and the required check * [Claude Approvals policy file reference](https://code.claude.com/docs/en/approvals-policy.md): the policy file's keys
claude-ship New page · 100 lines, new page
# Claude Ship ## Claude Ship agents ### Code Review finds problems ### PR Steward pushes fixes ### Claude Approvals applies your policy ## Set up Claude Ship ### If you already use Code Review ## Plans and billing ### Who can use Claude Ship ### How each Claude Ship agent is billed ## Turn off Claude Ship ## Related resources
A whole new page. There's nothing to diff it against, so here is what it says.
# Claude Ship > Meet the Claude Ship agents for GitHub pull requests: Code Review, PR Steward, and Claude Approvals Claude Ship is a set of agents that help get your team's GitHub pull requests ready to merge: * [Code Review](https://code.claude.com/docs/en/code-review.md): looks for issues such as logic errors, security vulnerabilities, and broken edge cases * [PR Steward](https://code.claude.com/docs/en/pr-steward.md): works on review feedback and failing checks * [Claude Approvals](https://code.claude.com/docs/en/approvals.md): checks pull requests against an approval policy that you write Together, they can take a pull request through review, fixes, and an approval decision, so your team doesn't have to manage each step manually. Your settings and GitHub branch rules determine what merges. Claude Ship is available on [Team and Enterprise plans](#who-can-use-claude-ship). To turn on the agents, go to [Set up Claude Ship](#set-up-claude-ship). > [!NOTE] > > To get a review and fixes locally, on one of your own pull requests, run [`/ship`](https://code.claude.com/docs/en/ship-command) in Claude Code. ## Claude Ship agents This diagram shows each agent's part in a pull request, and the parts that stay with you and GitHub:  > [!NOTE] > > Claude Ship uses AI and may miss bugs, security vulnerabilities, or other issues. ### Code Review finds problems [Code Review](https://code.claude.com/docs/en/code-review.md) reads a change alongside the surrounding code. Findings arrive as inline comments on the lines concerned, ranked by severity. ### PR Steward pushes fixes [PR Steward](https://code.claude.com/docs/en/pr-steward.md) works on failing checks, merge conflicts, and review comments from people and from review bots such as Code Review. It pushes commits with its fixes. Steward is designed not to approve or merge pull requests. Use branch protection to require the approvals you want before anything merges. See [Limits on approvals and merges](https://code.claude.com/docs/en/pr-steward-security.md#limits-on-approvals-and-merges). ### Claude Approvals applies your policy [Claude Approvals](https://code.claude.com/docs/en/approvals.md) is a check that reports who still has to approve. You write its policy file, which can set how many people have to approve changes to a path, and where Claude can post an approving review. The check blocks a merge only where you [make it a required check in GitHub](https://code.claude.com/docs/en/approvals-setup.md#enforce-your-policy-and-require-claude-approvals), and normally not in observe mode. > [!WARNING] > > If you use GitHub auto-merge or a merge queue with a policy that doesn't require a person's approval, a change can merge without anyone acting. See [Merges without human review](https://code.claude.com/docs/en/approvals-github-rules.md#merges-without-human-review). ## Set up Claude Ship Go to [**Organization settings > Claude Ship**](https://claude.ai/admin-settings/claude-ship) for Claude Ship's settings. You need an [Owner role](https://code.claude.com/docs/en/server-managed-settings.md#access-control). Turn on one agent at a time in one repository, in this order: 1. [Set up Code Review](https://code.claude.com/docs/en/code-review-setup.md) 2. [Set up PR Steward](https://code.claude.com/docs/en/pr-steward-setup.md). For the setting that chooses when PR Steward starts, begin with [**Manual (@claude steward)**](https://code.claude.com/docs/en/pr-steward-setup.md#choose-when-pr-steward-starts-in-each-repository). PR Steward has no spend limit of its own until you set one. 3. [Set up Claude Approvals](https://code.claude.com/docs/en/approvals-setup.md). A policy file in the repository starts it, so see [who can turn it on](https://code.claude.com/docs/en/approvals.md#who-can-turn-approvals-on-or-off). Start in observe mode, where the **Claude Approvals** check reports what your policy would decide. Observe mode is billed. See [what Approvals costs](https://code.claude.com/docs/en/approvals-setup.md#what-approvals-costs). ### If you already use Code Review Code Review's settings moved to [**Organization settings > Claude Ship**](https://claude.ai/admin-settings/claude-ship). A Claude Approvals policy file, `.claude/approvals.yml`, changes which pull requests Code Review reviews automatically. Once the file is on the default branch, in observe mode or enforced, automatic reviews normally stop where no matching rule names `claude/code_review`. To keep them, [add `claude/code_review` to a rule](https://code.claude.com/docs/en/approvals-policy#advisory). ## Plans and billing Claude Ship is for organizations on Team and Enterprise plans. ### Who can use Claude Ship Code Review is generally available. PR Steward and Claude Approvals are in public beta. The agents aren't available to organizations with [Zero Data Retention](https://code.claude.com/docs/en/zero-data-retention.md) enabled, the [HIPAA configuration](https://code.claude.com/docs/en/hipaa-setup.md) applied, or customer-managed encryption keys. Approvals has [more limits](https://code.claude.com/docs/en/approvals.md#availability). ### How each Claude Ship agent is billed Each agent is billed on token usage through your organization's [usage credits](https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans), separately from your plan's included usage. Approvals bills for [classifier](https://code.claude.com/docs/en/approvals-classifiers.md) runs and the Code Reviews that a policy asks for. > [!NOTE] > > Eligible Enterprise organizations can claim promotional Claude Ship credits. For who qualifies, the amount, and the dates, see the [credit terms](https://support.claude.com/en/articles/17603594-free-code-review-promotional-credits-for-claude-enterprise). If you turn off usage credits in [**Organization settings > Usage**](https://claude.ai/admin-settings/usage), an agent that's on keeps running and billing your organization. To stop its charges, follow [Turn off Claude Ship](#turn-off-claude-ship). See each agent's costs: * [Code Review](https://code.claude.com/docs/en/code-review-costs.md) * [PR Steward](https://code.claude.com/docs/en/pr-steward-setup.md#set-pr-steward’s-spend-limits) * [Claude Approvals](https://code.claude.com/docs/en/approvals-setup.md#what-approvals-costs) ## Turn off Claude Ship Turn off Approvals before Code Review, because a policy can start billed reviews where Code Review is off: 1. [Turn off Approvals](https://code.claude.com/docs/en/approvals-setup.md#turn-off-approvals) 2. [Turn off PR Steward](https://code.claude.com/docs/en/pr-steward-setup.md#turn-off-pr-steward) 3. [Turn off Code Review](https://code.claude.com/docs/en/code-review-setup.md#turn-off-code-review-or-remove-a-repository) These steps leave the `/ship` and `/steward` commands on. See [how to turn them off](https://code.claude.com/docs/en/ship-command.md#turn-off-%2Fship-and-%2Fsteward-for-your-organization). ## Related resources * [GitHub Actions](https://code.claude.com/docs/en/github-actions.md) and [GitLab CI/CD](https://code.claude.com/docs/en/gitlab-ci-cd.md): run Claude Code in your own CI * [Review code locally](https://code.claude.com/docs/en/code-review-local.md): get a review in your terminal before you push
code-review-pull-requests Changed · +5 / -5 lines
code-review-setup Changed · +19 / -12 lines
code-review-troubleshooting Changed · +8 / -3 lines
### Code review not run: no policy rule uses it
pr-steward New page · 68 lines, new page
# PR Steward ## What PR Steward does on a pull request ### When PR Steward starts ### What PR Steward fixes ### Stop or limit PR Steward ## Decide whether PR Steward fits your team ### How PR Steward differs from auto-fix and /steward ### Availability ### What PR Steward costs ## Next steps
A whole new page. There's nothing to diff it against, so here is what it says.
# PR Steward > Let PR Steward push fixes to your GitHub pull requests for failing checks, merge conflicts, and review feedback PR Steward is an agent that works on your team's open GitHub pull requests. It pushes commits to address review feedback, and attempts to fix failing checks and resolve merge conflicts. With it on, you can open a pull request and start your next change while PR Steward works on the failing checks, conflicts, and review comments that follow. It's in public beta on Team and Enterprise plans. > [!TIP] > > To turn on PR Steward, follow [Set up PR Steward](https://code.claude.com/docs/en/pr-steward-setup.md), which takes an Owner role in your Claude organization. PR Steward picks up a problem on GitHub, works on it in a cloud session, and reports back on the pull request:  To stop PR Steward on a pull request, remove the `claude-pr-steward-watching` label or [comment `@claude stop`](https://code.claude.com/docs/en/pr-steward-pull-requests#start-or-stop-pr-steward-on-one-pull-request). Steward is designed not to approve or merge pull requests. Use branch protection to require the approvals you want before anything merges. See [Limits on approvals and merges](https://code.claude.com/docs/en/pr-steward-security.md#limits-on-approvals-and-merges). ## What PR Steward does on a pull request While PR Steward watches a pull request, it pushes commits and replies to comments without asking first, and the pull request has the `claude-pr-steward-watching` label. See [what PR Steward adds to a pull request](https://code.claude.com/docs/en/pr-steward-pull-requests.md#what-pr-steward-adds-to-a-pull-request). ### When PR Steward starts In a repository where an Owner set PR Steward to **On**, it starts when you open a pull request, reopen one, or mark a draft as ready for review. It also starts at the next push to an open pull request that it hasn't started on before. PR Steward skips drafts, pull requests from forks, pull requests that a bot opened, and authors without write access to the repository. An Owner can [change the repository's setting](https://code.claude.com/docs/en/pr-steward-setup.md#choose-when-pr-steward-starts-in-each-repository) so that PR Steward includes drafts, or normally starts only when someone asks it to. ### What PR Steward fixes PR Steward works on failing checks, merge conflicts, review feedback, and the Claude Approvals check: * **A failing check**: attempts a fix when the cause is in code that the pull request touches * **A merge conflict**: attempts to merge the base branch in and resolve the conflicts * **A person's review comment**: attempts small, specific changes and replies to the comment. Can reply without pushing when the request is large or about the design * **A review bot's finding**: works on the findings that [Code Review](https://code.claude.com/docs/en/code-review.md) marks **Important**. For other bots, works on lint findings and bugs * **The [Claude Approvals](https://code.claude.com/docs/en/approvals.md) check**: where the check waits for something that a commit can fix, such as open Code Review findings, works on that. Where the check waits for people's approvals, leaves it. After PR Steward pushes, the check can [ask for approvals again](https://code.claude.com/docs/en/approvals-policy.md#earlier-approvals-after-a-new-push) ### Stop or limit PR Steward To stop PR Steward on one pull request, remove the `claude-pr-steward-watching` label or [comment `@claude stop`](https://code.claude.com/docs/en/pr-steward-pull-requests#start-or-stop-pr-steward-on-one-pull-request). To turn off or limit PR Steward on the pull requests that you open later, go to [**PR Steward**](https://claude.ai/settings/claude-code#pr-steward) in **Settings > Code** or **Settings > Claude Code**. ## Decide whether PR Steward fits your team PR Steward is one of the [Claude Ship](https://code.claude.com/docs/en/claude-ship.md) agents, alongside Code Review and Claude Approvals. Before you turn it on, compare it with auto-fix and `/steward`, check that your organization qualifies, and see how it's billed. ### How PR Steward differs from auto-fix and /steward [Auto-fix](https://code.claude.com/docs/en/claude-code-on-the-web.md#auto-fix-pull-requests) and the [`/steward` command](https://code.claude.com/docs/en/ship-command#start-a-watch-with-%2Fsteward) also work on failing checks and review comments. They run in your own sessions, and they act as you and count against your own usage. PR Steward acts as the [Claude GitHub App](https://github.com/apps/claude) and bills your organization. If you ask to auto-fix a pull request that PR Steward is watching, the request fails. See [Auto-fix is unavailable](https://code.claude.com/docs/en/pr-steward-troubleshooting.md#auto-fix-is-unavailable). ### Availability PR Steward works with repositories on github.com or a connected [GitHub Enterprise Server](https://code.claude.com/docs/en/github-enterprise-server.md) instance on port 443. You need a Claude organization on a [Team or Enterprise plan](https://code.claude.com/docs/en/feature-availability.md#features-that-require-a-claude-subscription). PR Steward isn't available to organizations with [Zero Data Retention](https://code.claude.com/docs/en/zero-data-retention.md) enabled, the [HIPAA configuration](https://code.claude.com/docs/en/hipaa-setup.md) applied, or customer-managed encryption keys. ### What PR Steward costs PR Steward's usage is billed by tokens to your organization's [usage credits](https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans). It has no spend limit of its own until you [set one](https://code.claude.com/docs/en/pr-steward-setup.md#set-pr-steward’s-spend-limits), which takes an Owner role. ## Next steps * [Set up PR Steward](https://code.claude.com/docs/en/pr-steward-setup.md), which takes an Owner * [Work with PR Steward](https://code.claude.com/docs/en/pr-steward-pull-requests.md) on your pull requests * [What PR Steward can access](https://code.claude.com/docs/en/pr-steward-security.md) * [Troubleshoot PR Steward](https://code.claude.com/docs/en/pr-steward-troubleshooting.md)
pr-steward-pull-requests New page · 243 lines, new page
# Work with PR Steward on a pull request ## What PR Steward adds to a pull request ### Example of a fix for a failing check ## Change what PR Steward does ### Default instructions for PR Steward ### Give PR Steward instructions in a comment ### Turn off or limit PR Steward on all your pull requests ### Choose what PR Steward works on ### Save PR Steward instructions for every pull request you open ### Save PR Steward instructions for everyone in a repository ### Which PR Steward instructions take priority ## Start or stop PR Steward ### Start or stop PR Steward on one pull request ### Undo a fix that PR Steward pushed ### Keep PR Steward off a pull request from the start ### Who can start and stop PR Steward ## Related resources
A whole new page. There's nothing to diff it against, so here is what it says.
# Work with PR Steward on a pull request > See what PR Steward adds to your GitHub pull request, give it instructions, start or stop it with a comment or a label, and limit what it does for you [PR Steward](https://code.claude.com/docs/en/pr-steward.md) is an agent that works on the GitHub pull requests that you open, in repositories where it's on. It pushes commits to address review feedback, and attempts to fix failing checks and resolve merge conflicts. You can [tell it what to work on](#change-what-pr-steward-does) or [turn it off for yourself](#turn-off-or-limit-pr-steward-on-all-your-pull-requests). To stop it on one pull request, remove the `claude-pr-steward-watching` label, or comment `@claude stop`. ## What PR Steward adds to a pull request On github.com, PR Steward posts its comments as `claude[bot]`, the account of the [Claude GitHub App](https://github.com/apps/claude). PR Steward adds these labels, comments, and commits to a pull request:  PR Steward adds each one at these times: | What PR Steward adds | When | | :- | :- | | The `claude-pr-steward-watching` label | While it watches the pull request | | The `claude-pr-steward-is-working` label | While it works | | A comment headed **Claude PR Steward** | When it first starts on the pull request | | A progress comment | Before and after a piece of work | | Commits whose author and committer are `Claude <[email protected]>` | When it pushes a fix | The progress comment after a push names the commits to revert if you want to [undo the push](#undo-a-fix-that-pr-steward-pushed). ### Example of a fix for a failing check In this example, you open a pull request in a repository where PR Steward starts by itself, and a test of the code that you changed fails. Claude writes the progress comments, so their wording varies. 1. **PR Steward starts**: it adds the `claude-pr-steward-watching` label and posts a first comment. The emoji and the opening words change from one pull request to the next, and the rest reads like this: ```text wrap theme={null} 🛠️ Claude PR Steward — On it. I'll chase down CI failures, work through review comments, and push fixes until it's green. Ask me anything in a comment and I'll answer or take action. I'll check for a steward skill at .claude/skills/steward/SKILL.md for any repo-specific behavior I should follow. Remove the claude-pr-steward-watching label any time to take over. React with 👍 or 👎 to provide feedback · Settings ``` 2. **The test fails**: PR Steward adds the `claude-pr-steward-is-working` label and says what it plans to do: ```text wrap theme={null} The unit-tests check failed on test_parse_date. I'll find the cause and push a fix. – Claude PR steward · Settings ``` 3. **PR Steward pushes a fix**: PR Steward can wait before it pushes, for example while other checks are still running, and says so in a comment. Then a commit by `Claude <[email protected]>` appears on your branch. A second progress comment says what changed and how to undo it: ```text wrap theme={null} Pushed a1b2c3d: parse_date now accepts a date with no time zone, which is the case that test_parse_date covers. To undo it, revert a1b2c3d, or remove the claude-pr-steward-watching label to stop me entirely. – Claude PR steward · Settings ``` 4. **The work ends**: PR Steward removes the `claude-pr-steward-is-working` label and continues to watch the pull request ## Change what PR Steward does PR Steward starts from [default instructions](#default-instructions-for-pr-steward) on how to handle failing checks, review comments, and the base branch. You can change what it does for one pull request, for every pull request that you open, or for a whole repository: * **For one pull request that you opened**: [start a comment with `@claude`](#give-pr-steward-instructions-in-a-comment) on that pull request * **For every pull request that you open**: in your settings on claude.ai, [turn it off or limit it](#turn-off-or-limit-pr-steward-on-all-your-pull-requests), [choose what it works on](#choose-what-pr-steward-works-on), or [enter instructions](#save-pr-steward-instructions-for-every-pull-request-you-open) * **For everyone's pull requests in a repository**: [save a file at `.claude/skills/steward/SKILL.md`](#save-pr-steward-instructions-for-everyone-in-a-repository) in that repository ### Default instructions for PR Steward PR Steward's default instructions are instructions to Claude, so they describe what PR Steward aims to do. With no instructions from you, PR Steward follows defaults such as these: | Work | By default | | :- | :- | | Failing checks | Fixes and pushes when the failure is in code that the pull request touches | | Flaky checks | Re-runs a failed job once, when the job failed before any test ran or passed earlier on the same commit | | Base branch | Merges the base branch into yours when there's a conflict. Can also merge it when your branch is behind | | Lockfiles and generated files | Regenerates them | | Small review requests, such as a rename or an added test | Pushes the change and resolves the thread | | Large or design-level review requests | Replies, and doesn't push or resolve the thread, unless the reviewer says which change to make | | Code Review's optional findings | Replies and resolves the thread. Doesn't push for these alone | | Choice of approach | Picks one itself, and doesn't ask you which to take | To change most of these defaults for everyone's pull requests in a repository, [save instructions at `.claude/skills/steward/SKILL.md`](#save-pr-steward-instructions-for-everyone-in-a-repository) in that repository. ### Give PR Steward instructions in a comment On a pull request that you opened, start a comment with `@claude` and say what you want. This comment asks PR Steward to fix one kind of failure: ```text theme={null} @claude only fix the lint failures. I'm still working on the tests. ``` ### Turn off or limit PR Steward on all your pull requests Go to [**PR Steward**](https://claude.ai/settings/claude-code#pr-steward) in **Settings > Code** or **Settings > Claude Code** on claude.ai and select how much PR Steward does on the pull requests that you open. To change the setting, you need a [connected GitHub account](https://code.claude.com/docs/en/web-quickstart.md#connect-github). | Option | What PR Steward does on your pull requests | | :- | :- | | **Off** | Starts only when you add the `claude-pr-steward-watching` label or comment `@claude steward` yourself | | **Only when tagged** | Starts only when you or a teammate with write access adds the `claude-pr-steward-watching` label or comments `@claude steward` | | **Act on its own** | Starts on each [eligible pull request](https://code.claude.com/docs/en/pr-steward.md#when-pr-steward-starts), including in repositories that an Owner [set to **Manual**](https://code.claude.com/docs/en/pr-steward-setup.md#choose-when-pr-steward-starts-in-each-repository) | | **Customize** | Follows each repository's own setting for when to start. You [choose what it works on](#choose-what-pr-steward-works-on) | Before you choose an option, the settings page shows **Act on its own** as selected. Until you choose one, PR Steward follows each repository's own setting. PR Steward reads your settings when it starts on a pull request, so a change applies to later starts. ### Choose what PR Steward works on To tell PR Steward what to work on, for every pull request that you open, use the toggles in your settings. A repository's `.claude/skills/steward/SKILL.md` can say something else, so see [which instructions take priority](#which-pr-steward-instructions-take-priority). 1. Go to [**PR Steward**](https://claude.ai/settings/claude-code#pr-steward) in **Settings > Code** or **Settings > Claude Code** on claude.ai 2. For **How much should Steward do on its own?**, select [**Customize**](#turn-off-or-limit-pr-steward-on-all-your-pull-requests) 3. Turn off the toggle for each thing that you don't want PR Steward to do. Each toggle is on until you turn it off: * **Failing CI and merge conflicts** * **Issues found by Code Review and other review bots** * **Comments from human reviewers** * **Reply to reviewers and resolve their threads**, which needs **Comments from human reviewers** on * **Include my draft PRs** With **Customize** selected, the settings look like this:  > [!NOTE] > > **Customize** also changes when PR Steward starts: it follows each repository's own setting. If you had **Off** or **Only when tagged** selected before, it can then start by itself. While **Include my draft PRs** is on, PR Steward works on your drafts in repositories that an Owner set to include drafts. PR Steward also works on your drafts in a repository that an Owner set to **Manual**, when someone asks for it on the draft. While it's off, PR Steward doesn't start on your drafts. While **Failing CI and merge conflicts** is on, you can also say when PR Steward merges the base branch into yours. Set **Updating my branch from the base branch** to **Whenever my branch falls behind**, **Only when there is a conflict**, or **Never, I update it myself**. ### Save PR Steward instructions for every pull request you open To give PR Steward the same instructions on every pull request that you open, go to [**PR Steward**](https://claude.ai/settings/claude-code#pr-steward) in **Settings > Code** or **Settings > Claude Code** on claude.ai. Under **My instructions for Steward**, enter up to 1,000 characters. These instructions ask for small commits and no replies to reviewers: ```text theme={null} Keep commits small. Don't reply to reviewers for me. ``` ### Save PR Steward instructions for everyone in a repository To set how PR Steward behaves for everyone in a repository, save a file at `.claude/skills/steward/SKILL.md` and merge it to the default branch. This example tells PR Steward which work to take on, and how to handle one file and one flaky check: ```markdown theme={null} --- name: steward description: House rules for PR Steward in this repository user-invocable: false disable-model-invocation: true --- - Work on failing checks, merge conflicts, and Important findings from Code Review. - Leave comments from human reviewers to the author. - Regenerate `package-lock.json` with `npm install`. Don't edit it directly. - The `e2e-nightly` check is flaky. Re-run it once before you look for a cause. ``` To check that PR Steward follows the file: 1. Open a test pull request after the file reaches the default branch. 2. If the `claude-pr-steward-watching` label doesn't appear by itself, comment `@claude steward`. 3. Once the label is on, have a teammate leave a review comment. The example leaves comments from human reviewers to the author, so PR Steward should push no fix for that review comment. PR Steward also reads instructions from files such as `CLAUDE.md`, `.claude/CLAUDE.md`, `.claude/rules/`, and `AGENTS.md` at the repository's root. It reads them from the default branch. > [!NOTE] > > The `/ship` and `/steward` commands in Claude Code read the same file. During a watch, Claude [follows the copy in your checkout](https://code.claude.com/docs/en/ship-command.md#save-instructions-for-watches-in-a-repository). ### Which PR Steward instructions take priority Your settings, the repository's file, and your comments can disagree. PR Steward settles that this way: * **Whether PR Steward starts**: [the option that you select](#turn-off-or-limit-pr-steward-on-all-your-pull-requests) and [**Include my draft PRs**](#choose-what-pr-steward-works-on) are checked before PR Steward reads any instructions * **What PR Steward does after it starts**: where your own settings and the repository's [`.claude/skills/steward/SKILL.md`](#save-pr-steward-instructions-for-everyone-in-a-repository) disagree, that file applies. Your comments on the pull request override your own settings there, and a comment that asks PR Steward to stop or hold off also overrides that file ## Start or stop PR Steward Use a comment or a label to start or stop PR Steward on one pull request. To turn it off or limit it on every pull request that you open, [change your settings](#turn-off-or-limit-pr-steward-on-all-your-pull-requests). ### Start or stop PR Steward on one pull request To stop PR Steward on a pull request, remove the `claude-pr-steward-watching` label, or comment `@claude stop`. To start or stop PR Steward with a comment, put one of these commands at the start of a top-level comment on an open pull request: | Comment | What it does | | :- | :- | | `@claude stop` | Stops PR Steward. Make the command the whole comment | | `@claude steward stop` or `@claude unwatch` | Stops PR Steward | | `@claude steward` | Starts PR Steward | | `@claude babysit`, `@claude watch`, `@claude babysit stop`, `@claude watch stop` | Other spellings of the start and stop commands | After a stop command, PR Steward removes its labels and confirms in a comment. After you remove the label, it stops without a comment. PR Steward stays stopped when you push or comment later. To restart it, comment `@claude steward` or add the label again. If it doesn't start, see [PR Steward didn't start on a pull request](https://code.claude.com/docs/en/pr-steward-troubleshooting.md#pr-steward-didn’t-start-on-a-pull-request). ### Undo a fix that PR Steward pushed After a revert, PR Steward can make the same fix again, so take these steps in order: 1. **Hold PR Steward back**: [stop it](#start-or-stop-pr-steward-on-one-pull-request). 2. **Revert the commits**: revert the commits by `Claude <[email protected]>` that you don't want. ### Keep PR Steward off a pull request from the start Include this marker in the description when you open the pull request: ```html theme={null} <!-- claude-pr-steward-disable --> ``` To start PR Steward on that pull request later, remove the marker first. ### Who can start and stop PR Steward Starting or stopping PR Steward takes this access to the repository: | Action | Who can do it | | :- | :- | | Start or stop PR Steward with a comment | A person with write access to the repository | | Start PR Steward by adding the `claude-pr-steward-watching` label | A person with write access | | Stop PR Steward by removing the label | Any person GitHub allows to remove labels | ## Related resources * [PR Steward](https://code.claude.com/docs/en/pr-steward.md) * [Troubleshoot PR Steward](https://code.claude.com/docs/en/pr-steward-troubleshooting.md) * [What PR Steward can access](https://code.claude.com/docs/en/pr-steward-security.md) * [Set up PR Steward](https://code.claude.com/docs/en/pr-steward-setup.md)
pr-steward-security New page · 65 lines, new page
# What PR Steward can access ## PR Steward's identity and permissions ### PR Steward's GitHub access ### PR Steward's session environment ## Limits on approvals and merges ### Requests that Anthropic's service refuses ### Requests left to GitHub's branch rules ## Related resources
A whole new page. There's nothing to diff it against, so here is what it says.
# What PR Steward can access > Check which GitHub identity, permissions, and repositories PR Steward uses, where its sessions run, and what limits approvals and merges [PR Steward](https://code.claude.com/docs/en/pr-steward.md) is an agent that works on your team's open GitHub pull requests. It acts on GitHub as the [Claude GitHub App](https://github.com/apps/claude) and works on each pull request in a [cloud session](https://code.claude.com/docs/en/claude-code-on-the-web.md). On GitHub Enterprise Server, it acts as [the app that your organization created](https://code.claude.com/docs/en/github-enterprise-server.md#admin-setup). The access and limits here are those of a session in an Anthropic-hosted environment. For a self-hosted one, see [Run PR Steward in a self-hosted environment](https://code.claude.com/docs/en/pr-steward-setup.md#run-pr-steward-in-a-self-hosted-environment). For how session data is handled, see [Data usage](https://code.claude.com/docs/en/data-usage.md). ## PR Steward's identity and permissions Check what a PR Steward session can reach on GitHub, then how the session itself is set up. ### PR Steward's GitHub access As its GitHub App, a PR Steward session acts on GitHub with these repositories, permissions, and token: | Topic | What PR Steward uses | | :- | :- | | Repositories | A session starts with the pull request's own repository, which it reads and writes. GitHub search on github.com can return results from other github.com repositories that your organization has added for PR Steward. A session can fetch public repositories on github.com | | Permissions | Read and write on contents, pull requests, and issues. Where your installation of the app grants them, it also has read on checks and statuses and write on Actions. On github.com, the installation can also grant write on workflows, which lets PR Steward push changes to workflow files. See the app's [permission list](https://code.claude.com/docs/en/github-actions.md#github-app-permissions) | | Token | The app's token is kept outside the session's sandbox. By default, the session's `gh` and `git` requests go through Anthropic's service, which adds the token | ### PR Steward's session environment Check where a PR Steward session runs, how it handles permission prompts, and which comments and instruction files it reads: | Topic | How a session works | | :- | :- | | Where the code runs | In a [cloud session](https://code.claude.com/docs/en/claude-code-on-the-web.md). See [the environment that PR Steward runs in](https://code.claude.com/docs/en/pr-steward-setup.md#choose-the-environment-pr-steward-runs-in) | | Permission prompts | The session is started in [auto mode](https://code.claude.com/docs/en/permission-modes.md#eliminate-prompts-with-auto-mode), and a request for permission is denied | | Comments | Anthropic's service sends a session the comments and reviews of the pull request's author, people with write access to the repository, and bots. When a session reads the pull request directly, it can also see what anyone else wrote there | | Instruction files | PR Steward [reads them from the default branch](https://code.claude.com/docs/en/pr-steward-pull-requests.md#save-pr-steward-instructions-for-everyone-in-a-repository) | ## Limits on approvals and merges Steward is designed not to approve or merge pull requests. Use branch protection to require the approvals you want before anything merges. In an Anthropic-hosted environment, Anthropic's service refuses some requests that a PR Steward session makes as its GitHub App, and leaves others to GitHub's branch rules. ### Requests that Anthropic's service refuses Anthropic's service refuses these requests from a PR Steward session that acts as its GitHub App: * Approving a pull request * Changing branch protection, rulesets, or statuses, or writing check runs * Deleting a branch * Pushing tags ### Requests left to GitHub's branch rules Anthropic's service allows requests such as these. GitHub's branch rules control them, on the branches that have rules: * **Merging, turning on auto-merge, and force-pushing**: before GitHub's branch rules apply, two checks run on the commands that Claude runs * **Pushing to a branch other than the pull request's**: a session can push to any branch in that repository that GitHub lets the Claude GitHub App push to * **Dismissing a review**: to limit who can do it, use GitHub's branch rules, for example **Restrict who can dismiss pull request reviews** in a classic branch protection rule Two checks run on a command that merges, turns on auto-merge, or force-pushes. Permission rules deny the usual commands for these actions. [Auto mode's check](https://code.claude.com/docs/en/permission-modes.md#how-auto-mode-evaluates-actions) judges commands that no rule matches. The rules match a command's text and the check is a model's judgment, so a command that's written another way can pass both. To have GitHub enforce reviews on what PR Steward pushes, [require reviews with branch rules](https://code.claude.com/docs/en/pr-steward-setup.md#require-reviews-with-branch-rules) and keep the Claude GitHub App off each ruleset's bypass list. In a classic branch protection rule, keep it off the **Allow specified actors to bypass required pull requests** list. ## Related resources * [Set up PR Steward](https://code.claude.com/docs/en/pr-steward-setup.md) * [PR Steward](https://code.claude.com/docs/en/pr-steward.md) * [Data usage](https://code.claude.com/docs/en/data-usage.md)
pr-steward-setup New page · 173 lines, new page
# Set up PR Steward ## Prerequisites ## Require reviews with branch rules ## Turn on PR Steward and add repositories ## Roll out PR Steward to more pull requests ### Choose when PR Steward starts in each repository ### Limit which authors PR Steward works for ## Control what PR Steward spends ### See what PR Steward spent ### Set PR Steward's spend limits ## Set up PR Steward's build environment ### Choose the environment PR Steward runs in ### Run PR Steward in a self-hosted environment ## Turn off PR Steward ## Next steps
A whole new page. There's nothing to diff it against, so here is what it says.
# Set up PR Steward > Turn on PR Steward for your Claude organization: require reviews, add a repository, set spend limits, and choose when it starts and for which authors To set up [PR Steward](https://code.claude.com/docs/en/pr-steward.md), turn it on for your Claude organization and then for each repository. You need an [Owner role](https://code.claude.com/docs/en/server-managed-settings.md#access-control). Once it's on in a repository, PR Steward pushes commits to pull requests there to address review feedback, and attempts to fix failing checks and resolve merge conflicts. It starts by itself or when someone asks for it, [as you choose for each repository](#choose-when-pr-steward-starts-in-each-repository). ## Prerequisites Check that your organization [qualifies for PR Steward](https://code.claude.com/docs/en/pr-steward.md#availability). In your Claude organization, which you manage at [claude.ai](https://claude.ai/admin-settings), you need: * An [Owner role](https://code.claude.com/docs/en/server-managed-settings.md#access-control) * [Usage credits](https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans), which pay for PR Steward's work * The GitHub connector, turned on at [**Organization settings > Connectors**](https://claude.ai/admin-settings/connectors). With it on, people in your organization can [connect their GitHub accounts](https://code.claude.com/docs/en/web-quickstart.md#connect-github) to Claude On GitHub, you need this access, or someone who has it: * Owner of the GitHub organization, to install the [Claude GitHub App](https://github.com/apps/claude) and [link it to your Claude organization](https://code.claude.com/docs/en/admin-setup.md#connected-github-accounts) * Admin of the repository, to add branch rules. A private repository also needs a [paid GitHub plan](https://docs.github.com/en/get-started/learning-about-github/githubs-plans) * Push access to the repository, from the GitHub account that you connect to Claude ## Require reviews with branch rules Add these rules in GitHub before you turn on PR Steward. **1. Require an approval** Add a ruleset rule on the default branch that requires a pull request with at least one approval. **2. Require a new approval after a push** In that rule, dismiss stale approvals when new commits are pushed, or require approval of the most recent push. **3. Check the ruleset's bypass list** Keep the Claude GitHub App off the ruleset's bypass list. On GitHub Enterprise Server, that's [the app that your organization created](https://code.claude.com/docs/en/github-enterprise-server.md#admin-setup). If PR Steward runs in a [self-hosted environment](#run-pr-steward-in-a-self-hosted-environment), keep the runner's git identity off it. **4. Protect other branches** Add rules to any other branch that PR Steward shouldn't push to, and block force pushes where you don't want them. > [!NOTE] > > Where a [Claude Approvals policy lets Claude approve](https://code.claude.com/docs/en/approvals-github-rules.md#merges-without-human-review), Claude's review can count as the approval in step 1. An approval from a session in a [self-hosted environment](#run-pr-steward-in-a-self-hosted-environment) can count as well. ## Turn on PR Steward and add repositories Start on [**Organization settings > Claude Ship**](https://claude.ai/admin-settings/claude-ship). The **Repositories** table on that page lists each repository with its **Steward** setting:  > [!WARNING] > > Adding a repository can start [Code Review](https://code.claude.com/docs/en/code-review-setup.md) there, which is billed. > > * **No repository is listed yet**: a dialog asks what Claude does on the repositories that you add, and **Code review** is selected by default. If you select **Steward** in the dialog, PR Steward turns on for the organization and those repositories before you've set a spend limit. > * **Others are already listed**: no dialog opens, and the new one is set up for review at every push by default. > > To change that, [set when reviews run](https://code.claude.com/docs/en/code-review-setup.md#set-when-reviews-run) or [turn off Code Review](https://code.claude.com/docs/en/code-review-setup.md#turn-off-code-review-or-remove-a-repository) for the repository. **1. Add a repository** If the repository is already listed under **Repositories**, skip this step. Otherwise, click **Add**, connect your GitHub account if asked, and select the repository. If a dialog then asks what Claude does on it, click **Not now**, which keeps the repository listed. **2. Set which authors PR Steward works for** Under the **Steward** switch, use **Runs for** to set whose pull requests PR Steward works on. Select **All eligible authors**, or select **Listed users only** to pilot with a few people, and enter their GitHub usernames. On GitHub Enterprise Server, select **All eligible authors**, because PR Steward doesn't start there with a list. **3. Turn on PR Steward for the organization** Click the **Steward** switch, then click **Turn on**. **4. Set PR Steward's monthly limit** Go to [**Organization settings > Usage**](https://claude.ai/admin-settings/usage). Under **Services**, set the limit in the **PR Steward** row. PR Steward has no spend limit of its own until you set one. **5. Turn on PR Steward for the repository** On the **Claude Ship** page, click **Edit** beside the repository. Set **Steward** to [**Manual (@claude steward)**](#choose-when-pr-steward-starts-in-each-repository). Click **Change** beside **Steward spend cap** and enter the cap, in US dollars. See [how the cap works](#set-pr-steward’s-spend-limits). **6. Test PR Steward** Open a pull request from an account that has write access and that **Runs for** covers. Comment `@claude steward`. The `claude-pr-steward-watching` label and a comment headed **Claude PR Steward** appear. If they don't appear, see [Troubleshoot PR Steward](https://code.claude.com/docs/en/pr-steward-troubleshooting.md). ## Roll out PR Steward to more pull requests When PR Steward's fixes match what your reviewers would do, set the repository to **On**. For each repository that you add later, [require reviews](#require-reviews-with-branch-rules) there first. Then repeat these steps from [Turn on PR Steward and add repositories](#turn-on-pr-steward-and-add-repositories): add the repository, turn on PR Steward for it, and test PR Steward. PR Steward can be on in up to 256 repositories. ### Choose when PR Steward starts in each repository On the **Claude Ship** page, click **Edit** beside a repository and set **Steward**: | Option | When PR Steward starts | | :- | :- | | **Manual (@claude steward)** | When a person with write access comments `@claude steward` or adds the `claude-pr-steward-watching` label | | **On** | When a pull request that [PR Steward doesn't skip](https://code.claude.com/docs/en/pr-steward.md#when-pr-steward-starts) is opened, reopened, or marked ready for review. Also at the next push to an open one that it hasn't started on before | | **On (including drafts)** | The same as **On**, and on draft pull requests | | **Off** | PR Steward doesn't start in the repository | In a **Manual** repository, a comment or the label can start PR Steward on [a draft](https://code.claude.com/docs/en/pr-steward-pull-requests.md#choose-what-pr-steward-works-on). It doesn't start PR Steward on the other pull requests that [PR Steward skips](https://code.claude.com/docs/en/pr-steward.md#when-pr-steward-starts). PR Steward also starts there on the pull requests of a developer who selects [**Act on its own**](https://code.claude.com/docs/en/pr-steward-pull-requests.md#turn-off-or-limit-pr-steward-on-all-your-pull-requests). ### Limit which authors PR Steward works for To skip an author, add their GitHub username to **Excluded users**, under the **Steward** switch. ## Control what PR Steward spends Billing [continues while usage credits are turned off](https://code.claude.com/docs/en/claude-ship.md#how-each-claude-ship-agent-is-billed). ### See what PR Steward spent To see the average for each merged pull request, open a repository's **Edit** dialog. For your organization's total over the last 30 days, go to [claude.ai/analytics/pr-steward](https://claude.ai/analytics/pr-steward). ### Set PR Steward's spend limits Change the monthly limit in [**Organization settings > Usage**](https://claude.ai/admin-settings/usage), under **Services**, in the **PR Steward** row. The row appears after you first turn on PR Steward. Change the spend cap in the repository's **Edit** dialog. When PR Steward reaches a limit, look for its comment on the pull request: * **Its monthly limit, or your organization's usage-credit limit**: PR Steward pauses. It picks up again at the next push or comment once usage credits can pay again * **The spend cap**: PR Steward stops on that pull request. Spend can pass the cap before it stops. A person with write access can start it again, with the full cap. When PR Steward works on a pull request for more than about a week, it can start a new [cloud session](https://code.claude.com/docs/en/claude-code-on-the-web.md), and the full cap then applies again With no usage credits left to spend, PR Steward doesn't start, and the **Claude Ship** page shows **Steward cannot start on pull requests**. Add usage credits or raise the limit on the **Usage** page. ## Set up PR Steward's build environment Choose an environment for PR Steward when it needs more to build and test your code. ### Choose the environment PR Steward runs in To add a setup script, environment variables, or different network access, use an [organization-shared environment](https://code.claude.com/docs/en/cloud-environments.md#organization-shared-environments). On the **Claude Ship** page, select a **Default environment** under **Where it runs**. To override it for one repository, click **Change** beside **Environment** in the **Edit** dialog. With neither set, PR Steward can use your organization's [default environment](https://code.claude.com/docs/en/cloud-environments.md#the-default-environment). Without one, it runs in an Anthropic-hosted environment with no setup script and no environment variables. ### Run PR Steward in a self-hosted environment For the environment that PR Steward runs in, you can select a [self-hosted environment](https://code.claude.com/docs/en/self-hosted-environments). The [limits on approvals and merges](https://code.claude.com/docs/en/pr-steward-security.md#limits-on-approvals-and-merges) are described for Anthropic-hosted sessions only. On a runner without [Anthropic-managed git](https://code.claude.com/docs/en/self-hosted-environments-deploy.md#use-the-anthropic-git-proxy), PR Steward pushes with the runner's own git credentials. > [!WARNING] > > In a self-hosted environment, Claude can reach GitHub directly with [any GitHub credential that a session can read](https://code.claude.com/docs/en/self-hosted-environments-deploy.md#harden-your-deployment). Anthropic's service can't refuse an approval that's made that way. GitHub can count it toward the approvals that you require. In a self-hosted environment, PR Steward doesn't load a `CLAUDE.md` or rules file from the runner or from the runner's checkout of the pull request. It doesn't load a [managed `CLAUDE.md`](https://code.claude.com/docs/en/memory#deploy-organization-wide-claude-md). Put what PR Steward should follow [on the repository's default branch](https://code.claude.com/docs/en/pr-steward-pull-requests.md#save-pr-steward-instructions-for-everyone-in-a-repository). ## Turn off PR Steward When you turn off PR Steward, new starts stop. It keeps working for a time on pull requests that already have the `claude-pr-steward-watching` label. When you turn it off for one author, that time can be about a week. To stop PR Steward there as well, first remove the label from the pull requests that the change covers. Then turn off PR Steward on the **Claude Ship** page: | To turn off PR Steward for | Then | | :- | :- | | The organization | Click the **Steward** switch | | One repository | Click **Edit** beside the repository and set **Steward** to **Off** | | One author | Add their GitHub username to **Excluded users** | If you turned it off first, remove the labels afterward to stop PR Steward, unless your GitHub organization is linked to more than one Claude organization. ## Next steps * [Work with PR Steward](https://code.claude.com/docs/en/pr-steward-pull-requests.md) * [What PR Steward can access](https://code.claude.com/docs/en/pr-steward-security.md)
pr-steward-troubleshooting New page · 99 lines, new page
# Troubleshoot PR Steward ## PR Steward didn't start on a pull request ### PR Steward didn't respond to your comment ### Pull requests that PR Steward doesn't start on ### A setting keeps PR Steward off ### Many pull requests opened in a short time ## PR Steward posted a comment that says why ### Comments when PR Steward can't start ### Comments when PR Steward stops or pauses ## Auto-fix is unavailable ## Messages while you set up PR Steward ## Related resources
A whole new page. There's nothing to diff it against, so here is what it says.
# Troubleshoot PR Steward > Fix a PR Steward that didn't start, stopped, or paused on a GitHub pull request, and resolve the messages that an Owner sees while setting it up When [PR Steward](https://code.claude.com/docs/en/pr-steward.md) doesn't do what you expect on a pull request, look for a comment from it first. If PR Steward posted one, [match the comment](#pr-steward-posted-a-comment-that-says-why). If it left nothing on the pull request, check [why it didn't start](#pr-steward-didn’t-start-on-a-pull-request). ## PR Steward didn't start on a pull request Some causes leave nothing on the pull request, so check each of these sections. ### PR Steward didn't respond to your comment If you commented `@claude steward` on github.com and PR Steward didn't start, look at your comment: | What you see | What to check | | :- | :- | | No 👀 reaction | That it's a new comment and not an edit, and that you have write access | | A 👀 reaction, and no `claude-pr-steward-watching` label after it | That the command is at the start of a top-level comment. Then check the other sections under [PR Steward didn't start on a pull request](#pr-steward-didn’t-start-on-a-pull-request) | ### Pull requests that PR Steward doesn't start on Check whether your pull request is one that PR Steward skips: | Cause | What to do | | :- | :- | | The pull request is a draft | Mark it ready for review. For work on drafts, see [**Include my draft PRs**](https://code.claude.com/docs/en/pr-steward-pull-requests.md#choose-what-pr-steward-works-on) | | The pull request comes from a fork, a bot opened it, or its author lacks write access to the repository | PR Steward doesn't start on these | | The description contains `<!-- claude-pr-steward-disable -->` | Remove the marker from the description, then comment `@claude steward` | | Another Claude session is already watching the pull request, for example a cloud session with [auto-fix](https://code.claude.com/docs/en/claude-code-on-the-web.md#auto-fix-pull-requests) on | Turn off auto-fix in that session, then comment `@claude steward` again | ### A setting keeps PR Steward off A setting can keep PR Steward from starting: | Cause | What to do | | :- | :- | | The repository is [set to **Manual**](https://code.claude.com/docs/en/pr-steward-setup.md#choose-when-pr-steward-starts-in-each-repository), or [your own option](https://code.claude.com/docs/en/pr-steward-pull-requests.md#turn-off-or-limit-pr-steward-on-all-your-pull-requests) is **Off** or **Only when tagged** | Comment `@claude steward` | | The pull request is a teammate's, and their own option is **Off** | Ask them to comment `@claude steward` | | PR Steward is off for the repository or for the author's GitHub account | Ask an [Owner](https://code.claude.com/docs/en/server-managed-settings.md#access-control) of your Claude organization to [add the repository](https://code.claude.com/docs/en/pr-steward-setup.md#turn-on-pr-steward-and-add-repositories) or to change [which authors PR Steward works for](https://code.claude.com/docs/en/pr-steward-setup.md#limit-which-authors-pr-steward-works-for) | To confirm the last cause, have the author open their [PR Steward settings page](https://claude.ai/settings/claude-code#pr-steward). It shows a banner when your organization has turned off PR Steward. It also shows one when the GitHub account that they connected there is excluded. ### Many pull requests opened in a short time If PR Steward started on many pull requests in your organization in a short time, comment `@claude steward`. If the `claude-pr-steward-watching` label still doesn't appear, comment again later. ## PR Steward posted a comment that says why Find the words of PR Steward's comment in one of these tables. ### Comments when PR Steward can't start If PR Steward commented and didn't start, find the comment's words here: | Comment says | What to do | | :- | :- | | `PR Steward didn't start: only someone with write access` | Have a person with write access add the `claude-pr-steward-watching` label or comment `@claude steward` | | `PR Steward hasn't started: your organization has no extra usage available` | Ask an Owner to add usage credits or raise the spend limit in [**Organization settings > Usage**](https://claude.ai/admin-settings/usage). If you asked PR Steward to start, it then starts when you ask again. Otherwise, it starts at the next push | | `PR Steward hasn't started: billing for PR Steward isn't set up` | Ask an Owner to pick a repository where PR Steward is on and [change its **Steward** setting](https://code.claude.com/docs/en/pr-steward-setup.md#choose-when-pr-steward-starts-in-each-repository) to another option than **Off**. They can change it back straight away | | `Claude PR Steward couldn't start, so it isn't watching this pull request` | Add the label or comment `@claude steward` to try again | | `Claude PR Steward couldn't start on this pull request because the setup script` | Ask someone who can edit the [environment that PR Steward runs in](https://code.claude.com/docs/en/pr-steward-setup.md#choose-the-environment-pr-steward-runs-in) to fix its setup script, then start PR Steward again | | `this repository has PR Steward enabled in more than one Claude workspace` | Ask the Owners to keep the repository in one Claude organization and remove it from the others | ### Comments when PR Steward stops or pauses If PR Steward commented and then stopped or paused, find the comment's opening words here: | Comment says | What it means | What to do | | :- | :- | :- | | `PR Steward is paused on this pull request` | Usage credits ran out while PR Steward was working, or billing setup is unfinished, as the comment says | Ask an Owner to add usage credits or raise the spend limit, or to finish billing setup as the comment describes. PR Steward picks up again at the next push or comment | | `Claude PR Steward stopped watching this pull request: this session's spend reached the repository's PR Steward budget` | This session reached the [spend cap](https://code.claude.com/docs/en/pr-steward-setup.md#set-pr-steward’s-spend-limits) that's set for the repository | Finish the remaining work yourself, or add the `claude-pr-steward-watching` label again to start a new session | | `Claude PR Steward stopped watching this pull request because your organization's PR Steward settings no longer cover it` | An Owner turned off PR Steward, or removed the repository or the author | After the settings cover the pull request again, add the label or comment `@claude steward` | | `Claude PR Steward stopped watching this pull request because for <N> days no person has commented or reviewed here` | No person has commented or reviewed, and nobody but PR Steward has pushed, for the number of days that the comment gives | Add the label or comment `@claude steward` | ## Auto-fix is unavailable In a repository where PR Steward works on your pull requests, the **Auto-fix** toggle on a cloud session is unavailable. If you ask to auto-fix a pull request that PR Steward is watching, the request fails. At claude.ai/code, the message is `PR Steward is already watching this PR.` To use [auto-fix](https://code.claude.com/docs/en/claude-code-on-the-web.md#auto-fix-pull-requests) in that repository, turn PR Steward off for yourself: * **Later pull requests**: set [your own PR Steward option](https://code.claude.com/docs/en/pr-steward-pull-requests.md#turn-off-or-limit-pr-steward-on-all-your-pull-requests) to **Off**, which covers your pull requests in every repository * **A pull request that PR Steward is already watching**: also [stop PR Steward there](https://code.claude.com/docs/en/pr-steward-pull-requests.md#start-or-stop-pr-steward-on-one-pull-request) ## Messages while you set up PR Steward While you [set up PR Steward](https://code.claude.com/docs/en/pr-steward-setup.md), you can see these messages on the [**Claude Ship**](https://claude.ai/admin-settings/claude-ship) page: | What you see | What to do | | :- | :- | | **The GitHub connector is not enabled for your organization.** | Turn on the connector at [**Organization settings > Connectors**](https://claude.ai/admin-settings/connectors) | | A repository is missing from the list of repositories when you click **Add** | Go to [**Organization settings > Git providers**](https://claude.ai/admin-settings/source-control), install the [Claude GitHub App](https://github.com/apps/claude) on your GitHub organization, and include the repository | | A message that says your GitHub account "cannot push to that repository", or that adding it "needs write access" | Connect an account that can push, or ask an Owner who can push to do it | | `PR Steward can't be enabled right now: billing setup is temporarily unavailable` | Try again in a few minutes | | **PR Steward isn’t available for your organization.** | Check the [requirements](https://code.claude.com/docs/en/pr-steward.md#availability). If [**Runs for**](https://code.claude.com/docs/en/pr-steward-setup.md#turn-on-pr-steward-and-add-repositories) is **Listed users only**, add a username | | **PR Steward is on but not watching any repositories yet.** | [Turn on PR Steward for a repository](https://code.claude.com/docs/en/pr-steward-setup.md#turn-on-pr-steward-and-add-repositories) | ## Related resources * [Work with PR Steward on a pull request](https://code.claude.com/docs/en/pr-steward-pull-requests.md) * [Set up PR Steward](https://code.claude.com/docs/en/pr-steward-setup.md) * [PR Steward](https://code.claude.com/docs/en/pr-steward.md)
self-hosted-environments-configuration Changed · +5 / -1 lines
ship-command New page · 261 lines, new page
# Get a pull request ready with /ship and /steward ## When to use /ship and /steward ## Prerequisites for /ship and /steward ## Run /ship or /steward ### Run /ship on a finished change ### What /ship commits and pushes ### Start a watch with /steward ## What Claude does during a watch ### Keep working while a watch runs ### Ask Claude to check with you first ### Save instructions for watches in a repository ## Check, stop, or restart a watch ### Check whether a watch is running ### What ends a watch ### Stop or restart a watch ## Decide where to run a watch ### What Claude Code blocks during a watch ### Code that a watch runs on your computer ### When a watch can lead to a merge ### Permission rules and hooks that apply to /ship and /steward ## Turn off /ship and /steward for your organization ## Arguments for /ship and /steward ## Related resources
A whole new page. There's nothing to diff it against, so here is what it says.
# Get a pull request ready with /ship and /steward
> Run `/ship` to open a GitHub pull request, get a review, and have Claude work on feedback and failing checks, or `/steward` to skip the review on an open one.
`/ship` is a Claude Code command that opens a GitHub pull request for your change if your branch doesn't have one. Claude reviews your change and works on feedback and failing checks to help get it ready to merge.
If your pull request is already open and you don't want a review, type [`/steward`](#start-a-watch-with-%2Fsteward). It skips the review, and Claude does the same work on feedback and failing checks.
> [!NOTE]
>
> Run either command from the Claude Code CLI in a terminal, in your local clone of the repository. Cloud sessions don't have them.
After you type `/ship`, your change goes through these steps:

1. **Pull request**: `/ship` can [commit your work, push your branch, and open the pull request](#what-%2Fship-commits-and-pushes) as you
2. **Review**: Claude reviews your change with [`/code-review`](https://code.claude.com/docs/en/code-review-local)
3. **Watch**: Claude keeps checking the pull request from your Claude Code session. It works on failing checks, merge conflicts, reviewers' comments, and the findings from its review, and pushes fixes. This ongoing work is called a watch
4. **Merge**: once the pull request is ready, merge it yourself
`/steward` skips steps 1 and 2 and starts the watch.
## When to use /ship and /steward
With either command, Claude works on your pull request's feedback and failing checks. Choose between `/ship` and `/steward` by where your change is:
* **`/ship`**: your change is finished, and you want Claude to review it and then work on the feedback and failing checks that follow
* **`/steward`**: your pull request is already open and you don't want a review first, or a watch ended and you want to start it again
Both commands run in your session, so their work counts against your usage.
If you want something else, such as a review alone or fixes from a cloud session, use one of these:
| You want | Use |
| :- | :- |
| A review alone | [`/code-review`](https://code.claude.com/docs/en/code-review-local) |
| Fixes as feedback arrives, from a cloud session | [Auto-fix](https://code.claude.com/docs/en/claude-code-on-the-web.md#auto-fix-pull-requests) or `/autofix-pr` |
| Agents for whole repositories, billed to an organization | [Claude Ship](https://code.claude.com/docs/en/claude-ship.md) |
## Prerequisites for /ship and /steward
Install or update these tools:
* Claude Code v2.1.330 or later. If `/ship` is missing, see [/ship isn't available in your session](https://code.claude.com/docs/en/ship-command-troubleshooting.md#%2Fship-isn’t-available-in-your-session)
* The [GitHub CLI](https://cli.github.com) 2.63 or later, signed in with `gh auth login`. With an older version, Claude can't push fixes
* git 2.38 or later, to merge new commits into your branch. With an older git, Claude leaves those merges to you
Then get your change and your session ready:
* **A finished change, for `/ship`**: have it in your local clone of a repository on GitHub. It can be uncommitted, committed on a branch other than the default branch, or already in an open pull request of yours. If the repository is hosted somewhere other than GitHub, `/ship` opens no pull request, and Claude reviews your change
* **Only the files that you want in the pull request, for `/ship`**: `/ship` can commit all your uncommitted changes, new files included. In your shell, run `git status`. Delete each new file that you don't want in the pull request, or stash the file with `git stash push -u -- <file>`
* **No secrets in those files, for `/ship`**: `/ship` looks for secrets by file name, such as `.env`, so look inside your files yourself. A deny rule such as `Read(./notes.txt)` doesn't keep a file out of the commit
* **An open pull request on GitHub, for `/steward`**: it has to be your own, with its branch checked out in your local clone
* **Permission mode**: choose [auto mode](https://code.claude.com/docs/en/permission-modes.md#eliminate-prompts-with-auto-mode) if you want Claude to work on the pull request unattended. In most other permission modes, Claude waits at each prompt. In `bypassPermissions` mode, no watch starts
On native Windows, [no watch starts](https://code.claude.com/docs/en/ship-command-troubleshooting.md#cases-where-no-watch-can-start).
> [!WARNING]
>
> Run a watch only where you trust everyone who can merge to the base branch or push to your branch. Any of them can run programs on your computer with your credentials.
## Run /ship or /steward
In a terminal, open Claude Code in your clone, then type `/ship` or `/steward` at the prompt. Both take [arguments](#arguments-for-%2Fship-and-%2Fsteward), such as a pull request's number.
### Run /ship on a finished change
If you made the change with Claude, use that same session, because Claude writes the commit message from the session's conversation. Anyone who can see the pull request can read that message.
> [!NOTE]
>
> `/ship` proceeds with no confirmation prompt. After you press Enter, it can [commit your work, push your branch, and open the pull request](#what-%2Fship-commits-and-pushes) as you. Before the commit, and again before the push, a line that ends `Esc to cancel` says what's about to happen. If you do nothing, `/ship` continues after a few seconds.
If you cancel before the push, a commit that `/ship` made stays. To undo it and keep your files, run `git reset HEAD~1` in your shell.
### What /ship commits and pushes
In a repository on github.com that isn't a fork, `/ship` can commit your uncommitted changes, push the branch, and open the pull request before the review. On the default branch, it commits on a new branch and switches your checkout to that branch. If your work is already committed on another branch, `/ship` pushes that branch and opens the pull request.
`/ship` doesn't commit your uncommitted changes in these cases. Take the first one that fits:
* **A pull request is already open for the branch**: commit and push anything that you want in the pull request
* **The repository is public**: if you're on a branch other than the default branch and it has commits of its own, `/ship` pushes those and opens a pull request without your uncommitted changes. Otherwise, commit your work on a branch other than the default branch, then run `/ship` again
* **An uncommitted file's name suggests a secret, such as `.env`**: in a repository that isn't public, `/ship` doesn't commit or push anything. See [/ship committed or pushed nothing](https://code.claude.com/docs/en/ship-command-troubleshooting.md#%2Fship-committed-or-pushed-nothing)
Open the pull request yourself, then run `/ship`, if you want any of these:
* A draft pull request
* Another base branch
* Your repository's pull request template
* A pull request on [GitHub Enterprise or from a fork](https://code.claude.com/docs/en/ship-command-troubleshooting.md#github-enterprise-and-forks)
If `/ship` commits or pushes nothing and these cases don't say why, see [/ship committed or pushed nothing](https://code.claude.com/docs/en/ship-command-troubleshooting.md#%2Fship-committed-or-pushed-nothing).
### Start a watch with /steward
To start a watch with no review first, type `/steward` at the Claude Code prompt. Use it on your own open pull request, or to start again after a watch ends. Before you leave a watch alone, see [Code that a watch runs on your computer](#code-that-a-watch-runs-on-your-computer).
`/steward` is separate from [PR Steward](https://code.claude.com/docs/en/pr-steward.md), the agent that an organization sets up. Where PR Steward is already working on your pull request, no watch starts.
## What Claude does during a watch
A watch is Claude's ongoing work on your pull request, which starts after `/ship`'s review or when you type `/steward`. Claude uses your `gh` and `git` sign-ins, so its work on GitHub appears under your name.
In auto mode, Claude takes these actions without asking:
* Works on the review findings that it judges to be problems
* Can post one comment that sums up its review
* Pushes commits to your branch
* Merges the base branch into yours, to resolve conflicts or bring your branch up to date
* Works on failing checks, and re-runs failed ones
* Answers review comments, resolves threads, and re-requests reviews
Claude reads comments from you and from people with write access. On github.com, it also reads comments from Claude's bot. To have Claude read another bot's comments, type `/steward +` and the bot's name, as in `/steward +my-lint-bot`.
When checks pass and comments are answered, Claude says so in the session. Merge the pull request yourself. What can merge depends on your permissions and your repository's branch rules. See [When a watch can lead to a merge](#when-a-watch-can-lead-to-a-merge).
### Keep working while a watch runs
While a watch runs, keep the session open and [in the foreground](https://code.claude.com/docs/en/agent-view.md#send-the-session-to-the-background), the computer awake, and your pull request's branch checked out. Claude edits files in the same checkout as you.
* **To start your next change**: work in another folder, such as a second clone of the repository, and open another Claude Code session there
* **To push your own commits**: name the remote and branch, as in `git push origin <branch>`. If you change git's settings, for example with `git push -u` or `git branch -u`, the watch ends
* **Commits that you haven't pushed**: they can go up with Claude's next push
* **Your uncommitted work**: Claude can edit a file that you're working on, and can commit it. When Claude acts without a message from you, Claude Code refuses these commands from Claude: `git stash`, `git reset`, `git checkout`, `git add -A`, and `git commit -a`
### Ask Claude to check with you first
To see `/ship`'s review findings or a reviewer's comment before Claude acts on them, say so in a message at the Claude Code prompt. To see the findings before Claude fixes anything, send the message while the review is running.
This example asks Claude to show you its findings, and to ask before it pushes or replies:
```text theme={null}
From now on, don't push code changes or reply to reviewers without asking me first. Show me the review findings and wait.
```
That message is a request to Claude, and Claude Code doesn't enforce it.
### Save instructions for watches in a repository
To tell Claude how to look after pull requests in a repository, save a file at `.claude/skills/steward/SKILL.md` in the repository's top folder. [PR Steward reads the same file](https://code.claude.com/docs/en/pr-steward-pull-requests.md#save-pr-steward-instructions-for-everyone-in-a-repository), so one file can serve both, and that section has an example.
During a watch, Claude reads the copy in your checkout and follows it as instructions, for example on which checks matter and how to run the tests, within these limits:
* **Installs and downloads**: Claude can skip a line that installs or downloads something, such as the `npm install` line in that example
* **Blocked commands**: the file doesn't change [what Claude Code blocks during a watch](#what-claude-code-blocks-during-a-watch)
* **Changes to the file**: if you add or edit it yourself while a watch runs, the watch ends. For whose other changes can reach it, see [Code that a watch runs on your computer](#code-that-a-watch-runs-on-your-computer)
## Check, stop, or restart a watch
A watch is Claude's ongoing work on your pull request, which starts after `/ship`'s review or when you type `/steward`. It runs in your session, so you check it and stop it at the Claude Code prompt.
### Check whether a watch is running
Type `/tasks` at the Claude Code prompt. Once the review is done and while Claude isn't working, a running watch appears in the list as a scheduled task whose name starts with `/steward --tend`.
### What ends a watch
After a watch ends, look for a line that starts `Stopped watching pull request`. [A watch stopped](https://code.claude.com/docs/en/ship-command-troubleshooting.md#a-watch-stopped) lists reasons that it gives.
The watch ends in cases such as these:
| Where | What ends the watch |
| :- | :- |
| On the pull request | It's merged or closed, [PR Steward](https://code.claude.com/docs/en/pr-steward.md) labels it, or seven days pass |
| At the keyboard | You press `Esc` or `Ctrl+C` at the prompt or while Claude is working. One press can end the watch, with no confirmation |
| In your checkout | You check out another branch, or change git's settings |
| In the session | The session ends, you send it to the background, you start another watch or a `/loop` with a task, or you run `/clear`, `/resume`, or `/branch` |
| After a failure | An error, a declined prompt, or a usage limit can end it early |
### Stop or restart a watch
To end a watch, type `/ship stop` at the Claude Code prompt in the session that runs it. If Claude is working when you type it, the watch ends when the current turn does, so what Claude pushes or posts in that turn still reaches the pull request. To stop the turn as well, press `Esc`.
To start a watch again, type [`/steward`](#start-a-watch-with-%2Fsteward).
## Decide where to run a watch
A watch is Claude's ongoing work on your pull request, which starts after `/ship`'s review or when you type `/steward`. Claude works with your `gh` and `git` sign-ins. Before you leave a watch alone, check what Claude Code blocks, which code can run on your computer, and what can still lead to a merge.
### What Claude Code blocks during a watch
When Claude acts without a message from you, Claude Code blocks `gh` and `git` commands that merge the pull request, approve it, turn on auto-merge, or force-push. At those times, Claude Code also limits Claude's `gh` and `git` commands to a short list, and refuses tools that the watch doesn't need, such as connectors, `WebFetch`, and `WebSearch`. To see these limits in Claude Code, type `/ship terms` at the prompt.
> [!WARNING]
>
> The limits on a watch don't cover everything. The watch uses your `gh` and `git` sign-ins, so it could merge a pull request that your repository's branch rules let you merge without another person's approval. See [When a watch can lead to a merge](#when-a-watch-can-lead-to-a-merge). A setting in your session, such as a permission rule or a hook, can [let commands past the limits](https://code.claude.com/docs/en/ship-command-troubleshooting.md#messages-during-a-watch).
### Code that a watch runs on your computer
Code from each of these sources can run on your computer during a watch, with your credentials:
| Source | What happens |
| :- | :- |
| The base branch | To resolve conflicts or bring your branch up to date, Claude merges the base branch into yours, including scripts that run by themselves |
| Other people's pushes to your branch | Claude is instructed to merge them in |
| Programs from your branch, such as your tests | Claude runs them. They can merge or force-push with your credentials. Claude Code checks only the command that starts them, under the session's permission mode |
| Your Claude Code hooks | They run without asking, and may run a file that Claude has edited |
| [`.claude/skills/steward/SKILL.md`](https://code.claude.com/docs/en/pr-steward-pull-requests#save-pr-steward-instructions-for-everyone-in-a-repository) | Claude follows it if your checkout has one. Anyone who can merge to the repository can write that file |
If Claude Code sees that a merge of the base branch or of other people's pushes would change its settings, `.mcp.json`, or git's config files, Claude leaves that merge to you.
### When a watch can lead to a merge
Cases such as these can lead to a merge:
| Case | What happens |
| :- | :- |
| Auto-merge is on for the pull request | GitHub merges once the checks and reviews allow. What Claude does during the watch, such as pushing a fix, can bring that about. To turn it off, run `gh pr merge --disable-auto <number>` in your shell |
| In a terminal session, you type a message while Claude is idle | [Claude Code's limits](#what-claude-code-blocks-during-a-watch) are off while Claude answers your message. They're also off while Claude handles a background task's result that arrives during that time. In auto mode, Claude may then be allowed to merge |
| You send a session that you started in your terminal to the background during the review or the watch, for example by pressing `←` | The watch ends. Work under way can go on there without these limits. To end that work, [stop that session](https://code.claude.com/docs/en/agent-view.md#manage-sessions-from-the-shell) |
### Permission rules and hooks that apply to /ship and /steward
Claude Code runs `/ship`'s own commit, push, and pull request commands itself, [outside the sandbox](https://code.claude.com/docs/en/sandboxing.md#what-runs-outside-the-sandbox). During a watch, when Claude acts without a message from you, it writes its git fetches, merges, commits, and pushes in the form `git -c core.hooksPath=/dev/null push`.
Rules and hooks apply this way, whether they're in your own settings or in managed settings:
| Setting | For `/ship`'s own commit and push | During a watch |
| :- | :- | :- |
| A [deny rule](https://code.claude.com/docs/en/permissions.md#manage-permissions) such as `Bash(git push *)` | `/ship` leaves those steps to you | No watch starts |
| A rule that asks on `Bash(git push *)` | Claude Code doesn't consult it | It [doesn't match](https://code.claude.com/docs/en/permissions.md#bash-rule-limits) that form, so it adds no prompt |
| A rule that asks on `Bash(git *)` | Claude Code doesn't consult it | It matches, and the watch waits at each prompt, including in auto mode |
| Auto mode's check, and tool hooks such as `PreToolUse` | They don't run | They don't apply to the `gh` and `git` commands that Claude Code runs itself, outside the sandbox, for example to read the pull request |
| Git hooks in the repository's hooks folder | They run | They don't run for Claude's fetches, merges, commits, and pushes on those turns |
## Turn off /ship and /steward for your organization
To turn off both commands, set these keys under [`skillOverrides`](https://code.claude.com/docs/en/skills#override-skill-visibility-from-settings) in [managed settings](https://code.claude.com/docs/en/managed-settings.md). `ship-local` is the skill behind `/ship`.
This example turns off both:
```json theme={null}
{
"skillOverrides": {
"ship-local": "off",
"steward": "off"
}
}
```
To stop `/ship`'s own pushes, put a [deny rule](https://code.claude.com/docs/en/permissions.md#manage-permissions) such as `Bash(git push *)` in managed settings. With that rule, no watch starts.
## Arguments for /ship and /steward
Type an argument after `/ship` or `/steward` at the Claude Code prompt. To combine arguments, put the effort level first, as in `/ship low 41 +my-lint-bot`.
| You type | Commands | What it does |
| :- | :- | :- |
| `low`, `medium`, `high`, `xhigh`, or `max` | `/ship` | Asks for a review at that effort level. The default is `high` |
| `41`, or a pull request's URL | `/ship`, `/steward` | Works on that pull request. For a watch, it has to be your own, with its branch checked out |
| `+botname` | `/ship`, `/steward` | Also reads that bot's comments. Repeat it when you start a watch again |
| `stop` | `/ship`, `/steward` | Ends the watch |
| `terms` | `/ship`, `/steward` | Shows what Claude may do during a watch and what limits it |
## Related resources
* [Troubleshoot `/ship` and `/steward`](https://code.claude.com/docs/en/ship-command-troubleshooting): messages that the commands print, and what to do
* [Review code locally](https://code.claude.com/docs/en/code-review-local.md): the review that `/ship` runs
* [Permission modes](https://code.claude.com/docs/en/permission-modes.md): auto mode and the other permission modes
ship-command-troubleshooting New page · 210 lines, new page
# Troubleshoot /ship and /steward ## /ship or /steward is missing or doesn't start ### /ship isn't available in your session ### A skillOverrides entry turns off /ship or /steward ### /ship or /steward printed a message and didn't start ### The GitHub CLI isn't ready ## /ship committed or pushed nothing ### Public repositories and files that /ship doesn't commit ### Branches that /ship can't commit to or push ### Deny rules that forbid a commit or push ### GitHub Enterprise and forks ## No watch started ### Your pull request or branch isn't ready for a watch ### A session setting blocks a watch ### A tool, rule, or hook blocks a watch ### Cases where no watch can start ## A watch stopped ### A file that the watch relies on changed ## Messages during a watch ## Pull request results that you didn't expect ## A custom /ship or /steward command stopped loading ## Related resources
A whole new page. There's nothing to diff it against, so here is what it says.
# Troubleshoot /ship and /steward > Look up a message or a symptom from `/ship` or `/steward`: a missing command, nothing committed or pushed, a watch that didn't start, or one that stopped. [`/ship`](https://code.claude.com/docs/en/ship-command) is a Claude Code command that opens a GitHub pull request for your change and has Claude review it. Claude then keeps working on the pull request from your session. This ongoing work is called a watch. `/steward` starts a watch on a pull request that's already open. Find what happened in the first column, or search for words from the message that Claude Code printed: | What happened | Go to | | :- | :- | | `/ship` isn't in the `/` menu, or Claude Code doesn't recognize it | [/ship isn't available in your session](#%2Fship-isn’t-available-in-your-session) | | You typed the command and it printed a message without starting | [/ship or /steward printed a message and didn't start](#%2Fship-or-%2Fsteward-printed-a-message-and-didn’t-start) | | It ran, and nothing was committed or pushed | [/ship committed or pushed nothing](#%2Fship-committed-or-pushed-nothing) | | The pull request is open, and Claude isn't following up on it | [No watch started](#no-watch-started) | | Claude was following up, and stopped | [A watch stopped](#a-watch-stopped) | | A message appeared while Claude was following up | [Messages during a watch](#messages-during-a-watch) | | The pull request isn't what you expected | [Pull request results that you didn't expect](#pull-request-results-that-you-didn’t-expect) | | A custom `/ship` or `/steward` command stopped working | [A custom /ship or /steward command stopped loading](#a-custom-%2Fship-or-%2Fsteward-command-stopped-loading) | ## /ship or /steward is missing or doesn't start Start here when the command isn't offered, or when it prints a message. ### /ship isn't available in your session `/ship` is missing from the `/` menu, typing it starts `/code-review`, or you see `Unknown command: /ship`. Cloud sessions don't have `/ship`. On your own machine, take these steps: 1. Run `claude update` in your shell, then quit and start `claude` again. 2. If `/ship` is still missing, quit and start `claude` once more, because a new feature [can take a second start](https://code.claude.com/docs/en/env-vars.md#first-session-after-an-install-or-upgrade) to show. 3. Run `/status` at the Claude Code prompt. Its `Setting sources` line lists the settings that loaded. In each one that's your own [settings file](https://code.claude.com/docs/en/settings.md#find-or-create-your-settings-files), remove [`disableBundledSkills`](https://code.claude.com/docs/en/settings-reference#disablebundledskills) and any `ship-local` entry under [`skillOverrides`](https://code.claude.com/docs/en/skills#override-skill-visibility-from-settings). To change managed settings, ask your administrator. 4. Check whether your session [skips feature-flag fetching](https://code.claude.com/docs/en/env-vars.md#features-that-need-feature-flag-fetching), for example because `DISABLE_TELEMETRY` is set or you use a third-party provider. `/ship` isn't available in those sessions. ### A skillOverrides entry turns off /ship or /steward `Skill "ship-local" is disabled via skillOverrides`, or the same message for `steward`, means that a [`skillOverrides`](https://code.claude.com/docs/en/skills#override-skill-visibility-from-settings) entry in your settings turns off the command. Remove the entry. To change an entry in managed settings, ask your administrator. ### /ship or /steward printed a message and didn't start Find the opening words of the message: | Message | What to do | | :- | :- | | `This session was started by another session` | Run it in a session that you started yourself | | `Usage: /ship` or `Usage: /steward` | Check what you typed against [the arguments](https://code.claude.com/docs/en/ship-command.md#arguments-for-%2Fship-and-%2Fsteward) | | `Nothing started. /ship starts only from a line that you type`, or the same for `/steward` | Type the command yourself at the Claude Code prompt. It doesn't start from `claude -p` or from a program | | `/ship didn't start:` or `/steward didn't start:` | The rest of the message says what to check | | `/ship is turned off right now`, or the same for `/steward` | Run `/login` at the Claude Code prompt, as the message says, then run the command again | | `/ship can't start from a queued message` or `/steward can't start from a queued message` | Wait until Claude has finished, then run it again | ### The GitHub CLI isn't ready `/ship` and `/steward` reach GitHub through the GitHub CLI, `gh`: | Message | What to do | | :- | :- | | `GitHub CLI (gh) isn't installed` or `GitHub CLI (gh) isn't signed in` | Install it, run `gh auth login` in your shell, then run the command again | | `gh couldn't tell me about a pull request here` | The words in parentheses say what failed. To see `gh`'s own error, run `gh pr view` in your shell. One cause is that none of your checkout's remotes is on a GitHub host that `gh` is signed in to. For GitHub Enterprise, run `gh auth login --hostname HOST` in your shell | ## /ship committed or pushed nothing In some cases, `/ship` leaves the commit or the push to you and says why. Its message can start with `Nothing committed or pushed`, `Nothing pushed`, `I didn't push anything`, `There is no pull request to watch`, or `This branch has no open pull request`. Find your case, take the step in its row, then run `/ship` again. In these cases, if nothing is pushed and the branch has no pull request, Claude reviews your change and [no watch starts](#no-watch-started). ### Public repositories and files that /ship doesn't commit `/ship` looks at the repository and at each changed file's name before it commits: | Case | What to do | | :- | :- | | `For a public repository /ship doesn't commit anything for you` | Commit your work yourself, on a branch other than the default branch | | `By its name, this file may hold secrets` or `By their names, these files may hold secrets`, for a changed file such as `.env` or `password.txt` | If it holds no secret, commit your work yourself, on a branch other than the default branch. Otherwise, set it aside, for example with `git stash push -u -- <file>` in your shell | | The message names empty files that you didn't create, such as `.bashrc` or `.gitconfig` | On Linux and WSL2, the [sandbox](https://code.claude.com/docs/en/sandboxing.md) keeps empty files in your checkout while a sandboxed command runs. The sandbox needs them until the command ends, so don't stash, commit, or delete them before then. Stop the command, for example from [`/tasks`](https://code.claude.com/docs/en/commands#all-commands), or wait for it to end, and the sandbox removes them. If they stay with no sandboxed command running, [remove the leftover files](https://code.claude.com/docs/en/errors.md#stale-sandbox-mask-files-left-by-a-killed-session) | | You changed a file that configures git, CI, or a coding agent, such as `.gitignore`, `CLAUDE.md`, or anything under `.github/` | Commit your work yourself, on a branch other than the default branch | ### Branches that /ship can't commit to or push `/ship` needs a branch that it can commit to and push: | Case | What to do | | :- | :- | | `there is nothing here to open one for`: you have no uncommitted changes, and every commit on the branch is already on the default branch | Make a change, or check out the branch that holds your work | | The default branch holds your commits, and nothing is uncommitted | Move the commits to a new branch, for example with `git switch -c <branch>` in your shell | | You're in detached HEAD state, or in the middle of a rebase | Check out a branch, or finish the rebase | ### Deny rules that forbid a commit or push A [deny rule](https://code.claude.com/docs/en/permissions.md#manage-permissions), such as `Bash(git push *)`, can forbid the commit, the push, or opening the pull request. If whoever set the rule agrees, take those steps yourself. A watch needs `git commit` and `git push` as well. If the rule forbids one of them, [have it removed](#a-tool-rule-or-hook-blocks-a-watch) before you run `/ship` again. ### GitHub Enterprise and forks `/ship` doesn't open a pull request on GitHub Enterprise or from a fork. Push the branch and open the pull request yourself, then run `/ship`. From a fork, the checkout also needs a remote for the repository that the pull request goes to, or no watch starts. ## No watch started A watch is Claude's ongoing work on your pull request, which starts after `/ship`'s review or when you type `/steward`. In some cases, no watch starts and Claude says why. Its message can contain `/steward didn't start.`, `I can't watch`, or `is running on pull request`. Fix the cause, then type `/steward` to start the watch with no second review, or `/ship` if the branch still has no pull request. ### Your pull request or branch isn't ready for a watch Check the pull request and your checkout first: | Cause | What to do | | :- | :- | | The branch has no pull request, and `/steward` doesn't open one | See [/ship committed or pushed nothing](#%2Fship-committed-or-pushed-nothing) | | The pull request's branch isn't checked out in this session | Check it out | | The pull request carries one of [PR Steward](https://code.claude.com/docs/en/pr-steward.md)'s labels, such as `claude-pr-steward-watching` | To take over, remove the label and pull the branch, as Claude's message says | ### A session setting blocks a watch Some settings of the session keep a watch from starting: | Cause | What to do | | :- | :- | | The session is in `bypassPermissions` mode | Press `Shift+Tab` to switch to a permission mode other than plan mode | | [Remote Control](https://code.claude.com/docs/en/remote-control.md) is on | Run `/rc`, then select **Disconnect this session** | | `your PATH has a relative or empty entry` | `/ship` with no pull request number reviews your change, and doesn't commit, push, or look for a pull request. Take the empty or relative entry out of `PATH`, such as a trailing `:`, or `;` on Windows. Start `claude` again, then run `/ship` | | Your `PATH` holds a folder inside the checkout. This happens, for example, when you activate a Python virtual environment that's in the checkout, or start `claude` through `npx` or a package script | To start a session without that folder, run `deactivate` in your shell if you use a virtual environment, then start `claude` directly | ### A tool, rule, or hook blocks a watch A watch needs `gh`, `git commit`, and `git push`, and it doesn't start where a project's hook could approve commands: | Cause | What to do | | :- | :- | | `gh` isn't installed or signed in | See [The GitHub CLI isn't ready](#the-github-cli-isn’t-ready) | | A deny rule forbids a command that the watch needs, such as `git push` | Claude's message names the command and the settings that hold the rule. If whoever set it agrees, remove it there. To change a rule in managed settings, ask your administrator | | The project sets a hook that could approve commands, for example a `PreToolUse` or `PermissionRequest` [hook](https://code.claude.com/docs/en/hooks.md) on shell commands in the checkout's `.claude/settings.json` | The message names the file and says what to change | ### Cases where no watch can start In these cases, `/ship` can still review your change: * You're on native Windows * Someone else opened the pull request * You can't push to the repository that the pull request goes to, and another person has commented or reviewed. If this happens while a watch is running, the watch ends ## A watch stopped A watch is Claude's ongoing work on your pull request, which starts after `/ship`'s review or when you type `/steward`. After one ends, look for a line that starts `Stopped watching pull request`, which gives the reason. To start the watch again, type the command that the line gives, if it gives one. To check whether a watch is still running, type [`/tasks`](https://code.claude.com/docs/en/ship-command#check-whether-a-watch-is-running) at the Claude Code prompt while Claude is idle. Find the words that follow "because" in that line: | Reason | What happened | | :- | :- | | `its check-in was cancelled` | You pressed `Esc` or `Ctrl+C` at the prompt or while Claude was working, or stopped the task in `/tasks`. Claude's messages call its work on the pull request a check-in. An `Esc` that closes the `/tasks` list leaves a watch running | | `the watch couldn't go on` | Claude's reply may give the cause. One cause is that the pull request's branch is no longer checked out. Check it out in the folder where you started, then type `/steward` | | `a watch doesn't carry over when a session is resumed` | The process that ran the watch has ended, for example because you closed the terminal. Running `claude --continue` in your shell brings back the conversation without the watch | | `you moved to another session` | `/clear`, `/resume`, or `/branch` can do that | | `its check-ins were replaced` | You started a `/loop` | | `your new command took over this session` | You ran `/ship` or `/steward` again | | `a deny rule now forbids a command that the watch runs` | Type `/permissions` at the Claude Code prompt to see the rule. See [A tool, rule, or hook blocks a watch](#a-tool-rule-or-hook-blocks-a-watch) | | `the watch reached its time limit` | About seven days passed | | `no next check-in was set` | A declined permission prompt, an error, or a usage limit can do that | | `a file that gh, git, or /steward relies on changed` | See [A file that the watch relies on changed](#a-file-that-the-watch-relies-on-changed) | `No pull request is being watched in this session` means that you typed `/ship stop` or `/steward stop` and no watch was running. Scroll up for a `Stopped watching pull request` line. ### A file that the watch relies on changed A watch ends when something changes a file that `gh`, `git`, or `/steward` relies on. Files such as these count: * **Git's settings**: `git push -u`, `git branch -u`, and `git remote add` change them. An editor such as VS Code can also add a setting to `.git/config` when it opens the repository or you switch back to it * **`.claude/settings.local.json`**: Claude Code writes it when you answer a permission prompt with "Yes, and don't ask again" Review the change, then type `/steward` to start the watch again. If you changed none, one cause on Linux and WSL2 is a [sandboxed](https://code.claude.com/docs/en/sandboxing.md) command that starts or ends during the watch. Stop the command or wait for it to end. ## Messages during a watch These messages appear in your session during a watch: | Message, or what you see | What to do | | :- | :- | | `Claude Code did not run this`, or `Not run · permission denied` | Claude tried a step, and a [limit on the watch](https://code.claude.com/docs/en/ship-command.md#what-claude-code-blocks-during-a-watch) or one of your rules or hooks refused it. The message also appears when the watch had already ended. Claude's messages call those limits "the fence" | | `In this session there's a way around my limits` | A setting in your session, such as a rule, a hook, a plugin, or the sandbox, lets some commands past the [limits on the watch](https://code.claude.com/docs/en/ship-command.md#what-claude-code-blocks-during-a-watch). The text after the message names it. To see your rules, type `/permissions` at the Claude Code prompt. To end the watch while you decide, type `/steward stop` | | A line such as `1 comment not read (no write access, or a bot that you haven't named)` | Claude [skipped a comment](https://code.claude.com/docs/en/ship-command.md#what-claude-does-during-a-watch). Open the link in the message to read it. For a bot that you want Claude to read, type `/steward +botname`. For a person's comment that you agree with, tell Claude what to change | | `gh couldn't say where the pull request's head and base stand` | One cause is a GitHub CLI older than 2.63. Run `gh --version` in your shell to check. Update it, then type `/steward` to start the watch again | | `Claude resuming /loop wakeup` or `/steward --tend` in the session | Claude Code enters them when Claude checks the pull request during a watch. You can keep working as you are | ## Pull request results that you didn't expect Start here when `/ship` ran, and something on GitHub or in your repository surprised you: | What you see | Why, and what to do | | :- | :- | | The pull request's title is a line such as `Update greet.py and 1 more` | `/ship` falls back to that title when Claude can't write one from the session's conversation, for example in a session where you didn't discuss the change. Edit the title and description on GitHub. Next time, run `/ship` in the session where you made the change, or commit your work yourself first, on a branch other than the default branch | | Claude pushed commits or answered a reviewer before you saw them | In auto mode, or where your rules or the sandbox allow a command, a watch works that way. See [Ask Claude to check with you first](https://code.claude.com/docs/en/ship-command.md#ask-claude-to-check-with-you-first) | | New uncommitted changes didn't reach the open pull request | Once a pull request is open, `/ship` doesn't commit your work. Commit it, then push it, as in `git push origin <branch>` in your shell | | `git pull` or `git push` asks for an upstream branch | `/ship` sets no upstream. Name the remote and branch, as in `git push origin <branch>`. Setting an upstream changes git's settings, which [ends a running watch](https://code.claude.com/docs/en/ship-command.md#keep-working-while-a-watch-runs) | ## A custom /ship or /steward command stopped loading A `Not loaded: a custom /ship` or `Not loaded: custom /ship, /steward` notice is about a custom skill or command. Its name is one that the built-in commands reserve, such as `ship`, `ship-local`, or `steward`. Rename it, then restart Claude Code. Leave a repository's `.claude/skills/steward/SKILL.md` as it is, because PR Steward and the watch read it as instructions. The notice doesn't count that file, so a notice that names `/steward` is about another skill or command. ## Related resources * [`/ship` and `/steward`](https://code.claude.com/docs/en/ship-command): what the commands do, how to run them, and what limits Claude during a watch * [Permission modes](https://code.claude.com/docs/en/permission-modes.md): auto mode and the other permission modes * [Hooks](https://code.claude.com/docs/en/hooks.md): the `PreToolUse` and `PermissionRequest` hooks