{"version":"2.1.267","anchor":"self-hosted-runner-cli-gains-git-routing-and-drain-wait-flag","canonical_anchor":"new-use-anthropic-git-proxy-runner-opt-in","heading":"Self-hosted runners gain a git-proxy opt-in and git-routing flags","tier":"use","area":"Self-Hosted Runner","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.267\/e\/self-hosted-runner-cli-gains-git-routing-and-drain-wait-flag","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.267","markdown":"### Self-hosted runners gain a git-proxy opt-in and git-routing flags\n\nSelf-hosted runner CLI adds --use-anthropic-git-proxy plus git remote rewriting and drain-wait flags\n\n**What**\n\n- A new `--use-anthropic-git-proxy` flag lets a self-hosted runner opt into having Anthropic manage git authentication server-side (using the session creator's GitHub OAuth token, or the org's GitHub App token for bot\/agent sessions) instead of configuring git auth on the runner itself. Registration logs \"Registering as opted in to Anthropic-managed git (--use-anthropic-git-proxy)\"; if the server can't provide governed git for a session despite the flag, a warning explains the fallback to the legacy clone-URL proxy (deprecated).\n\n- New `--git-ssh-rewrite <host>` and `--git-host-rewrite <f>=<t>` flags let a runner rewrite git remote URLs, useful for SSH-only hosts or split-horizon DNS setups.\n\n- The `SELF_HOSTED_RUNNER_DRAIN_WAIT_MS` environment variable (default 0, meaning SIGTERM is sent immediately; max 86400) controls how long a runner waits before shutting down, with `--drain-wait-bg-tasks-sec` documented as a deprecated alias.\n\n**Why**\n\nThis gives self-hosted runner operators more control over how git authentication and remote URLs are handled, and how long a runner waits for background tasks before terminating.\n\n- Area: Self-Hosted Runner\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 3\/5"}