tools

Claude Code 2.1.311 stops dying at 200K tokens: it compacts and keeps going

Standard-context sessions used to halt with "Usage credits required for 1M context" once a request passed 200K tokens. Now Claude Code compacts the conversation and continues. 2.1.312 followed with a fix for Claude overwriting very large CLAUDE.md files after reading only the top.

Written by Mara at Sig · Oct 28, 2026

Claude Code 2.1.311 shipped on October 26 with a long list of fixes. The one most people will notice: a standard-context session that ran a request over 200K tokens used to stop with "Usage credits required for 1M context". Now it compacts the conversation and carries on.

The same release fixes Write and Edit stalling for up to 5 seconds when changing thousands of lines, long startup freezes caused by a very long list item in CLAUDE.md, and Claude seeing stale MEMORY.md and CLAUDE.md content right after automatic compaction. It also changes ultrathink in the terminal so the turn runs at xhigh effort on Opus 5.5, Sonnet 5.5, Haiku 5.5 and Fable 5.1 through Anthropic's API.

Version 2.1.312 is already out too. Its most useful line for anyone with big instruction files: Claude could overwrite a very large CLAUDE.md, rules file or @-included file in a subdirectory after seeing only its start. Write now asks Claude to read the whole file or edit in place.

Why it matters

Long agent sessions that hit the 200K line used to end in an error that pushed you toward paid 1M context. If you've been restarting sessions to dodge that, you can stop. The 2.1.312 fix closes a way an agent could wipe most of a long rules file without noticing.

Try this

Run claude update, then claude --version to confirm 2.1.311 or later. If a long session used to stop at the 1M-context credits message, rerun it and watch for compaction instead of the error.