Unclear It is not clear what puts Claude Code into code review mode, so it is unknown which runners this applies to.
What
A self-hosted runner is a machine you run yourself that starts Claude Code sessions for the web. Sessions it recognises as a code review are now handled specially.
The runner refuses to start a code review when:
- it is started with
--debug-token-dir - it runs on Windows
--capacityis above 1- it cannot make itself non-dumpable, meaning protected from having its memory copied out
Otherwise the Claude Code process it starts for the review:
- gets no repository passed as
--add-dir - loads no user, project or local settings, so nothing from that machine's Claude Code config (it is started with an empty
--setting-sources=and a filtered set of arguments) - gets no session token file
- receives its session and inference tokens on file descriptors 4 and 5 (numbered channels opened by the parent process) instead of in its environment variables
The hook that runs after the session no longer receives the session access token for reviews.
On its side, Claude Code in code-review mode stops with "[code review] Not starting: in a code review Claude Code must get its two tokens on file descriptors 4 and 5" unless it can make itself non-dumpable and the tokens arrive on the descriptors named by CLAUDE_CODE_WEBSOCKET_AUTH_FILE_DESCRIPTOR and CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR, with no CLAUDE_CODE_SESSION_ACCESS_TOKEN or CLAUDE_CODE_OAUTH_TOKEN in the environment.
Startup also gained a new condition that clears the setting sources, the same thing --restricted does. Before, only --restricted or one existing check did this.
Why
If you operate a self-hosted runner, code reviews will be declined on Windows, with --debug-token-dir, or with --capacity above 1. In the setups that do run them, tokens are kept out of the review process's environment and the machine's own Claude Code settings are not used.
5. `CLAUDE_CODE_OAUTH_TOKEN` environment variable. A long-lived OAuth token generated by [`claude setup-token`](#generate-a-long-lived-token). Use this for CI pipelines and scripts where browser login isn't available. If you run `/login` w…see the edit
> If your machine has no [managed settings](/docs/en/settings.md#check-what-your-organization-enforces) and your session doesn't use [`/login` credentials](/docs/en/authentication#authentication-precedence) for a Team or Enterprise plan, a…see the edit
The Agent SDK's [`additionalDirectories`](/docs/en/agent-sdk/typescript#options) option in TypeScript and [`add_dirs`](/docs/en/agent-sdk/python#claudeagentoptions) option in Python receive the exceptions too, even though the TypeScript op…see the edit
| `CLAUDE_CODE_SESSION_ACCESS_TOKEN` | The session JWT, prefixed `sk-ant-cc-`. Its `act` claim identifies the session creator, with the creator's email when the creating surface recorded it. The value is the token at spawn time; refreshes …see the edit
| `CLAUDE_CODE_OAUTH_TOKEN` | The short-lived OAuth access token the child uses for model inference, with a lifetime of about 30 minutes. The runner re-mints it before expiry and delivers the rotation over the child's stdin, so a wrapper t…see the edit
[Wrapper scripts](/docs/en/self-hosted-environments-configuration.md#wrapper-scripts) run inside the session, before Claude starts. Instead of calling a JWT library, they can run the runner binary's `self-hosted-runner decode-token` subcom…see the edit
* **OAuth token**: generate a token with [`claude setup-token`](/docs/en/authentication#generate-a-long-lived-token), authorize it for your Team or Enterprise organization, and set it as `CLAUDE_CODE_OAUTH_TOKEN` in the job's environment. …see the edit
* A session where your organization's managed settings [lock skills to plugin sources](/docs/en/settings-reference.md#strictpluginonlycustomization-skills), or one you start with a [`--setting-sources`](/docs/en/cli-reference#cli-flags) li…see the edit
It is not clear what puts Claude Code into code review mode, so it is unknown which runners this applies to.
CLAUDE_CODE_OAUTH_TOKEN on Authentication