Skip to content

Claude Code 2.1.311 repairs background-agent lifecycles

Updated Claude Code

Summary

The release addresses premature worktree cleanup, duplicate hook activity and background-session recovery, with new self-hosted idle controls.

Date
Pricing
Not stated in the sources we cited.

Anthropic published Claude Code 2.1.311 on October 26, 2026. Its main significance is a cluster of background-agent and session-lifecycle fixes, rather than a new model launch.

Protect work that is still running

The notes address an isolated worktree being removed while a background subagent inside it was still active. They also fix repeated SubagentStop hooks, background agents starting unnecessary main turns, and certain attached or scheduled background sessions not restarting after a crash.

For self-hosted runners, --hold-idle-file and --max-hold-min let the host signal that processes left by a session are still running. These are explicit host controls, not a promise that every remote task persists indefinitely.

Session consistency and integrations

Other documented fixes cover stale memory/instruction files after compaction and subagents missing MCP tools from servers that connected late. The release also stops retrying requests when the API explicitly says not to retry.

These are vendor-reported fixes. The article does not claim that every affected configuration was reproduced or independently tested.

See the claude-code hub.

More from Claude Code

View all

Questions

What is Claude Code?

The repository describes it as an agentic coding tool that lives in your terminal, understands your codebase, and handles routine tasks and git workflows through natural language commands.

Is Claude Code open source?

Not stated in the cited sources. The GitHub API does not report a recognized license for the repository.

Does Claude Code support MCP?

The docs overview lists connecting your tools with MCP, and the v2.1.295 release notes include MCP fixes.

Filed on Agent Radar. Claims in this note are limited to the sources above.