{"name":"SELF_HOSTED_RUNNER_MAX_HOLD_MS","slug":"self-hosted-runner-max-hold-ms","family":"env","title":"Environment variables","noun":"environment variable","description":"New `--hold-idle-file` and `--max-hold-min` flags keep a self-hosted runner session held while a file you update stays recent","description_source":"entry","described_by":{"version":"2.1.311","anchor":"self-hosted-runner-can-hold-sessions-while-a-host-file-stays"},"presence":{"first_seen":"2.1.311","removed_in":null,"in_current_build":true,"newest_mined":"2.1.312","builds":2,"mined_builds":153,"first_cited":{"version":"2.1.311","released_at":"2026-10-26 19:47:57","spans":1}},"aliases":[],"entries":[{"version":"2.1.311","anchor":"self-hosted-runner-can-hold-sessions-while-a-host-file-stays","heading":"Self-hosted runners can keep a session held while a file stays fresh","line":"New `--hold-idle-file` and `--max-hold-min` flags keep a self-hosted runner session held while a file you update stays recent","released_at":"2026-10-26 19:47:57","reason":"found in this entry's text"},{"version":"2.1.311","anchor":"self-hosted-runner-logs-a-leftover-hold-line-in-its-watchdog","heading":"Self-hosted runner startup line now reports the leftover hold setting","line":"The self-hosted runner's startup watchdog line now shows a `leftover-hold=` field and warns when the hold does nothing","released_at":"2026-10-26 19:47:57","reason":"found in this entry's text"}],"entries_total":2,"docs":[{"source":"claude-code","path":"self-hosted-environments-reference","title":"Self-hosted environments reference","documented":false}],"docs_total":1,"gates":[],"related":[{"name":"SELF_HOSTED_RUNNER_MAX_LIFETIME_MS","slug":"self-hosted-runner-max-lifetime-ms","description":"Maximum age in milliseconds of each session process spawned by `claude self-hosted-runner`; an unset, non-numeric or non-positive value disables it, and `--kill-session-after-min` sets it. At the deadline the runner normally releases the session (paused server-side, resumable) instead of killing it: one waiting on its user is released at once, and one with a turn in flight is released when that turn parks or finishes. A turn still running, or a release that is not accepted, is terminated after `SELF_HOSTED_RUNNER_MAX_LIFETIME_GRACE_MS` (default 15 minutes)."}],"url":"https:\/\/changelogs.core-directive.com\/reference\/env\/self-hosted-runner-max-hold-ms","family_url":"https:\/\/changelogs.core-directive.com\/reference\/env.json"}