Skip to content

[BUG] No way to view pre-compaction conversation history — Ctrl+O/Ctrl+E broken, thinking blocks hidden #26125

@scapeshift-ojones

Description

@scapeshift-ojones

Summary

After context compaction, users cannot access their previous conversation history. The full transcript is preserved in transcript.jsonl on disk, but there is no working UI to view it. This causes effective data loss — task context, reasoning chains, error messages, and file modifications are irretrievably lost from the user's perspective.

Three compounding bugs make this worse:

  1. Ctrl+O does the wrong thing — help text says "toggle verbose output" but it triggers transcript mode, which itself is broken
  2. Transcript mode hides all past thinking blockshidePastThinking is hardcoded to true, showing only the final (least useful) thinking block
  3. Ctrl+E is unresponsive after compaction — no fallback to view history

Root Cause Analysis

Ctrl+O keybinding collision

The ? help menu shows Ctrl+O as "Toggle verbose output" but pressing it activates transcript mode — a completely different full-screen historical view. There is no keyboard shortcut to actually toggle real-time verbose output during execution.

Note: Keybindings are now configurable via ~/.claude/keybindings.json, so terminal multiplexer conflicts (tmux, zellij) can be worked around by remapping. However, the mislabeled help text and broken transcript mode remain regardless of binding.

Transcript mode hides thinking blocks

Source analysis of cli.js (v2.1.17) by @carrotRakko on #16965:

hidePastThinking: !0  // hardcoded to true in transcript mode
  • Only the very last thinking block is displayed; all others get hideInTranscript: true
  • The last thinking block is typically "Done. Reporting to user." — the least useful one
  • Intermediate thinking blocks containing actual reasoning, debugging logic, and decision-making are hidden
  • In normal mode, hidePastThinking is not passed (defaults to false) — so this is specific to the transcript view

Proposed fix (from @carrotRakko): Show all thinking blocks since the last user input, rather than all-or-nothing.

Community patch exists: aleks-apostle/claude-code-patches#9

Post-compaction context destruction

After compaction:

  • Claude reconstructs context incorrectly from compacted summaries (confirmed: Claude responded "Based on the compacted summary, we were discussing corrections to the CLAUDE.md documentation" — which was wrong)
  • File operations in progress may be corrupted (CLAUDE.md truncated from 860 to 424 lines during compaction on [BUG] Conversation compaction loses entire history, ctrl+e unresponsive #19888)
  • Error states include "max compactions exceeded" and "NO compactable messages available"
  • transcript.jsonl preserves the full history, but there is no in-TUI viewer

Steps to Reproduce

Ctrl+O misbehavior

  1. Start a Claude Code session
  2. Give a multi-step task that triggers tool use
  3. Press Ctrl+O — observe transcript mode activates (not verbose toggle)
  4. In transcript mode, note that only the last thinking block is visible

Post-compaction data loss

  1. Run a long session until context compaction triggers
  2. After compaction, press Ctrl+O — only compacted summary is visible
  3. Press Ctrl+E — no response or empty view
  4. Full conversation history is gone from the UI despite existing in transcript.jsonl

Expected Behavior

  • Users should be able to browse their full conversation history, including pre-compaction messages
  • Thinking blocks should be visible in transcript mode (at minimum, all blocks from the current turn)
  • Ctrl+O help text should accurately describe its behavior
  • Help text for Ctrl+O should match its actual behavior

Impact

  • Effective data loss: Hours of conversation context, debugging steps, file modification history become inaccessible
  • Cannot audit Claude's reasoning: Hidden thinking blocks prevent users from understanding why Claude made specific decisions
  • Cannot recover from bad compaction: When compaction corrupts context, there's no way to review what was lost
  • Workflow disruption: Help text mislabels Ctrl+O, so users expecting verbose toggle get transcript mode instead

Workarounds

  1. grep raw JSONL filestranscript.jsonl contains everything, but requires manual parsing
  2. Pre-compaction hooks — Community script by @EMarkODell auto-saves before each compaction
  3. Cozempic — Open-source tool for context loss mitigation (deduplication, checkpointing to .memory/WORKING.md)
  4. Community patch for thinking blocks: Update thinking patch for latest Claude Code aleks-apostle/claude-code-patches#9

Environment

  • Versions affected: 2.0.8+ (scroll regression), 2.1.x+ (thinking blocks hidden), all current versions
  • Platforms: macOS, Windows, Linux
  • Terminals: All tested (Terminal.app, iTerm2, Ghostty, Windows Terminal, VS Code)

Consolidates These Issues

Issue Title 👍
#14511 Ctrl+O triggers transcript view, not verbose toggle 6
#19888 Compaction loses entire history, Ctrl+E unresponsive 4
#16965 Cannot read past thinking blocks with Ctrl+O 3
#21188 View full conversation history in UI 0

Combined engagement: 13+ thumbs-up, 30+ comments, multi-platform.

These issues share a common theme: after compaction, users lose access to their conversation history, and the existing UI tools (Ctrl+O, Ctrl+E) don't work to recover it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions