claude-code v2.1.306
- Source
- github.com
- Publisher
- Anthropic
- Author
- ashwin-antTop Viber
- Date

Context
Claude Code 2.1.306 is a two-fix follow-up to the much larger 2.1.305. The first fix is for scripts that call claude -p, the non-interactive mode, from inside a cloud : if the command started without the session's environment variables, it reported that it was not logged in. It now works in that situation.
The second fix is more likely to have confused people. In sessions with many tools, a genuine API error could be shown as ' is too long', and Claude Code would then compact the conversation, summarising older messages to free up space, even though space was not the problem. Besides hiding the real error, that unneeded replaces detailed history with a summary. The notes do not say what the underlying API error was, only that it is no longer relabelled.
- Session — One conversation or piece of work as a harness keeps it: a record of messages, tool calls and observations that can be saved and resumed.
- Model Context Protocol (MCP) — A published agreement for an AI application to discover what a separate program offers and ask it to run one of those offerings.
- Prompt — Information or instructions supplied to a model; in a chat, the request you type is often called your prompt.
- Compaction — Replacing older content in the model's context with a summary of it, usually keeping recent messages, so that a session can go on.





