{"version":"2.1.327","anchor":"self-hosted-runner-model-socket-nested-claude-code-can-adop","canonical_anchor":"self-hosted-runner-model-socket-nested-claude-code-can-adop","heading":"Self-hosted runners can share their model access with Claude Code started inside a session","tier":"use","area":"Self-Hosted Runners","scope":"both","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.327\/e\/self-hosted-runner-model-socket-nested-claude-code-can-adop","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.327","markdown":"### Self-hosted runners can share their model access with Claude Code started inside a session\n\nSelf-hosted runners gain opt-in nested model access over a socket, with a call budget, model allow list and a new managed setting for forced-login machines\n\n**What**\n\nA self-hosted runner is a machine you run that hosts Claude Code sessions. Commands in a runner session can now start another Claude Code (for example `claude -p`) that uses the runner's model access instead of its own credentials. It connects through a private unix socket, a local connection file, named by `CLAUDE_CODE_RUNNER_MODEL_SOCKET`.\n\n- `--nested-model-access` (env `SELF_HOSTED_RUNNER_NESTED_MODEL_ACCESS`) turns it on. It needs `--nested-model-allow`, a list of allowed models, or the runner will not start. A model outside the list is rejected with a message naming `--nested-model-allow`.\n\n- `--nested-model-call-budget` caps the number of calls. It defaults to 200.\n\n- Runner sessions get matching `nestedModelAccess`, `nestedModelCallBudget` and `nestedModelAllow` options. The runner help also mentions a `SELF_HOSTED_RUNNER_DIFF_FINDS_NESTED_REPOSITORY` env note.\n\n- The proxy behind the socket forwards only `\/v1\/messages` and token counting. It refuses on Windows, with third-party providers, for HIPAA organizations, with server-managed settings, with governed git, or when `CLAUDE_CODE_SUBPROCESS_ENV_SCRUB` or `ANTHROPIC_UNIX_SOCKET` is set.\n\n- The nested Claude Code overwrites `ANTHROPIC_UNIX_SOCKET`, `ANTHROPIC_BASE_URL` and `CLAUDE_CODE_OAUTH_TOKEN` with placeholders. It declines for many reasons, including an existing credential, a scrubbed environment, `--sdk-url` on the command line, and modes that skip permission prompts. It sends a proof header, `x-claude-runner-model-proof`, derived from the session token, and looks up the organization at `\/runner\/organization`.\n\n- `allowNestedModelAccessUnderForceLogin` is a new managed setting (one set by an administrator). On a machine whose managed settings force a sign-in (`forceLoginOrgUUID` or `forceLoginMethod`), runner model access is refused unless this is true. The refusal message says to set it on self-hosted runner hosts only.\n\n- `CLAUDE_CODE_RUNNER_MODEL_SOCKET` and a second new variable, `CLAUDE_CODE_DISABLE_PROXY_SCHEME_REPAIR`, join the list of connection-related environment variables alongside `ANTHROPIC_UNIX_SOCKET`. What `CLAUDE_CODE_DISABLE_PROXY_SCHEME_REPAIR` does was not traced.\n\nSeparately, when a runner shuts down it now asks the server for the state of each turn before deciding whether to wait. That wait is measured from the start of the check, so it no longer restarts.\n\n**Why**\n\nThis changes where model credentials flow on runner machines. Operators control it with the allow list and call budget. Administrators who force a sign-in must opt in explicitly with `allowNestedModelAccessUnderForceLogin`, and without it access is refused.\n\n- Area: Self-Hosted Runners\n- Names: `CLAUDE_CODE_RUNNER_MODEL_SOCKET`\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 4\/5\n- Scope: both\n- Heads-up: yes"}