Claude Code v2.1.306
Claude Code v2.1.306 is a small fix release: claude -p no longer reports "Not logged in" inside cloud sessions started without the session's environment variables, and sessions with many MCP tools no longer see real API errors replaced by "prompt is too long".
Why it matters
A two-fix patch for Anthropic's terminal coding agent. It matters to people who script Claude Code in cloud sessions or connect a lot of MCP servers, where these bugs caused confusing errors and wasted compaction.
What's new
- Fixed claude -p (headless mode) reporting "Not logged in" inside cloud sessions when it was started without the session's environment variables.
- Fixed real API errors being replaced by a misleading "prompt is too long" message in sessions with many MCP tools.
- The same fix stops an unneeded context compaction that those sessions were triggering.
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 | ★ 152,678 (as of 2026-10-21) |
| 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.306
- 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-21 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.