[BUG] No working mechanism to review previous context after compaction, plan-mode clear, or branch navigation — data preserved but UI inaccessible

Open 💬 17 comments Opened Feb 20, 2026 by scapeshift-ojones

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:

  1. 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.
  2. 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.
  3. Branch navigation: Right-arrow in the /resume picker (which used to allow browsing conversation branches) does nothing. Branch data is intact in JSONL with correct parentUuid linkage.

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

  1. Run a long session until automatic context compaction triggers
  2. Observe the banner: ✻ Conversation compacted (ctrl+o for history)
  3. Press Ctrl+O — the TUI enters "Showing detailed transcript" mode
  4. Observe: only post-compaction messages are shown (compact summary + subsequent work)
  5. Press Ctrl+E — the status bar toggles between "ctrl+e to show all" / "ctrl+e to collapse"
  6. 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: https://github.com/aleks-apostle/claude-code-patches/pull/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

  1. Start a session and have Claude enter plan mode
  2. Claude explores the codebase, asks design questions, iterates on a plan
  3. Accept the plan with "clear context and accept edits"
  4. Observe: a new session is created with the plan text as the first user message
  5. The pre-plan exploration conversation is in the old session's JSONL
  6. 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

  1. 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)
``

  1. Exit the session
  2. Run /resume
  3. Select the session in the picker
  4. Press right-arrow on the session line
  5. 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

  1. Parse raw JSONL: jq queries against transcript.jsonl — functional but defeats the purpose of a TUI
  2. Pre-compaction hooks: Community script by @EMarkODell auto-saves before each compaction
  3. Cozempic: Open-source context loss mitigation tool
  4. Community patch for thinking blocks: https://github.com/aleks-apostle/claude-code-patches/pull/9
  5. 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:

  1. Load and render the full transcript including pre-compaction messages
  2. Display thinking blocks (remove hidePastThinking: !0 hardcoding)
  3. Show branch points with navigation between branches
  4. For plan-mode sessions, link back to the predecessor session

The data layer is already correct — this is purely a UI/rendering gap.

View original on GitHub ↗

17 Comments

scapeshift-ojones · 4 months ago

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.json is not updated for new sessions. @vbhavsar reports 68 .jsonl files on disk but only 25 indexed. The v2.1.47 workaround (scanning .jsonl directly up to 50) masks this, but users with 50+ sessions per project still can't find their work. Tracked separately in #25032.

Bug 4 — /rename names invisible in picker: @ThatDragonOverThere reports that custom session names set via /rename display 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:

| Layer | Problem | Issue |
|-------|---------|-------|
| Find sessions | Index staleness — sessions not indexed | #26123 Bug 1 |
| Identify sessions | /rename names missing from picker | #26123 Bug 4 |
| Navigate branches | Right-arrow does nothing in picker | This issue, Bug 3 |
| View history | No pre-compaction content in transcript mode | This issue, Bug 1 |
| Link plan sessions | No connection to predecessor session | This issue, Bug 2 |

The 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 · 4 months ago

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 · 4 months ago

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:

  1. 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.
  1. 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. parentUuid linkage perfect. Just no way to see it.
  1. 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 · 4 months ago

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).

vonscons · 4 months ago

I’m consistently loosing last 15 minutes of work, especially when there are multiple subagents in background

tassa-yoniso-manasi-karoto · 4 months ago

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 · 4 months ago

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 · 4 months ago

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 · 4 months ago

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:

  1. Compaction loses context — project instructions deprioritized, active plan state lost
  2. Post-compact hooks deprioritized — even with a SessionStart hook that re-injects rules (plan file path, sub-agent workflow, RAM safety), the model treats hook output as lower priority than its compressed summary
  3. Ctrl+E/O broken — user cannot manually review pre-compact state to verify what was lost or re-orient the session

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 · 4 months ago
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).

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 · 4 months ago

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 · 3 months ago

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 · 3 months ago

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:

INPUT=$(cat)
TRANSCRIPT=$(echo "$INPUT" | jq -r '.transcript_path // empty' 2>/dev/null)
if [ -z "$TRANSCRIPT" ] || [ ! -f "$TRANSCRIPT" ]; then
    TRANSCRIPT=$(find ~/.claude/projects -name "transcript.jsonl" -mmin -60 2>/dev/null | tail -1)
fi
[ -z "$TRANSCRIPT" ] || [ ! -f "$TRANSCRIPT" ] && exit 0
SNAPSHOT_DIR="$HOME/.claude/conversation-snapshots"
mkdir -p "$SNAPSHOT_DIR"
OUTPUT="$SNAPSHOT_DIR/$(date -u +%Y%m%d-%H%M%S).md"
{
    echo "# Conversation Snapshot ($(date -u '+%Y-%m-%d %H:%M UTC'))"
    echo ""
    while IFS= read -r line; do
        ROLE=$(echo "$line" | jq -r '.message.role // empty' 2>/dev/null)
        case "$ROLE" in
            user)
                echo "## User"
                echo "$line" | jq -r '.message.content // empty' 2>/dev/null | head -20
                echo "" ;;
            assistant)
                echo "## Assistant"
                echo "$line" | jq -r '[.message.content[]? | select(.type=="text") | .text] | join("\n")' 2>/dev/null | head -50
                echo "" ;;
        esac
    done < "$TRANSCRIPT"
} > "$OUTPUT"
echo "Snapshot saved: $OUTPUT" >&2
exit 0

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 · 3 months ago

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 · 3 months ago

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 · 3 months ago
frackham · 3 days ago

will this also fix the multiple claude remote issues of continuing history after disconnect that keep being closed? If so great :)