Repository navigation
Open
Labels
area:corebugSomething isn't workingSomething isn't workinghas reproHas detailed reproduction stepsHas detailed reproduction stepsmemoryplatform:macosIssue specifically occurs on macOSIssue specifically occurs on macOS
Description
Bug Description
In Claude Code, every time the chat gets auto-compacted, it erases ALL my chat history with no way to get it back. This is wrong, and is a terrible thing to do. It does this without any warning. This must stop!
Environment Info
- Platform: darwin
- Terminal: Apple_Terminal
- Version: 1.0.112
- Feedback ID: 25d30069-c450-48c1-a7de-55140f229ee2
Errors
[{"error":"Error: Request was aborted.\n at e61._createMessage (file:///Users/dougjoseph/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1001:7955)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-09-12T03:58:21.790Z"},{"error":"Error: Request was aborted.\n at gT.makeRequest (file:///Users/dougjoseph/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1010:3864)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-09-12T04:24:56.244Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n at Module.readFileSync (node:fs:442:20)\n at Object.readFileSync (file:///Users/dougjoseph/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:719:6735)\n at s9B (file:///Users/dougjoseph/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:3507:9370)\n at Object.call (file:///Users/dougjoseph/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1778:936)\n at call.next (<anonymous>)\n at iM (file:///Users/dougjoseph/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1783:2968)\n at file:///Users/dougjoseph/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1797:1186\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-09-12T04:27:53.005Z"},{"error":"Error: Request was aborted.\n at e61._createMessage (file:///Users/dougjoseph/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1001:7955)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-09-12T04:29:42.805Z"},{"error":"Error: Request was aborted.\n at e61._createMessage (file:///Users/dougjoseph/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1001:7955)\n at processTicksAndRejections (node:internal/process/task_queues:105:5)\n at runNextTicks (node:internal/process/task_queues:69:3)\n at process.processTimers (node:internal/timers:520:9)","timestamp":"2025-09-12T04:33:49.357Z"},{"error":"Error: Request was aborted.\n at e61._createMessage (file:///Users/dougjoseph/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1001:7955)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-09-12T04:39:35.605Z"},{"error":"Error: Request was aborted.\n at e61._createMessage (file:///Users/dougjoseph/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1001:7955)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-09-12T04:57:54.112Z"},{"error":"Error: Request was aborted.\n at gT.makeRequest (file:///Users/dougjoseph/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1010:3864)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-09-12T06:28:49.698Z"},{"error":"Error: Request was aborted.\n at gT.makeRequest (file:///Users/dougjoseph/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1010:3864)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-09-12T06:47:37.918Z"}]Reacted by thomastthai, colivetree, FlowTether.ai, gshiva, Eduard Llamosí, Iker Romero, Reuben Scratton, Mitchell Gordon, Steven Yang, Klas Segeljakt and 29 more
Metadata
Metadata
Assignees
Labels
area:corebugSomething isn't workingSomething isn't workinghas reproHas detailed reproduction stepsHas detailed reproduction stepsmemoryplatform:macosIssue specifically occurs on macOSIssue specifically occurs on macOS
Activity
github-actions commentedon Sep 12, 2025
Found 2 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
DougJoseph commentedon Sep 12, 2025
My issue is NOT a duplicate of those other two issues. This has nothing to do with how much Claude Code remembers after an auto-compact. This issue is that all my chat history, the text in MY terminal shell, all of it ABOVE the chat auto-compact lines, DISAPPEARS COMPLETELY and cannot be gotten back, and it never used to be this way. I have many things in that chat conversation history that are extremely valuable, and at certain points I will export the text of the whole conversation to save for later reference. That saving of a whole session is impossible now because after each auto-compact, all the text of the chat history disappears. This is a HORRIBLE thing to do to us. PLEASE MAKE IT STOP. Make it like it was before!
sid374 commentedon Sep 13, 2025
You can still see the previous history by going into transcript mode with Ctrl + R
DougJoseph commentedon Sep 13, 2025
zshawauxlol commentedon Sep 17, 2025
yeah this is very frustrating - Why can't we scroll up to see previous history. Auto-compact now feels destructive. I rely on being able to scroll up.
thomastthai commentedon Sep 19, 2025
Frequent auto-compacting and erasing the chat history has succeeded in reducing my productivity and increasing my frustration with Claude Code. Erasing the chat/shell history is likely an attempt to prevent the well-documented shell history buffer from building up to the point where the screenful of text scrolls quickly and doesn't stop.
colivetree commentedon Sep 20, 2025
Please fix this!
DougJoseph commentedon Sep 20, 2025
Just a quick update: the problem went away for me. I'm in coding with Claude Code very often, and after the problem persisting for quite some time, it did finally start working right, at least of now.
zshawauxlol commentedon Sep 21, 2025
Yeah agreed that's probably why, but like I don't care I'd rather deal with that every now and again then just nuking it.
DougJoseph commentedon Sep 22, 2025
I regret to inform that although I previously reported the issue was not longer happening, I just had it happen AGAIN. This is not fixed!
8 remaining items
brian-ketos commentedon Jan 28, 2026
This bug seriously reduces productivity. You should not be messing with the terminal history.
jleppert commentedon Feb 8, 2026
Whoever thought this was a good idea? You can't even view the last thing you were working on. It's very frustrating when you have to go and dig around in JSON files to find something you literally were just working on. When compaction happens, you can't view any of your old history. Why can't this be fixed?
leon0399 commentedon Feb 9, 2026
Is it me, or it was possible to rewind before compaction at some point, but now it is again impossible?
apetta commentedon Feb 9, 2026
This used to work fine, but has started happening recently.
After an auto-compact, the entire history that led up to the auto-compact is wiped!! There is no way to recover it with
/rewind. It literally shows no history before the auto-compact.This is quite a serious bug...
segeljakt commentedon Feb 9, 2026
I use a script to get the conversation:
view-claude-history.sh:Then
You can get the ID of the current session with
/status.It can be useful as a claude skill:
where
~/.claude/skills/view-claude-history/SKILL.md:zahiriddin-rustamov commentedon Feb 9, 2026
This issue was present in the latest version. Downgrading to the stable version fixed it for me (for now).
segeljakt commentedon Feb 23, 2026
I also noticed that if you have written a prompt to Claude that you have not yet submitted or stashed, compaction seems to clear that as well.
dc3671 commentedon Mar 2, 2026
Claude Code should use compacted content in a new session, so that I can still continue previous old session in case I want to fork.
leoauri commentedon Mar 17, 2026
Yeah, really frustrating. I have to completely redo a bunch of heavy work because I cannot rewind code changes to somewhere in the middle after auto-compact. What a waste of gigawatts!
MarcusDelvecchio commentedon Apr 3, 2026
same issue
junaidtitan commentedon Apr 3, 2026
Auto-compact erasing history happens because the compaction prompt has to summarize too much content at once. If the session is bloated with progress ticks, stale reads, and duplicate content, the summary loses important details.
Cozempic v1.4.1 pre-prunes via PreCompact hook so compaction operates on a much smaller, cleaner input. The guard daemon also runs proactively so sessions rarely reach the compaction threshold at all.
pip install cozempic && cozempic initThe
is_protected()system also prevents the pruner from ever touching compact summaries, compact boundaries, or other critical session state.segeljakt commentedon Apr 4, 2026
@junaidtitan This has nothing to do with compaction summary quality. The issue is that the terminal scrollback buffer gets wiped on auto-compact. No amount of "pre-pruning" or "guard daemons" fixes that — you're solving a problem that doesn't exist here. Please don't use bug reports as advertising space.
fangmaster35 commentedon Apr 6, 2026
The irony of it all is that we should still be able to view such a thing locally as this cli/extension should be smart enough to know the difference between compaction and just being able to keep the text locally, I mean for all intents and purpose just put it all in a text file if anything then we can at least see it.
segeljakt commentedon Apr 7, 2026
My guess is that the TypeScript-based CLI gets sluggish when the scrollback buffer becomes too large. I have seen it clear the scrollback even without compaction.
chevovish commentedon Oct 6, 2026
Still experience the same issue. Please fix this!