Claude Code 2.1.284 Adds an Undocumented Second Compact as a Safety Net

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 all shows 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

  1. Run claude --version in your shell, since the second compact pass appears in the v2.1.284 changelog (released 28 Sep 2026).
  2. In an interactive session that shows the error, run /context all to see a breakdown of context usage. In fullscreen mode all expands the collapsed per-item list.
  3. Run /compact, optionally with focus instructions such as /compact focus on the auth bug fix, then run /context all again. Anthropic does not document a visible marker for the second pass, so judge it by whether message tokens dropped and the session continues.
  4. If the error names an underlying problem, as in Prompt is too long · automatic compaction failed:, resolve that named error first, because /compact fails on the same error until you do. If you see Error during compaction: Conversation too long, press Esc twice, step back several turns, and run /compact again.
  5. If /compact answers Not 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.
text Tutorial
# In your shell: confirm the build (the second compact pass is in v2.1.284).
claude --version

# Inside an interactive claude session, type these one at a time.
# Token breakdown of the current context:
/context all

# Summarize; the text after /compact is optional focus for the summary.
# It does not control the second pass.
/compact focus on the auth bug fix

# Compare with the first breakdown. Judge by whether message tokens dropped.
/context all
▸ Show full code (13 lines)
# In your shell: confirm the build (the second compact pass is in v2.1.284).
claude --version

# Inside an interactive claude session, type these one at a time.
# Token breakdown of the current context:
/context all

# Summarize; the text after /compact is optional focus for the summary.
# It does not control the second pass.
/compact focus on the auth bug fix

# Compare with the first breakdown. Judge by whether message tokens dropped.
/context all

Gotchas

  • The changelog does not say whether the second pass also runs on a manual /compact or when auto-compact is off, so do not rely on it there. DISABLE_AUTO_COMPACT=1 turns off automatic compaction, and DISABLE_COMPACT=1 disables 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 /compact with a focus that drops the large output, moving the work to a subagent, or running /clear.
  • To summarize only part of a session, /rewind offers Summarize from here. For what /rewind restores 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.

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.

Leave a Comment