{"version":"2.1.335","anchor":"self-hosted-runner-407-proxy-error-message","canonical_anchor":"self-hosted-runner-407-proxy-error-message","heading":"Self-hosted runners route through the agent proxy with a token opt-out and clearer errors","tier":"use","area":"Self-Hosted Runner","scope":"org","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.335\/e\/self-hosted-runner-407-proxy-error-message","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.335","markdown":"### Self-hosted runners route through the agent proxy with a token opt-out and clearer errors\n\nSelf-hosted runners now route through an agent proxy with proxy session tokens, an opt-out flag, clearer 407 errors and a reworked git forwarder\n\n**What**\n\nA self-hosted runner is a machine you run yourself that picks up Claude Code sessions. An agent proxy is a server that sits between that runner and the outside world and passes its requests along. This release changes how the runner works with one:\n\n- `--agent-proxy-url <url>` now appears in the runner's help text. It routes every session through an agent proxy (https only), and the runner also clones http(s) repositories through it.\n\n- Proxy session tokens are now recognised. A token is a credential that proves who is asking. The runner refuses to decode a proxy token (`decode-token: this is a proxy session token.`) and sends registration and API requests through the agent proxy, with specific error messages when something fails. The request headers are now built from `SELF_HOSTED_RUNNER_AGENT_PROXY_URL` and the runner token.\n\n- `--no-agent-proxy-session-tokens` is a new opt-out flag, also available as the environment variable `SELF_HOSTED_RUNNER_NO_AGENT_PROXY_SESSION_TOKENS`. With it, the runner registers directly and keeps the real tokens on the runner.\n\n- A registration failure where the proxy answers with status 407, meaning the proxy wants you to log in to it, now gets its own message suggesting `--no-agent-proxy-session-tokens` or `SELF_HOSTED_RUNNER_NO_AGENT_PROXY_SESSION_TOKENS`. Before, you got a generic 401\/403 credential message.\n\n- The runner warning now says whether registration goes through the agent proxy, and mentions `SELF_HOSTED_RUNNER_SKIP_AGENT_PROXY_CHECK` when `--no-agent-proxy-session-tokens` is on.\n\n- The git forwarder, which connects git to the agent proxy, now starts before the post-session hook, so git run by that hook can reach the git mount. It is also created for hook-based checkouts, and the checkout hook's git environment can be pointed at the proxy URL. If it cannot start, the runner logs \"the forwarder to the self-hosted agent proxy did not start\".\n\n- Session results now carry `endedByServer`.\n\n- A new `.claude<suffix>.json` file is read before the host config is applied.\n\n**Why**\n\nThis changes how self-hosted runners sign in and where the real tokens are kept. If your runner sits behind a proxy that asks for a login, the new 407 message points you straight at the opt-out instead of a vague credential error.\n\n- Area: Self-Hosted Runner\n- Names: `SELF_HOSTED_RUNNER_NO_AGENT_PROXY_SESSION_TOKENS`\n- Tier: Use it now\n- Useful: 3\/5\n- Signal: 3\/5\n- Scope: org\n- Heads-up: yes"}