Cowork: Context compaction permanently removes scrollable conversation history from UI
Bug Description
When a Cowork session's context window fills up, context compaction replaces the full conversation history with a summary. This is irreversible — all prior messages disappear from the scrollable chat interface. The user loses the ability to scroll back and review what was discussed, what decisions were made, and what the AI actually said.
The full transcript is preserved in a JSONL file on disk, so the data isn't lost — it's just no longer rendered in the UI. The rendered chat history is coupled to the model's context window when it should be independent.
Why This Matters
For long, multi-step technical sessions — architecture discussions, code reviews, debugging workflows — the conversation is the working document. Users refer back to earlier exchanges to recall exact wording, revisit rejected approaches, or confirm what was agreed. Losing that history mid-session breaks the user's ability to work effectively.
The user-facing contract of a chat interface is that you can scroll back through what was said. Violating that silently, with no warning and no opt-out, is unexpected behavior.
Current Workaround Limitations
The raw transcript is preserved in a JSONL file on disk, but:
- It's a machine-format log buried in an internal path — not a readable conversation the user can scroll through
- The AI can parse and re-present it, but that produces a reconstruction, not the original thread
- Re-presenting the transcript costs additional context tokens
Expected Behavior
The full scrollable conversation history should be preserved in the UI even when context compaction occurs. The rendered chat history should be retained independently of the model's context window.
Suggested Approach
Decouple the UI's rendered message history from the model's context window. Compaction should only affect what the model sees, not what the user can scroll through.
Environment
- Product: Cowork (research preview)
- Platform: Desktop app
13 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Update: Broader regression — affects all previous sessions, not just compaction
This is more severe than initially reported. Going back through all previous Cowork sessions, the conversation history is truncated. This is not limited to sessions where context compaction was triggered — it appears to be a general regression in how the UI renders stored conversation history.
Revised assessment
This elevates the severity — users have lost visible access to the full history of every previous session, not just long-running ones that hit the context limit.
We open-sourced cozempic which prevents this — it fires a checkpoint right before compaction (PreCompact hook) saving full team state, then re-injects it after (PostCompact hook) so the session recovers context. Would love to know if it helps.
I had this exact same issue and had very important context building in different threads in my cowork. Would be lovely to see some attention from anthropic here.
I'm experiencing a truncation issue similar to reported here. One of my Cowork sessions is truncated from the top. Below is the report generated by Claude.
Product: Claude Desktop – Cowork
OS: macOS (Apple Silicon)
Issue type: Chat history truncation / UI rendering bug
---
Summary
A Cowork session from February 20, 2026 is displaying truncated conversation history in the UI — the bottom half of the conversation is missing. The underlying JSONL data is intact on disk; this is a rendering/display issue, not data loss.
---
Affected session
Session ID:
local_f4af7a79-bdaf-4504-a21d-1f49bf6207beCreated: 2026-02-20 23:23
JSONL path:
~/Library/Application Support/Claude/local-agent-mode-sessions/1503d45c-d4ce-4e7c-a636-b67831e73c8d/cc02b455-0624-4215-8851-5fcf8ff496fe/local_f4af7a79-bdaf-4504-a21d-1f49bf6207be/.claude/projects/-sessions-nice-epic-wright/d318aa12-c356-4798-8251-7511d84019a7.jsonlFile size: 27 MB (full transcript confirmed intact)
---
What happened
When opening this session in Cowork approximately one month after it was created, the chat history is incomplete — the bottom half of the conversation is missing from the UI.
I was able to extract the full conversation text from the JSONL file using a Python script, confirming all the data is present on disk. The issue is purely with how the app renders the stored history.
---
Likely cause (based on known filed issues)
This appears to match the reported bug where context compaction silently replaces scrollable history with a summary, causing earlier messages to disappear from the UI (GitHub issue #37273).
---
Request
Please investigate whether a fix to the UI rendering layer could restore display of the full conversation history from the intact JSONL file for this session. I would prefer not to lose access to this content within the app.
Adding a real-world case to this.
I've been using Cowork across multiple sessions for a sustained project (Gmail mining, file reorganization, document creation). When the first session ran out of context and continued into a new one, the original session disappeared from my Recents sidebar entirely. The continuation session shows only the machine-generated summary at the top — the full original conversation (my prompts, the assistant's reasoning, all tool calls) is gone from the UI.
This had two practical consequences:
A document the assistant created during the original session was saved to a session-internal path (mnt/outputs/) rather than my mounted folder. With the session gone from the sidebar, I had no way to find the conversation to understand what happened or where the file went. (Related to #30364.)
The original session's transcript turned out to still exist as a .jsonl file in .claude/projects/ inside my mounted folder — but I only discovered this through troubleshooting with the assistant in the current session. Nothing in the UI surfaces this.
The workaround was having the assistant copy the .jsonl transcript into my mounted folder, then having a new session parse it programmatically to reconstruct the lost document. It worked, but it took an entire session's worth of context to recover what should have been one click in the sidebar.
Expected behavior: Both the parent and continuation sessions should remain navigable in Recents. If a session continues, the parent should be linked or at minimum still listed.
Windows 11, Max plan.
As someone who recently switched from GPT to Claude Pro, I am honestly gobsmacked by this issue, which I discovered when it unilaterally wipes hours of back-and-forth between me and Opus. As above, Claude appears to have been told that the transcript was saved somewhere to disk, but (a) not good enough; (b) neither of us can find it.
This is a shockingly destructive, user-hostile thing to do and it needs to be fixed yesterday.
same issue
I would agree that this is an issue. If there is a way that (similar to how github copilot still maintains the chat history) it still compacts on its own. We can keep chat history local, even if it compacts. It would be great to be able to reference for our own benefit the history of our chat what was and was not done to better review.
Same happening with me, I'm losing huge portions of sessions but apparently Claude can still see them... until today that is... now this bug has combined with another awful one: Claude can't find the conversations now, and when they're gone form the UI and claude can't find them, it's TOTAL DATA LOSS OF EACH CONVERSATION... this is URGENT
You've nailed the core issue — the UI's rendered history is coupled to the model's context window when they should be independent. Losing scrollable history mid-session breaks the user's ability to review earlier decisions.
While decoupling the UI from the context window is an upstream fix, Cozempic takes a complementary approach: it delays or prevents the destructive compaction event entirely. By pruning 30-85% of bloat from the session (progress ticks, stale tool results, base64 images, metadata) the context stays well under the compaction threshold for much longer. If compaction never fires, history is preserved:
The
compact-summary-collapsestrategy specifically targets pre-compaction messages, and in testing we've seen 8.78MB sessions reduced to ~600KB (92% reduction). For Cowork sessions with heavy back-and-forth, this can push compaction far enough out that it doesn't happen during your working session.Not a substitute for the UI fix you're proposing, but a practical workaround.
https://github.com/Ruya-AI/cozempic
I'm going to echo all the sentiment above — this is a horrendous issue given we have no control over when the compaction is happening. Losing referencing chats in Cowork makes for a horrible user experience.
Also affects the Code tab in the desktop app, not just Cowork.
.jsonl, so the data is intact -- this is purely a UI/display issue where the rendered history is coupled to the model context window.+1, this is a real friction point.