At a glance
Claude Corner tip- Claude Code v2.1.284 added a fix: when a compacted request is still too long, it compacts once more and keeps less of the recent conversation.
- Only the changelog describes this second pass, and no documented setting or environment variable controls it, so treat it as a safety net, not a plan.
- When you still hit the limit,
/context allshows whether conversation history or something else is taking the space.
A long Claude Code session can fail with Context limit reached · /compact or /clear to continue, and in -p output and the transcript the same failure reads Prompt is too long. The v2.1.284 changelog lists a fix for errors that persisted after compacting: when the compacted request is still too long, Claude Code now compacts once more, keeping less of the recent conversation.
Why it matters
Normal compaction summarizes your oldest exchanges and keeps the newest, but the system prompt, tool definitions, and attachments still go out with the request, so a summary can land and the next send can still be too big. The changelog lists the second pass as a fix, not a switch, and the errors page does not describe it yet, so what you can count on is thin.
How to check what is filling the window
- Run
claude --versionin your shell, since the second compact pass appears in the v2.1.284 changelog (released 28 Sep 2026). - In an interactive session that shows the error, run
/context allto see a breakdown of context usage. In fullscreen modeallexpands the collapsed per-item list. - Run
/compact, optionally with focus instructions such as/compact focus on the auth bug fix, then run/context allagain. Anthropic does not document a visible marker for the second pass, so judge it by whether message tokens dropped and the session continues. - If the error names an underlying problem, as in
Prompt is too long · automatic compaction failed:, resolve that named error first, because/compactfails on the same error until you do. If you seeError during compaction: Conversation too long, press Esc twice, step back several turns, and run/compactagain. - If
/compactanswersNot enough messages to compact., the conversation is a single exchange and there is nothing earlier to summarize. Cut down what you paste or attach, and run/mcp disable <name>for MCP servers you are not using so their tool definitions leave the request.
Gotchas
- The changelog does not say whether the second pass also runs on a manual
/compactor when auto-compact is off, so do not rely on it there.DISABLE_AUTO_COMPACT=1turns off automatic compaction, andDISABLE_COMPACT=1disables both automatic compaction and/compact. - If a large file or tool output refills the window several times in a row after compaction, Claude Code stops retrying with
Autocompact is thrashing. The troubleshooting page suggests reading the file in smaller chunks, running/compactwith a focus that drops the large output, moving the work to a subagent, or running/clear. - To summarize only part of a session,
/rewindoffers Summarize from here. For what/rewindrestores and misses, see Monday’s tip.
Recommended AI prompt
Copy this paragraph into ChatGPT, Claude, Gemini, Grok, or whatever AI you use.
I use Claude Code and sometimes hit Context limit reached or Prompt is too long even after running /compact. The v2.1.284 changelog says that when a compacted request is still too long, Claude Code compacts once more and keeps less of the recent conversation, but the docs do not say whether that also happens on a manual /compact or with auto-compact off. Write me a short checklist for those moments that starts with claude --version and /context all, tells me how to tell whether messages or tools, memory files, and attachments are taking the space, explains what to do when /compact says Not enough messages to compact, and mentions the Autocompact is thrashing message. Flag anything you are unsure of instead of inventing commands, settings, or behavior.
Sources
- Claude Code changelog (2.1.284)
- GitHub release v2.1.284
- Errors and warnings (Prompt is too long)
- Errors and warnings (Prompt is too long)
- Claude Code changelog (2.1.284)
- Commands (/compact, /context, /mcp)
- Explore the context window
- Errors and warnings (Prompt is too long, compaction errors)
- Environment variables
- Settings reference (autoCompactEnabled)
- Troubleshooting (auto-compaction thrashing)
- Explore the context window
- AIDevPulse Sep 28 Claude Corner
Recommended AI prompt
Explore each Top Story in Grok. Links open in a new tab. On phones, the same link may open the Grok app if you have it installed (via your device's normal link handling).
Article: Claude Code 2.1.284 Adds an Undocumented Second Compact as a Safety Net
Privacy: links open grok.com in your session only. AIDevPulse does not run your prompts through our API.