Claude Code 2.1.306 fixes cloud sign-in errors and misleading MCP failures
Claude Code 2.1.306 fixes claude -p reporting “Not logged in” inside cloud sessions started without their environment variables. It also prevents API errors from being replaced by prompt-length errors and unnecessary compaction in sessions with many MCP tools.
- Fixes sign-in detection for noninteractive runs inside cloud sessions.
- Preserves the underlying API error and avoids unnecessary context compaction.
Critical fix
Original evidence · 2026-10-20 20h
Claude Code Releases ↗Based on original textWhy it matters
Fixes behavior that can block cloud automation or obscure the actual failure.