{"version":"2.1.309","anchor":"self-hosted-runner-treats-code-review-sessions-specially-to","canonical_anchor":"setting-sources-emptied-under-another-condition","heading":"Self-hosted runners run code reviews in a locked-down mode","tier":"notice","area":"Self-Hosted Runners","scope":"both","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.309\/e\/self-hosted-runner-treats-code-review-sessions-specially-to","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.309","markdown":"### Self-hosted runners run code reviews in a locked-down mode\n\nCode-review sessions on self-hosted runners get no local settings or repository folder, and must receive their tokens on file descriptors 4 and 5\n\n**What**\n\nA 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.\n\nThe runner refuses to start a code review when:\n\n- it is started with `--debug-token-dir`\n\n- it runs on Windows\n\n- `--capacity` is above 1\n\n- it cannot make itself non-dumpable, meaning protected from having its memory copied out\n\nOtherwise the Claude Code process it starts for the review:\n\n- gets no repository passed as `--add-dir`\n\n- 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)\n\n- gets no session token file\n\n- 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\n\nThe hook that runs after the session no longer receives the session access token for reviews.\n\nOn 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.\n\nStartup also gained a new condition that clears the setting sources, the same thing `--restricted` does. Before, only `--restricted` or one existing check did this.\n\n**Why**\n\nIf 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.\n\n- Area: Self-Hosted Runners\n- Names: `CLAUDE_CODE_REMOTE_SESSION_ORIGIN`\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 3\/5\n- Scope: both\n- Heads-up: yes"}