What it is
Self-hosted runner can now delete a session's leftover files when the session ends
Not Anthropic's. This is the line from the earliest changelog entry here that named it, v2.1.268.
Presence across releases
1Build by build
12One row per release since the first build this name was read out of. Absent means the build was read and the name was not in it, never mined means no bundle for that release was ever archived, and a declared type or a default is only ever what that release's own bundle stated.
First cited
1The earliest release whose published evidence quoted SELF_HOSTED_RUNNER_REMOVE_SESSION_STATE was v2.1.268, 10 Sep 2026. That is the oldest release this project wrote about it, so it is a floor on the name's age and not the release that introduced it. It is not a presence reading: which builds carried the name is the table above.
Names beside it
Every environment variable in the inventory starting self_hosted_runner, up to twelve of them.
SELF_HOSTED_RUNNER_BASE_DIRThe self-hosted runner fails fast if its base directory is unwritable or the mount hangs. v2.1.224
SELF_HOSTED_RUNNER_BG_RESULT_GRACE_MSSelf-hosted runners hold shutdown until a finished background task is read; the grace window is configurable. never mined
SELF_HOSTED_RUNNER_CLIENT_LABELName a self-hosted runner with --client-label or an env var instead of using the hostname. v2.1.248
SELF_HOSTED_RUNNER_CONFIGURE_GITNo description from anybody. v2.1.224
SELF_HOSTED_RUNNER_CONFINE_REPO_SETTINGSThe runner can warn about or block repo-committed settings that grant access outside the workspace. v2.1.224
SELF_HOSTED_RUNNER_DEBUG_DIRNo description from anybody. v2.1.224
SELF_HOSTED_RUNNER_DEBUG_TOKEN_DIRNo description from anybody. v2.1.224
SELF_HOSTED_RUNNER_DEFER_SHUTDOWN_MAX_MSSelf-hosted runners can keep serving attached sessions on the first shutdown signal instead of draining. v2.1.238
SELF_HOSTED_RUNNER_DRAIN_GRACE_MSNo description from anybody. v2.1.224
SELF_HOSTED_RUNNER_DRAIN_MARKER_FILEThe self-hosted runner can now snapshot an operator's Claude config and seed it into every session, with a drain-marker mechanism v2.1.271
SELF_HOSTED_RUNNER_DRAIN_WAIT_MSSelf-hosted runner adds git URL-rewriting flags and an Anthropic-managed git auth option, plus a documented drain-wait timeout v2.1.224
SELF_HOSTED_RUNNER_ENVIRONMENT_SECRETRunner "pool" flags are renamed to "environment"; old names still work but warn. v2.1.224
Read out of the published npm bundle release by release, and out of Anthropic's own documentation as this site captured it. Nothing on this page is a description anybody here wrote about what the environment variable does. All environment variables.