[Bug] Auto-Compact Triggering Excessively with Minimal Changes

Status Fixed / completed
Maintainer reply ✓ Yes — bcherny
Activity 11 comments · opened Oct 12, 2025 · closed Oct 17, 2025
💡 Likely answer: A maintainer (bcherny, collaborator) responded on this thread — see the highlighted reply below.

Bug Description
Claude is in a loop continuously compacting over and over again after only a very small number of changes.

Environment Info

  • Platform: linux
  • Terminal: gnome-terminal
  • Version: 2.0.14
  • Feedback ID: 5dc7e978-f983-435b-bc2f-59f1b516fba6

Errors

[{"error":"Error: Request was aborted.\n    at nc._createMessage (file:///home/matthew/.local/share/nvm/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:432:4515)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-10-12T16:48:23.725Z"},{"error":"Error: Failed to get summary response from streaming\n    at bg1 (file:///home/matthew/.local/share/nvm/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1694:1087)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async GZB (file:///home/matthew/.local/share/nvm/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:7044)\n    at async KP (file:///home/matthew/.local/share/nvm/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2492:55419)\n    at async KP (file:///home/matthew/.local/share/nvm/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2492:58597)\n    at async KP (file:///home/matthew/.local/share/nvm/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2492:58597)\n    at async wZ (file:///home/matthew/.local/share/nvm/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2713:33255)\n    at async d7 (file:///home/matthew/.local/share/nvm/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2713:34138)\n    at async _s1 (file:///home/matthew/.local/share/nvm/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2707:2851)\n    at async file:///home/matthew/.local/share/nvm/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2713:30586","timestamp":"2025-10-12T16:48:23.730Z"},{"error":"Error: Request was aborted.\n    at yD1 (file:///home/matthew/.local/share/nvm/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2492:39698)\n    at yD1.next (<anonymous>)\n    at KwQ (file:///home/matthew/.local/share/nvm/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:3209:15199)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async file:///home/matthew/.local/share/nvm/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:3209:13417\n    at async sl0 (file:///home/matthew/.local/share/nvm/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:3209:4415)\n    at async wB1 (file:///home/matthew/.local/share/nvm/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:3209:13387)\n    at async KP (file:///home/matthew/.local/share/nvm/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2492:56105)\n    at async KP (file:///home/matthew/.local/share/nvm/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2492:58597)\n    at async KP (file:///home/matthew/.local/share/nvm/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2492:58597)","timestamp":"2025-10-12T16:48:23.742Z"},{"error":"Error: Request was aborted.\n    at nc._createMessage (file:///home/matthew/.local/share/nvm/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:432:4515)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-10-12T16:56:38.625Z"},{"error":"Error: Failed to get summary response from streaming\n    at bg1 (file:///home/matthew/.local/share/nvm/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1694:1087)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async GZB (file:///home/matthew/.local/share/nvm/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:7044)\n    at async KP (file:///home/matthew/.local/share/nvm/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2492:55419)\n    at async KP (file:///home/matthew/.local/share/nvm/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2492:58597)\n    at async KP (file:///home/matthew/.local/share/nvm/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2492:58597)\n    at async KP (file:///home/matthew/.local/share/nvm/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2492:58597)\n    at async KP (file:///home/matthew/.local/share/nvm/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2492:58597)\n    at async KP (file:///home/matthew/.local/share/nvm/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2492:58597)\n    at async wZ (file:///home/matthew/.local/share/nvm/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2713:33255)","timestamp":"2025-10-12T16:56:38.630Z"},{"error":"Error: Request was aborted.\n    at yD1 (file:///home/matthew/.local/share/nvm/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2492:39698)\n    at yD1.next (<anonymous>)\n    at KwQ (file:///home/matthew/.local/share/nvm/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:3209:15199)\n    a

Note: Error logs were truncated.

View original on GitHub ↗

11 Comments

mattgodbolt · 10 months ago

Shortly after I tried manually compacting, and it failed. And then ESC ESC showed:


> /compact 
  ⎿  Error: Error during compaction: Error: Conversation too long. Press esc twice to go up a few messages and try again.

──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 Rewind

 Restore the code and/or conversation to the point before…

   1. "Hello? Can I speak to Emma" is a (bad) joke about "Dial Emma" (which is a homophone of "dilemma" mentioned earl…
   cppcon_2025.txt +45 -61

   I'm still seeing some "ah" and other things like weird capitalisation in the middle of sentecnes, can you look agai…
   cppcon_2025.txt +2 -6

   you removed a "so" there.
   No code changes

 ❯ This session is being continued from a previous conversation that ran out of context. The conversation is summarize…
   ⚠ No code restore

   This session is being continued from a previous conversation that ran out of context. The conversation is summarize…
   ⚠ No code restore

   continue please. we need to fix all. there's nothing to prioritise
   cppcon_2025.txt +4 -4

   /compact
   No code changes


 Enter to continue · Esc to exit
github-actions[bot] · 10 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/2222
  2. https://github.com/anthropics/claude-code/issues/2283
  3. https://github.com/anthropics/claude-code/issues/6004

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

Gelyte · 10 months ago

Similar problem, after i think 2.0.13 update started to happen for me also tried /config to disable /compact bu i can see it counts than used token limit less then 200k to compact ant conversations are very short and it compact conversation

Windows

mattgodbolt · 10 months ago

This seems new (I've never had it before and I've been using Claude since it was announced); so I don't think this is a duplicate of those very old bugs

Gelyte · 10 months ago
This seems new (I've never had it before and I've been using Claude since it was announced); so I don't think this is a duplicate of those very old bugs

yes i noticed i think yesterday by my time zone that it started to happen becouse those updates came very faset i think from 2.0.11 to 2.0.14 and it started to happen , it dosen't help to turn of in /config auto compact

UPDATED

TRY NEW SESSION

HOW I DID TRIED FIRST UPDATE CLAUDE MAYBE THERE WAS NEWER VERSION BUT NOT, SO STARTED NEW SESSION AND IN /CONFIG TURNED OFF AUTO COMPACT FOR NOW LOOKS LIKE ITS BETTER NOT LIKE AFTER 5 MESSAGES AUTO COMPACT TRIGGERS

StupidIncarnate · 10 months ago

I had to downgrade to v2.0.10. There's definitely something causing claude to fill up its context window unnecessarily fast in latest version.

mattgodbolt · 10 months ago

Might have to do the same thing. Just got this after a manual compact:

<img width="2508" height="2154" alt="Image" src="https://github.com/user-attachments/assets/9e1e75de-579d-47e5-98ac-c9ba4eb01897" />

as in, I manually compacted, and after only two minor changes claude compacted _again_

jimbob60 · 10 months ago

its causing massive usage spikes! for me it kept reading a long file over and over causing my usage to be drained

bcherny collaborator · 10 months ago

Fix landed, and is going out tomorrow morning. Thanks for the report!

mattgodbolt · 10 months ago

Thanks @bcherny - I've not had it happen so far today, nice job :)

github-actions[bot] · 10 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.