Updated 20 hours ago
Claude Code 2.1.311 adds idle holds for self-hosted runners and fixes background-agent handling

Claude Code 2.1.311 adds idle holds for self-hosted runners and fixes background-agent handling

Anthropic’s October 26 release adds two runner controls and addresses interrupted MCP reads, late tool connections and nested background‑worktree cleanup. These are release‑note changes, with no independent reliability test implied.

The update focuses on work that continues around an idle session

Anthropic’s [Claude Code 2.1.311 release](https://github.com/anthropics/claude‑code/releases/tag/v2.1.311), published on October 26, adds `--hold‑idle‑file` and `--max‑hold‑min` to `self‑hosted‑runner`. The stated purpose is to keep an idle session while the host reports processes that the session left running. The practical issue is the difference between a conversation becoming idle and all of its associated work being finished. A host that still has processes running needs a way to represent that state. These new controls address that runner lifecycle; the release notes do not specify their defaults or a complete configuration recipe, so their names should not be treated as a guarantee that every background process is preserved indefinitely.

MCP tool availability and interruption get separate fixes

The [same release](https://github.com/anthropics/claude‑code/releases/tag/v2.1.311) reports a fix for interruptions that did not take effect until a timeout while an MCP server had not answered a resource read or a skill was still downloading. It also fixes subagents being unable to use MCP tools from servers that finished connecting after the subagent started. Those changes address two different points in a connected‑tool workflow. One concerns stopping an outstanding operation; the other concerns whether a running subagent can use a tool connection that becomes ready later. Anthropic describes both as fixes. OpenTools has not reproduced the earlier behavior or tested the new version, and the notes do not establish that every MCP server or slow connection behaves the same way.

Background agents get changes to wakeups and worktree cleanup

For parallel coding work, the [2.1.311 notes](https://github.com/anthropics/claude‑code/releases/tag/v2.1.311) report a fix for an isolated subagent worktree being removed while a background subagent it had started was still working there. They also report a fix for background agents in auto mode that were waiting on their own shells and started a new main conversation turn on every wake. The first change concerns the files a nested worker still needs; the second concerns when waiting becomes another conversation turn. Teams using background subagents can distinguish those symptoms from a model’s code quality or the success of the underlying task. This release is a concrete lifecycle update, rather than evidence that unattended jobs will always finish or that an execution host will remain available.

The release also changes how non‑retryable API responses are handled

Anthropic [lists another fix](https://github.com/anthropics/claude‑code/releases/tag/v2.1.311) for Claude Code retrying requests that the API had marked as not retryable. According to the notes, that behavior could hold a turn for minutes or indefinitely in the unattended retry mode identified as `CLAUDE_CODE_RETRY_WATCHDOG`. The source describes the prior condition and its correction. For developers evaluating this update, the useful distinction is between a session waiting on work, a tool connection becoming ready, and a request that the API says should not be retried. Version 2.1.311 addresses specific behavior in each area. Its release notes provide the change record; confirming the effect in a particular runner and tool setup still requires checking that environment. Anthropic co‑founder Dario Amodei at TechCrunch Disrupt in San Francisco on September 20, 2023. Archive company context, not the Claude Code 2.1.311 launch or a demonstration of its runner features. Photo: Kimberly White/Getty Images for [TechCrunch](https://www.flickr.com/people/techcrunch/), [Flickr](https://www.flickr.com/photos/techcrunch/53201932199/) / [Wikimedia Commons](https://commons.wikimedia.org/wiki/File:Dario_Amodei_at_TechCrunch_Disrupt_2023_04.jpg), [CC BY 2.0](https://creativecommons.org/licenses/by/2.0/deed.en). Resized and cropped for display.

Share this article

PostShare

Related News