What happened
Anthropic has released version 2.1.311 of Claude Code, a command-line interface tool designed for AI-assisted software development. This update introduces several functional improvements and fixes for issues affecting session persistence, subagent coordination, and cloud-based environment management. Key changes include new configuration options for self-hosted runners, improved startup performance for Pro and Max accounts, and refined handling of conversation history compaction.
The v2.1.311 release focuses heavily on bug fixes and performance optimizations. Notable fixes include resolving long startup freezes, correcting issues where subagents failed to utilize MCP (Model Context Protocol) tools, and fixing errors where conversation history compaction caused the loss of context in long sessions.
New features include the addition of '--hold-idle-file' and '--max-hold-min' flags for self-hosted runners, allowing users to maintain idle sessions while the host processes remain active. Additionally, the update improves startup times for Pro and Max subscribers by reducing unnecessary network requests during the launch sequence.
The update also addresses specific integration issues within VS Code and JetBrains, such as fixing syntax coloring in code blocks and resolving problems where custom skills failed to include necessary file context. Cloud-based sessions received updates to improve routine management and error reporting for API operations.
Why it matters
This update is significant for developers relying on Claude Code for automated coding tasks, as it addresses critical stability issues that previously caused session stalls, incorrect file handling, and subagent failures. By improving the reliability of background sessions and cloud-based environments, Anthropic is reducing the friction associated with using AI agents for complex, multi-step development workflows. These fixes ensure that long-running tasks are less likely to be interrupted by technical errors, thereby increasing the practical utility of the tool in professional software engineering environments.
For developers, the reliability of an AI coding assistant is paramount. Previous issues, such as stalled file edits or subagents losing access to tools, directly impacted productivity. By addressing these, Anthropic is stabilizing the core experience of Claude Code.
The improvements to conversation compaction are particularly important for users working on large codebases, as they allow the model to maintain context over longer periods without hitting limits or stalling. This makes the tool more viable for complex, multi-file refactoring tasks.
The update also clarifies error messaging and provides better feedback for common issues like network proxy blocks or disk space limitations, which helps users troubleshoot their environments more effectively without needing to rely on external support.
Interactive Mechanism: How It Actually Works
Explore the underlying technology behind this development interactively.
crm_get_transaction(id='4092').An agent must create a draft calendar event for Tuesday at 2 p.m. Which evidence would establish the requested result?
What to watch next
Users should monitor how these stability improvements impact the consistency of long-running background agents and subagent teams. Specifically, the new configuration options for self-hosted runners and the refined compaction logic for conversation history are areas where developers may see improved performance in large-scale projects. It remains to be seen if these changes fully resolve the reported issues with environment-specific tool connectivity across different cloud providers like AWS Bedrock and Google Vertex AI.
Developers should observe whether the new compaction logic effectively balances context retention with performance, especially in sessions exceeding 200K tokens.
The effectiveness of the new self-hosted runner flags in maintaining session state during long-running background tasks will be a key metric for teams using custom infrastructure.
Users should verify if the changes to model catalog loading—now sourced from a signed file on downloads.claude.ai—impact their specific deployment configurations, particularly in air-gapped or highly restricted network environments.