{"version":"2.1.224","anchor":"self-hosted-runner-orchestrator-polls-for-spawn-hints-and-ru","canonical_anchor":"self-hosted-runner-orchestrator-polls-for-spawn-hints-and-ru","heading":"self-hosted-runner orchestrator polls for spawn hints and runs your own spawn script","tier":"use","area":"Self-Hosted Runner","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.224\/e\/self-hosted-runner-orchestrator-polls-for-spawn-hints-and-ru","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.224","markdown":"### `self-hosted-runner orchestrator` polls for spawn hints and runs your own spawn script\n\nAn orchestrator subcommand polls for capacity hints and runs your own spawn-runner script to autoscale.\n\n**What**\n\nA new subcommand for people running their own Claude Code runner fleet. It polls the server for hints that more runner capacity is needed and runs `${hooks-dir}\/spawn-runner` once per hint, so autoscaling is handled by a script you write. `--hook-concurrency` defaults to 4, `--hook-timeout` to 60s, and `--expected-spawn-seconds` to 120 (sent to the server as the lease time). `--min-idle` requests standby capacity, `--debug-dir` keeps diagnostics.\n\n**Details**\n\n- Hook exit codes are a contract: 0 is success, 1 is retryable and backs off, 2 or higher is non-retryable and trips a circuit break.\n- The tail of the hook's stderr is forwarded to the server as the failure reason.\n- It exits non-zero if the poll endpoint returns HTTP 400, 401, 403, 404 or 426.\n- It refuses to start when the hook timeout plus the 5s SIGKILL grace period exceeds `--expected-spawn-seconds`. The hooks directory is required.\n\n**Evidence**\n\n`\/v1\/code\/runners\/self-hosted\/spawn-hints\/poll`\n\n- Area: Self-Hosted Runner\n- Names: `self-hosted-runner orchestrator`, `--hook-concurrency`, `--hook-timeout`, `--expected-spawn-seconds`, `--min-idle`\n- Tier: Use it now\n- Useful: 3\/5\n- Signal: 5\/5"}