Claude Code v2.1.311
Claude Code v2.1.311 adds hold-idle options for self-hosted runners and fixes a long list of bugs, including sessions stopping with a 1M-context credits error past 200K tokens, startup freezes from long CLAUDE.md list items, and subagents missing MCP tools from servers that connect late.
Why it matters
For developers who run Claude Code daily, especially with subagents, MCP servers or background sessions. This is a reliability release that removes several stalls and silent failures that interrupt long sessions.
What's new
- New `--hold-idle-file` and `--max-hold-min` options for `self-hosted-runner` keep an idle session open while the host reports processes it left running.
- Standard-context sessions that go over 200K tokens now compact and continue instead of stopping with "Usage credits required for 1M context".
- Fixes long freezes at startup and after file edits when a CLAUDE.md file holds a very long list item, and Write/Edit stalls of up to 5 seconds on very large changes.
- Subagents can now use MCP tools from servers that finish connecting after the subagent starts, and `SubagentStop` hooks fire once when a subagent finishes instead of about twice a minute.
- Interrupting Claude now takes effect right away even while an MCP server hasn't answered a resource read or a skill is still downloading.
Taken from the project's own release notes. Claims about speed or accuracy are the maker's unless stated otherwise.
Quick facts
| Pricing | Requires a Claude account or Anthropic API access (plan details not checked)not verified |
|---|---|
| Free or paid | Paid |
| License | Proprietary (© Anthropic PBC; use subject to Anthropic's Commercial Terms) |
| Language | TypeScript (repo) |
| Platform | macOS, Linux, Windows; terminal, IDE, desktop |
| GitHub stars | ★ 153,533 (as of 2026-10-27) |
| Maker | Anthropic |
Links
- Official site: https://code.claude.com/docs/en/overview
- Repository: https://github.com/anthropics/claude-code
- Release notes: https://github.com/anthropics/claude-code/releases/tag/v2.1.311
- Docs: https://code.claude.com/docs/en/setup
Related ranking
See how established tools compare in Best AI Coding Tools for Developers. New releases aren't scored until we review them against the rubric.
What we couldn't verify
- quick_facts.pricing
Checked 2026-10-27 from the release notes's own pages. Prices and star counts change, so confirm on the official site. Listing here is not a ranking or an endorsement.
One email a week on AI that saves business owners time
Every Friday: one tool pick with the business use case, what changed in tools you already use, and the week's AI news in plain English. No spam.
Free. Unsubscribe any time. See our privacy policy.