claude-code - 💡(How to fix) Fix Rewind / time-travel picker hangs on large session transcripts (~40MB / 15k events) [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52840Fetched 2026-04-25 06:19:30
View on GitHub
Comments
2
Participants
3
Timeline
9
Reactions
3
Author
Timeline (top)
labeled ×4commented ×2cross-referenced ×2subscribed ×1

The rewind / time-travel picker hangs indefinitely when opened against a session whose transcript JSONL has grown large (tens of MB / tens of thousands of events). The terminal becomes unresponsive and must be killed to recover. Smaller sessions in the same environment open the picker normally, so the trigger correlates with transcript size rather than content, corruption, or environment.

Error Message

The scaling cutoff between a 299-event session (fine) and a 15,361-event session (hangs) suggests the picker loads and renders the full event history synchronously — no streaming parse, no virtualized list. The hang scales with transcript size rather than any content-specific trigger. No error is surfaced, and there is no cancellable progress indicator, so the UI appears frozen rather than slow.

Root Cause

Resuming with --fork-session creates a new session UUID and a fresh, small event log inheriting the conversation context. The picker is responsive in the forked session because its local event count starts at zero.

Fix Action

Workaround

Resuming with --fork-session creates a new session UUID and a fresh, small event log inheriting the conversation context. The picker is responsive in the forked session because its local event count starts at zero.

claude --resume <sessionId> --fork-session

Caveat: the rewind graph of the forked session starts at the fork point; rewind into the pre-fork history of the original session is no longer reachable through the picker.

Code Example

7054 assistant
   4208 user
   1600 attachment
    721 permission-mode
    711 last-prompt
    385 system
    371 queue-operation
    309 file-history-snapshot
      2 custom-title

---

claude --resume <sessionId> --fork-session
RAW_BUFFERClick to expand / collapse

Summary

The rewind / time-travel picker hangs indefinitely when opened against a session whose transcript JSONL has grown large (tens of MB / tens of thousands of events). The terminal becomes unresponsive and must be killed to recover. Smaller sessions in the same environment open the picker normally, so the trigger correlates with transcript size rather than content, corruption, or environment.

Environment

  • Claude Code versions observed in the same transcript: 2.1.114, 2.1.117, 2.1.119 (a single long-running session was appended across all three — the hang reproduces on 2.1.119)
  • OS: Ubuntu 22.04.5 LTS on WSL2, kernel 6.6.87.2-microsoft-standard-WSL2
  • Node: v22.22.2
  • Model: claude-opus-4-7
  • Terminal: any (tested in the invoking WSL terminal; not terminal-emulator specific based on symptom)

Steps to reproduce

  1. Use a single session in one working directory over a prolonged period so its transcript at ~/.claude/projects/<encoded-cwd>/<sessionId>.jsonl grows into the multi-tens-of-MB / tens-of-thousands-of-events range.
  2. claude --resume <sessionId>
  3. Open the rewind / time-travel picker.

Expected: the picker lists rewind points and remains interactive.

Actual: the picker opens but never completes rendering. No input (including Esc, Ctrl+C) is accepted. Only killing the terminal process recovers.

File characteristics where the hang reproduces

Measurements taken from the affected transcript:

AttributeValue
File size~40 MB
Line count (events)15,361
Trailing bytesValid JSON — file is intact, not truncated by a crash

Event-type distribution (from jq -r '.type' file.jsonl | sort | uniq -c):

   7054 assistant
   4208 user
   1600 attachment
    721 permission-mode
    711 last-prompt
    385 system
    371 queue-operation
    309 file-history-snapshot
      2 custom-title

A sibling session file in the same projects/<encoded-cwd>/ directory (~640 KB, 299 events) opens the picker normally. The only meaningful difference between the two is size / event count.

Workaround

Resuming with --fork-session creates a new session UUID and a fresh, small event log inheriting the conversation context. The picker is responsive in the forked session because its local event count starts at zero.

claude --resume <sessionId> --fork-session

Caveat: the rewind graph of the forked session starts at the fork point; rewind into the pre-fork history of the original session is no longer reachable through the picker.

Suspected cause

The scaling cutoff between a 299-event session (fine) and a 15,361-event session (hangs) suggests the picker loads and renders the full event history synchronously — no streaming parse, no virtualized list. The hang scales with transcript size rather than any content-specific trigger. No error is surfaced, and there is no cancellable progress indicator, so the UI appears frozen rather than slow.

Suggested directions

  • Stream-parse the transcript rather than reading it into memory in one pass.
  • Virtualize the picker list so rendering cost is bounded by visible rows, not total event count.
  • Short-term mitigation: time-box the load with a cancellable progress indicator so users can abort without killing the terminal.
  • Surface a size / event-count warning on resume when transcripts cross a threshold, pointing at --fork-session as an escape hatch.

Impact

  • User-visible freeze with no graceful abort.
  • Recovery requires killing the terminal.
  • Long-running sessions gradually lose access to the rewind feature without any deprecation signal.

extent analysis

TL;DR

The rewind picker can be made responsive again by forking the session with --fork-session, which creates a new session with a smaller event log.

Guidance

  • To immediately regain access to the rewind feature, use claude --resume <sessionId> --fork-session to create a new session with a fresh event log.
  • Consider implementing a streaming parse of the transcript to avoid loading the entire event history into memory at once.
  • Virtualizing the picker list could also help bound the rendering cost and prevent the UI from freezing.
  • A short-term mitigation could be to add a cancellable progress indicator to allow users to abort the load if it takes too long.

Example

claude --resume <sessionId> --fork-session

This command will create a new session with a fresh event log, allowing the rewind picker to function normally.

Notes

  • The --fork-session workaround has the caveat that the rewind graph of the forked session starts at the fork point, and rewind into the pre-fork history of the original session is no longer reachable through the picker.
  • The suggested directions for a long-term fix, such as streaming parse and virtualized list, would require changes to the underlying implementation of the rewind picker.

Recommendation

Apply the workaround by using --fork-session to create a new session with a smaller event log, as this provides an immediate solution to the problem.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Rewind / time-travel picker hangs on large session transcripts (~40MB / 15k events) [2 comments, 3 participants]