Environment-variable-only settings
These runner settings are read from the environment only and cover behavior most deployments leave at the default:
| Env var | Default | Description |
|---|---|---|
SELF_HOSTED_RUNNER_BG_RESULT_GRACE_MS | 30000 | How long the runner considers a session busy after a background task finishes while the follow-up turn that reads the result hasn't started. The --drain-wait-sec and --release-idle-session-min rows describe where the hold applies on drain and idle release, and Runner lifecycle describes where it applies on --retire-at retirement. 0 or an unusable value falls back to the default, so the hold can't be turned off. Requires Claude Code v2.1.228 or later. |
SELF_HOSTED_RUNNER_HOST_CONFIG_DIR | ~/.claude | Directory captured into the runner's startup snapshot and seeded into each session's CLAUDE_CONFIG_DIR; changes on disk apply after a runner restart. Setting the variable also moves where the runner reads .claude.json for MCP seeding, so setting it, including to its own default, relocates that lookup; point at an empty directory to disable seeding entirely. |
SELF_HOSTED_RUNNER_MAX_LIFETIME_GRACE_MS | 900000 | How long the runner waits after a session reaches its --kill-session-after-min limit, for a running turn to finish or the release to complete, before it terminates the session |
SELF_HOSTED_RUNNER_SIGKILL_GRACE_MS | 30000 | How long the runner waits for the OS to deliver SIGKILL to a child stuck in uninterruptible I/O before exiting itself. Floored at --post-session-hook-timeout-sec plus 15 seconds, and 30 more when --push-outcome-on-release is set, so the effective minimum is 75 seconds at defaults. |
CLAUDE_RUNNER_FETCH_DEPTH | 50 | Git fetch depth for fresh clones. Set a positive integer, or full or 0 for a complete fetch. Repositories already present in the workspace keep their existing depth. |
CLAUDE_RUNNER_SKIP_GIT_VERIFY | unset | When 1, skip the .git presence check after a checkout hook runs. Set this when your hook materializes a non-git source. |
FORCE_AUTOUPDATE_PLUGINS | unset | When 1, let plugin marketplaces auto-update even though the binary is pinned |
CLAUDE_CODE_DISABLE_ARTIFACT | unset | When 1, disable the Artifact tool in sessions regardless of the organization's admin setting, and drop the *.frame.claudeusercontent.com egress requirement |