Source Intelligence

DisclaimerUnofficial, and not affiliated with Anthropic. Nearly all of this is read straight out of what ships: npm bundles, captured prompts, published docs. Anthropic's own notes go in verbatim, marked as theirs. The rest is my reading, and every entry carries the strings behind it. If one looks wrong, vote it down and say why.

All of v2.1.238 Home All releases olderv2.1.237 v2.1.239newer
Claude Code v2.1.238

Self-hosted runner can defer its drain on the first shutdown signal

Use it now
Useful2 Signal2
Self-Hosted Runner Notable

Self-hosted runners can keep serving attached sessions on the first shutdown signal instead of draining.

--defer-shutdown-max-minSELF_HOSTED_RUNNER_DEFER_SHUTDOWN_MAX_MS
What

New flag --defer-shutdown-max-min <m> makes the first SIGTERM stop the runner accepting new work while it keeps serving attached sessions, rather than starting the drain budget straight away. It writes SELF_HOSTED_RUNNER_DEFER_SHUTDOWN_MAX_MS; 0 disables it and is the default, so operators who do not pass the flag see no change.

Details
  • After M minutes everything still attached is released through the park path; a further grace period later it drains as a last resort. It exits 0 as soon as no session is held.
  • A second signal drains immediately; a third force-exits.
  • Help text warns that the supervisor's stop timeout must exceed M minutes plus the grace plus the shutdown budget, and the troubleshooting table gained a row for the new exit line.
  • New telemetry points self_hosted_defer_shutdown and self_hosted_defer_ceiling; poll-failure backoff now distinguishes timeout and transport errors from 5xx responses.
Usage
claude self-hosted-runner --defer-shutdown-max-min 30
Evidence

--defer-shutdown-max-min, --defer-shutdown-max-min <m>

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

Related

Other releases about the same thing. Found by shared names or similar wording; neither means one caused the other.

See this entry in the whole of v2.1.238 →