Repository navigation
Description
Summary
Claude Code has no working way to review conversation history that has been cleared or compacted. The full data is always preserved in transcript.jsonl, but the TUI provides zero functional paths to access it. This affects three distinct scenarios:
- Post-compaction: Ctrl+O enters "transcript mode" (mislabeled as "history"), which shows only post-compaction messages. Ctrl+E toggles the status bar text but reveals no hidden content. Pre-compaction conversation is inaccessible.
- Post-plan-mode "clear context": Creates a new session with the plan injected as the first message. The exploration conversation that informed the plan is in a separate JSONL with no UI link back.
- Branch navigation: Right-arrow in the
/resumepicker (which used to allow browsing conversation branches) does nothing. Branch data is intact in JSONL with correctparentUuidlinkage.
This is blocking. Users cannot audit Claude's reasoning after compaction, cannot review the exploration that led to a plan, and cannot navigate between conversation branches. The only workaround is manually parsing raw JSONL files, which is not a reasonable expectation for a TUI tool.
These bugs also compound with unfixed session discovery bugs in #26123 (closed prematurely, 49 👍) — index staleness and /rename names not showing in picker. The resume picker is the single gateway to all historical context and it's degraded at every level: can't find sessions, can't identify them, can't navigate branches within them, can't view pre-compaction history.
Environment
- Version: 2.1.47 through 2.1.50 (confirmed on both; no fix in any release)
- OS: macOS (Darwin 24.5.0)
- Terminal: Ghostty (also reproduced in Terminal.app)
- Platform: CLI (not VS Code extension)
Bug 1: Post-compaction — Ctrl+O and Ctrl+E do not show history
Steps to reproduce
- Run a long session until automatic context compaction triggers
- Observe the banner:
✻ Conversation compacted (ctrl+o for history) - Press Ctrl+O — the TUI enters "Showing detailed transcript" mode
- Observe: only post-compaction messages are shown (compact summary + subsequent work)
- Press Ctrl+E — the status bar toggles between "ctrl+e to show all" / "ctrl+e to collapse"
- Observe: Ctrl+E toggles visibility of "Worked for 1m 40s" timing badges and task completion lines, but does not expand or reveal any pre-compaction content
What I see
✻ Conversation compacted (ctrl+o for history)
. fff
⏺ Compact summary
⎿ This session is being continued from a previous conversation...
...
If you need specific details from before compaction, read the full
transcript at: /path/to/session-uuid.jsonl
⏺ Task "Run tests" completed in background
⏺ Task "Verify GREEN state" completed in background
...
──────────────────────────────────────────────────
Showing detailed transcript · ctrl+o to toggle · ctrl+e to show all
The banner says "ctrl+o for history" but Ctrl+O enters transcript mode, not a history viewer. The "ctrl+e to show all" text suggests expandable content, but pressing it only toggles timing badges.
What I expect
Ctrl+O (or some keybinding) should display the full pre-compaction conversation. The data exists in transcript.jsonl — there is no technical barrier to rendering it.
Root cause (from prior analysis)
In cli.js, transcript mode passes hidePastThinking: !0 (hardcoded true), hiding all thinking blocks except the last one. Source analysis by @carrotRakko on #16965. Community patch exists: aleks-apostle/claude-code-patches#9
But even beyond thinking blocks, the fundamental issue is that transcript mode does not load pre-compaction messages at all.
Bug 2: Post-plan-mode — "Clear context and accept edits" severs session history
Steps to reproduce
- Start a session and have Claude enter plan mode
- Claude explores the codebase, asks design questions, iterates on a plan
- Accept the plan with "clear context and accept edits"
- Observe: a new session is created with the plan text as the first user message
- The pre-plan exploration conversation is in the old session's JSONL
- There is no UI link between the two sessions
What I see
The new session starts clean with the plan pasted as a user message, including a note:
If you need specific details from before exiting plan mode (like exact code
snippets, error messages, or content you generated), read the full transcript
at: /path/to/old-session-uuid.jsonl
The pre-plan conversation (which may contain important architectural decisions, rejected approaches, and codebase exploration results) is only accessible by manually reading a raw JSONL file.
What I expect
At minimum: the /resume picker should show the relationship between the plan session and its predecessor. Ideally: the pre-plan conversation should be browsable from within the new session.
Evidence
Verified via JSONL analysis: the "clear context" operation creates a new session file. The old session's JSONL preserves the full exploration, but the new session's first message only contains the final plan text — no link to the old session UUID is stored in the JSONL metadata.
Bug 3: Branch navigation — right-arrow in /resume picker does nothing
Steps to reproduce
- Create a session with conversation branches (rewind to earlier points, take different paths):
M.1 → M.2 → M.2.A → M.2.A2 (branch A) M.2.B → M.2.B2 (branch B) M.2.C → M.2.C2 (branch C) M.2.D → M.2.D2 (branch D, current) - Exit the session
- Run
/resume - Select the session in the picker
- Press right-arrow on the session line
- Observe: nothing happens — no branch picker, no visual change, no error
What I see
The /resume picker shows the session but right-arrow is completely unresponsive. Only the current branch (M.2.D path) is accessible.
What I expect
Right-arrow should expand the session to show branch points, allowing navigation between M.2.A, M.2.B, M.2.C, and M.2.D paths. This feature previously worked (estimated ~v2.1.31 timeframe, early February 2026).
Data is intact
JSONL analysis confirms the branch tree is perfectly preserved:
Node 449b88fa (M.2 response) has 4 children:
→ aad46fec: "now branching to M.2.A" (isSidechain: false)
→ 2501f512: "now branching to M.2.B" (isSidechain: false)
→ 3a73bb07: "now branching to M.2.C" (isSidechain: false)
→ 64f1cfaa: "now branching to M.2.D" (isSidechain: false)
All branches have correct parentUuid linkage and multi-child nodes. The isSidechain flag is never set to true on any branch (confirming #24471's analysis). This is a UI bug, not a data bug.
Consolidates / Related Issues
Direct (same root cause — data preserved, UI can't access it)
| Issue | Title | Engagement | Status |
|---|---|---|---|
| #26125 | No way to view pre-compaction history — Ctrl+O/E broken | 7 👍 | Closed (duplicate) — predecessor to this issue |
| #24471 | Rewind history lost after compaction (branching tree) | 6 👍 | Open |
| #9001 | Scroll regression — cannot scroll conversation history | 18 👍 | Open |
| #18204 | Compaction clears screen — can't scroll up | 4 👍 2 ❤️ | Open (stale) |
| #13446 | After compaction terminal resets, can't scroll up | 4 👍 | Open (stale) |
| #23894 | Sub-session visibility lost after v2.1.30 architecture change | 2 👍 | Open |
| #16965 | Cannot read past thinking blocks with Ctrl+O | 0 👍 | Open |
| #21188 | View full conversation history in UI | 0 👍 | Open (stale, enhancement) |
| #14511 | Ctrl+O triggers transcript view, not verbose toggle | 6 👍 | Open (stale) |
| #19888 | Compaction loses entire history, Ctrl+E unresponsive | 5 👍 | Open |
| #28324 | Remote Control doesn't show chat history when resuming | 0 👍 | Open (new, Feb 24) |
Compounding (session discovery/identification — you can't even get to the history)
| Issue | Title | Engagement | Status |
|---|---|---|---|
| #26123 | /resume broken — 3 root causes, only 2 fixed | 49 👍 | Closed (prematurely — Bug 1 index staleness + Bug 4 /rename unfixed on v2.1.50) |
| #25032 | sessions-index.json not updated, stale/missing sessions | 9 👍 | Open |
Compaction side-effects (context corruption when compaction occurs)
| Issue | Title | Engagement | Status |
|---|---|---|---|
| #20696 | Compaction intermittently fails or deadlocks chats | 35 comments | Open |
| #26220 | Cascading failure: auto-compaction, /compact, rewind all fail | 4 👍 | Open |
| #27954 | Thinking block skipped on first response after compaction | 1 👍 | Open (new, Feb 23) |
| #28303 | User message truncated during auto-compact operation | 0 👍 | Open (new, Feb 24) |
| #23821 | Subagent output files lost after context compaction | 0 👍 | Open |
| #25655 | All plugin hooks stop firing after context compaction | 2 👍 | Open |
Related proposals
| Issue | Title | Engagement | Status |
|---|---|---|---|
| #26771 | Indexed transcript references in compaction summaries | 22 👍 | Open (enhancement) |
| #27293 | Lossless context cleanup before auto-compaction | 0 👍 | Open |
| #27338 | User questions lost from transcript during background subagents | 0 👍 | Open |
Combined engagement: 140+ thumbs-up, 100+ comments across 20+ issues, multi-platform confirmation (macOS, Windows, Linux). Zero Anthropic team response on any of them as of v2.1.52.
All direct issues share a single root cause: Claude Code preserves conversation data in JSONL but provides no working UI to access it after the active context window moves forward.
Workarounds
- Parse raw JSONL:
jqqueries againsttranscript.jsonl— functional but defeats the purpose of a TUI - Pre-compaction hooks: Community script by @EMarkODell auto-saves before each compaction
- Cozempic: Open-source context loss mitigation tool
- Community patch for thinking blocks: Update thinking patch for latest Claude Code aleks-apostle/claude-code-patches#9
- Avoid plan-mode "clear context": Manually copy pre-plan notes before accepting
Proposed Fix
A proper fix would address all three scenarios with a single feature: a scrollable history viewer that reads from transcript.jsonl, navigable via Ctrl+O or a new keybinding. This viewer should:
- Load and render the full transcript including pre-compaction messages
- Display thinking blocks (remove
hidePastThinking: !0hardcoding) - Show branch points with navigation between branches
- For plan-mode sessions, link back to the predecessor session
The data layer is already correct — this is purely a UI/rendering gap.
Thanks for reporting all this, appreciate the feedback. I'm going to raise these to the team.
Plan-mode context loss. When accepting a plan with "clear context," the exploration session that informed the plan becomes a separate, unlinkable JSONL. The architectural decisions that led to the plan are orphaned.
Minor correction here: "Clear context" is actually more like "implement plan in new conversation"—you can /resume to go back to the session in which you were iterating on the plan. I think the action naming could be clearer (should probably say "Implement plan in new conversation" or similar to avoid this frequent source of confusion).
Activity
scapeshift-ojones commentedon Feb 23, 2026
Related: #26123 partially fixed but still broken (49 👍, closed prematurely)
#26123 (/resume broken) was closed as "completed" after v2.1.47 fixed the picker limit and Windows case sensitivity. But two of the original bugs remain unfixed as of v2.1.50:
Bug 1 — Index staleness:
sessions-index.jsonis not updated for new sessions. @vbhavsar reports 68.jsonlfiles on disk but only 25 indexed. The v2.1.47 workaround (scanning.jsonldirectly up to 50) masks this, but users with 50+ sessions per project still can't find their work. Tracked separately in #25032.Bug 4 —
/renamenames invisible in picker: @ThatDragonOverThere reports that custom session names set via/renamedisplay correctly in terminal tab titles but do not appear in the resume picker — it shows auto-generated summaries instead. With 6+ concurrent sessions, there's no way to tell which session is which. Confirmed on v2.1.50.These compound directly with the bugs in this issue:
/renamenames missing from pickerThe resume picker is the single entry point to all historical context, and it's degraded at every level. Even if you manage to find and open a session, you can't browse its branches or view what happened before compaction.
#26123 has 49 👍 and should be reopened — the partial fix in v2.1.47 didn't address the most user-visible symptoms. I attempted to reopen but the repo restricts this to maintainers.
scapeshift-ojones commentedon Feb 25, 2026
Hey anyone who is coming to this thread please comment how its affecting you so we can get Anthropic to pay attention to this and solve the entire suite of these regressions once and for all rather than inconsistent whac-a-mole style
chickensintrees commentedon Feb 25, 2026
Just hit this tonight. 509-turn session died at context overflow during a save operation. The JSONL file is 24MB of perfectly preserved data — every tool call, every correction, every branch point. All sitting on disk. Zero way to access it through the UI.
I've built custom recovery tooling (
session-rescue.sh) that parses the JSONL to extract last state, files written, and corrections from crashed sessions. It works, but the fact that I had to build it at all is the bug. The data layer is flawless. The access layer is missing.My specific pain points, in order:
Post-compaction Ctrl+O shows nothing useful. I rely heavily on compaction for long creative sessions. After compact, the pre-compaction reasoning is gone from the UI. I've resorted to writing manual state summaries to disk before every compact — essentially reimplementing what the transcript viewer should do.
Crashed sessions are black boxes without custom tooling. When a session hits context overflow mid-operation, the only recovery path is grep/jq on raw JSONL. The data is all there. Branch trees intact.
parentUuidlinkage perfect. Just no way to see it.Plan-mode context loss. When accepting a plan with "clear context," the exploration session that informed the plan becomes a separate, unlinkable JSONL. The architectural decisions that led to the plan are orphaned.
The poster is right — this is purely a UI/rendering gap. The data engineering is solid. Would love to see even a basic read-only transcript viewer that loads the full JSONL and renders it chronologically. That alone would eliminate hours of manual recovery work per week.
stevenpetryk commentedon Feb 25, 2026
Thanks for reporting all this, appreciate the feedback. I'm going to raise these to the team.
Minor correction here: "Clear context" is actually more like "implement plan in new conversation"—you can /resume to go back to the session in which you were iterating on the plan. I think the action naming could be clearer (should probably say "Implement plan in new conversation" or similar to avoid this frequent source of confusion).
vonscons commentedon Feb 26, 2026
I’m consistently loosing last 15 minutes of work, especially when there are multiple subagents in background
tassa-yoniso-manasi-karoto commentedon Feb 27, 2026
every... time... every time I update there are majors bugs and/or regressions. Claude Code has been steadily like this for year... idk what to say. Idk how people still have the patience to dig into minified JS and draft well-crafted issues like these when the devs constantly prove they have no regard for stability. They simply don't deserve these efforts.
reverting to 2.1.19 fixed it for me.
syncletica commentedon Feb 27, 2026
Adding another scenario to this: background agents doing web searches.
When background agents are running, they often keep searching well beyond what I believe is needed. I can see they've already visited enough sources and I'm ready to move forward, but there's no way to say "stop and give me what you have." If I interrupt, the main agent reports it has no results from those agents. All work is lost.
ianbmacdonald commentedon Mar 5, 2026
I just noticed this on 2.1.69 .. I was away from claude for a week; On return, I though ghostty lost my scrollback settings .. something changed as I could scrollback before compaction previously .. this creates an impossible situation to supervise claude. My claude-cli auto-updates in place .. what is the best way to roll-back avoiding the deprecated npx method?
ThatDragonOverThere commentedon Mar 6, 2026
Confirming on v2.1.69 — Windows (MSYS2/Git Bash)
Version: Claude Code v2.1.69, Windows 11 (MSYS_NT-10.0-26200), MSYS2/Bash shell, Node.js runtime
Ctrl+E and Ctrl+O do not show session history from before compaction. The keybindings either do nothing or toggle minor UI elements (timing badges), but pre-compaction conversation content is inaccessible.
Why this matters beyond convenience
This compounds with compaction's context loss (#9796). For users running long-lived sessions with complex state (in my case, a trading system with multi-phase build plans, custom hooks, and plan files), the failure chain is:
The net effect is that after compaction, the user has no recovery path at all. The automated recovery (hooks) is unreliable, and the manual recovery (Ctrl+E/O history browsing) doesn't work. The only option is parsing raw JSONL, which is not practical mid-session.
Echoing @ianbmacdonald's comment above — this creates an impossible supervision situation for long-running sessions.
scapeshift-ojones commentedon Mar 7, 2026
Sev2 issue existing for over a month now, clearly affecting a bunch of users, does anyone at Anthropic care? What is going on here this is an easy fix.
abhishuoza commentedon Mar 11, 2026
Thank you for detailing this bug, it's been the most frustrating one for me.
Another temporary workaround: Use /fork every time you need a session up to a specific point saved.
Assume by default that the branch of the session you see in front of you is the only branch that you can access again via the TUI. You won't have them all grouped in a tree like they should be, but you can still find it as a different session at the same location.
Unless I'm mistaken, I think this works.
Kinda stupid and annoying especially given how easy this seems to be to fix.
goldngreen commentedon Mar 24, 2026
This is the worst possible time to clear the screen. The consequence is that, if Claude has forgotten something following the compact, the user cannot manually scroll to remind themself. A --no-clear-on-compact option would be a big improvement.
yurukusa commentedon Mar 29, 2026
Hook workaround: export conversation to markdown before compaction
Until the TUI adds a way to browse pre-compaction history, a PreCompact hook can export the full conversation to a readable markdown file before compaction runs:
pre-compact-transcript-export.sh:Install in
.claude/settings.json:{ "hooks": { "PreCompact": [ { "hooks": [ { "type": "command", "command": "bash /path/to/pre-compact-transcript-export.sh" } ] } ] } }Every time compaction fires, the full pre-compaction conversation gets saved as
~/.claude/conversation-snapshots/YYYYMMDD-HHMMSS.md. You can read these files anytime to review what was discussed before compaction.This doesn't fix the TUI limitation, but it gives you a persistent, human-readable record that survives compaction.
khaledh commentedon Apr 3, 2026
Another subtle case is when compaction is immediately followed by reaching the session limit. You have no recourse (unless you buy extra credits) to go back and check the conversation history, and have to wait until the next session window to ask Claude for a summary or previous details.
christophervankammen commentedon Apr 6, 2026
Its silly this is an issue? Its compaction data should be sent to a simple backend folder, file or internal memory if its going to compact, chat data should just be held locally and what is seen in the editor/extension/cli is simply a copy of that in an interactive wrapper?
wowitsjack commentedon Apr 8, 2026
Fix for this is over at #44772
frackham commentedon Jul 13, 2026
will this also fix the multiple claude remote issues of continuing history after disconnect that keep being closed? If so great :)
bestiaya commentedon Sep 9, 2026
Not a fix, and not a TUI answer. For anyone hitting this on long-running jobs: I stopped depending on the transcript being reviewable. State for a job lives in one markdown file outside the context window, written as decisions land; when a session compacts or ends, the next one reads that file instead of the history. It doesn't recover your pre-compaction context — the bug is real and I'd still like it fixed — it removes the dependency on it. Six of my own cases: 93,073 characters of state, 53,339 actually read on takeover. Self-measured, n=6.
vshulcz commentedon Oct 14, 2026
compaction doesn't touch the file, the turns before it are still in ~/.claude/projects//.jsonl (the compact summary even prints that path), and this dumps them in order:
jq -r 'select(.type=="user" or .type=="assistant") | .message.content | if type=="string" then . else map(select(.type=="text").text) | join("\n") end' <file>i built a small cli that indexes those files so you can search across sessions too: https://github.com/vshulcz/deja-vu.
deja show <id>prints the whole session, pre-compaction turns included.hjk-sys commentedon Oct 28, 2026
Workaround until this lands: compacted messages are still in ~/.claude/projects. npx decompact shows them all, offline. (I built it.) https://github.com/hjk-sys/decompact
pearonjames commentedon Nov 1, 2026
Adding the VS Code extension to this report, which was filed against the CLI. I'm on extension 2.1.314 on Windows. Two VS Code reports, #53091 and #79042, were auto-closed for inactivity and are now locked, so I'm commenting here. #102361 describes the same problem in the Desktop Code tab.
I reopened a conversation in the VS Code panel and could no longer scroll to its earlier messages. The panel stopped at the point where the session had compacted, and the compaction row expands to the summary and nothing else. I had no warning that compaction would do this.
The messages still exist. They're all in the session file on my machine, and the sessions doc says of a compacted session: "The messages that the last compaction summarized aren't loaded again." I searched the settings reference, the environment variable reference, the VS Code docs, and the extension's own settings, and found no option that changes this.
To read my own conversation, I had Claude write a script that rebuilds a second, read-only copy of any compacted session with the compaction removed. It runs at session start and adds the copy to the sessions list as a separate entry. I work in one thread and scroll back in the other. I can't send messages in the copy, because that would compact it again, and the script depends on the internal session file format, so an update could break it. The copy also shows the panel can display the whole conversation: I scrolled it from the first message onward.
The Claude web and desktop apps handle this better. Anthropic's help page says the Claude app also summarizes long chats near the limit, and that "Your full chat history is preserved so Claude can reference it even after summarization." I can open any long conversation there and scroll to the top.
I also can't plan around this. The conversation that compacted didn't feel long, because by character count my messages and Claude's replies made up about 2% of what filled the context. File reads and tool output made up 81%, and Focus view hides those. Turning auto-compact off doesn't help either: from what I've read, the thread then stops at the limit and can't write its own handoff.
Please load the full conversation history into the panel when a compacted session reopens, or add a setting that does. Reading my own conversation shouldn't take a workaround.