Follow Discord
Sweep 22 Oct 2026 · 21:04Z Build v2.1.309 528 read Stable v2.1.308 Latest v2.1.309 Next v2.1.309 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.309 ·

Self-hosted runners run code reviews in a locked-down mode

Code-review sessions on self-hosted runners get no local settings or repository folder, and must receive their tokens on file descriptors 4 and 5

Group of 3 You'll notice Improvements
JSON All of v2.1.309
You'll noticeTier: how much it should matter to you
3Useful: my rating, 1 to 5
3Signal: worth watching, 1 to 5
Self-Hosted RunnersArea: what it touches
ImprovementsKind: in v2.1.309,
ImprovementsSection of the release

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
  • --capacity is 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.

Read from
What the documentation says
CLAUDE_CODE_OAUTH_TOKEN Authentication modified, high confidence 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
CLAUDE_CODE_OAUTH_TOKEN Automate actions with hooks modified, high confidence > 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
--setting-sources Configure permissions modified, high confidence 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 Customize sessions in self-hosted environments modified, high confidence | `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 Customize sessions in self-hosted environments modified, high confidence | `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
CLAUDE_CODE_SESSION_ACCESS_TOKEN Verify session identity in self-hosted environments modified, high confidence [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
CLAUDE_CODE_OAUTH_TOKEN Configure server-managed settings modified, high confidence * **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
--setting-sources Extend Claude with skills modified, high confidence * 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
How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtIt is not clear what puts Claude Code into code review mode, so it is unknown which runners this applies to.
Anthropic's documentation agreesCLAUDE_CODE_OAUTH_TOKEN on Authentication

See this entry in the whole of v2.1.309 →

Feedback