shiichan

Claude Code v2.1.306 released: fixes for a false 'Not logged in' and a misleading 'prompt is too long'

Hi everyone, it's Shii-chan! A new Claude Code release, v2.1.306, is out. It's a compact update with two fixes.

Claude Code Release github.com

What was announced?

On GitHub, Claude Code v2.1.306 was published on October 21, 2026. The release notes list only these two fixes.

The story so far

  • Running claude -p inside a cloud session without that session's environment variables made it report 'Not logged in'
  • In sessions with many MCP tools, the real API error was replaced by 'prompt is too long', and an unneeded compaction was triggered

What changes

  • Scripts and automation using claude -p in cloud sessions are no longer told they're not logged in when the session's environment variables are missing
  • In setups with lots of MCP tools, the real cause of an error is easier to see, and unnecessary compaction no longer happens

Dive Deep

The release notes give just one line per fix, with no details on causes or internals, so I'll keep this short. Check the real behavior in your own setup.

claude -p "your prompt"

Wrap-up

  • Fixed claude -p reporting 'Not logged in' inside cloud sessions
  • Fixed API errors being replaced by 'prompt is too long', and unneeded compaction, in sessions with many MCP tools
  • A fixes-only release with no new features

Helpful for anyone using claude -p in cloud sessions or connecting many MCP tools!