{"version":"2.1.318","anchor":"self-hosted-runner-server-sent-idle-session-release","canonical_anchor":"self-hosted-runner-server-sent-idle-session-release","heading":"Self-hosted runner: idle limit from Anthropic and server turn signals","tier":"notice","area":"Self-Hosted Runner","scope":"org","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.318\/e\/self-hosted-runner-server-sent-idle-session-release","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.318","markdown":"### Self-hosted runner: idle limit from Anthropic and server turn signals\n\nThe self-hosted runner can release idle sessions on a limit Anthropic sends, using a server turn signal and keeping sessions with unsaved work\n\n**What**\n\nThe self-hosted runner is the program you run on your own machines to host Claude Code sessions. It can already release a session after the user has been idle for a while. That idle handling has grown.\n\n- **Idle limit from Anthropic.** When `--release-idle-session-min` is not set, the runner can take an idle limit from Anthropic's control plane, Anthropic's managing server. Your own `--release-idle-session-min` setting overrides it. A default can also come from `CCR_SHR_IDLE_RELEASE_DEFAULT_MINUTES`.\n\n- **Safety checks.** A session is released only if its code checkouts are clean and its folder holds only what the runner put there; sessions with unsaved work are kept. The folder check uses \/proc. The check is skipped for sessions that may continue without the user, such as scheduled prompts or teammate agents.\n\n- **Turn signal.** Session assignments from the server now carry a `turn_signal` saying whose turn it is. The runner logs it, tracks it in `sessionTurnState`, passes it to sessions through `onNoTurnSignal`, and clears it on exit. New names `self_hosted_server_idle_limit` and `self_hosted_turn_signal` were added, along with three constants for a reply-gate policy.\n\n- **Lost-files mark.** A per-session `.disk-mark` file lets a session be told if its files were lost.\n\n- **Help and warnings.** Help text now documents `--release-idle-session-min` (env `SELF_HOSTED_RUNNER_SESSION_IDLE_MS`), `--hold-idle-file` (env `SELF_HOSTED_RUNNER_HOLD_IDLE_FILE`) and `--max-hold-min`. The runner warns when `--release-idle-session-min` is only spaces (read as 0, so idle sessions are kept) or is last with no value (ignored). The settings line notes when the limit was sent by Anthropic's control plane.\n\n**Why**\n\nIf you operate a self-hosted runner, sessions may now be kept alive or released on a schedule Anthropic sets, not only your own. Set `--release-idle-session-min` if you want to control the limit yourself.\n\n- Area: Self-Hosted Runner\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 3\/5\n- Scope: org\n- Heads-up: yes"}