←

Claude Code 2.1.311 adds self-hosted runner idle hold and fixes 1M-context compaction

Anthropic

Tools official 1 src. ~1 min

Claude Code 2.1.311 adds --hold-idle-file and --max-hold-min to self-hosted-runner, letting a session stay idle while the host reports processes it left running. Standard-context sessions that crossed 200K tokens now compact and continue instead of failing with "Usage credits required for 1M context", and retries no longer run on requests the API marked non-retryable. Subagents also pick up MCP tools from servers that finish connecting after the subagent starts.

Why it matters

Unattended and self-hosted coding-agent runs stop dying on deterministic errors.

Importance: 2/5

Patch release with fixes that matter for long unattended runs.

Sources