claude-code - 💡(How to fix) Fix [Bug] Branched sessions show false recent activity timestamps and rewind freezes on large histories [1 comments, 2 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#53008Fetched 2026-04-25 06:14:53
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Author
Timeline (top)
labeled ×5commented ×1cross-referenced ×1

Fix Action

Fix / Workaround

  • Bug 2 reproducibly blocks recovery workflows (fork + rewind) on any session that accumulates real work.
  • A workaround for Bug 2: close terminal window, resume the specific session fresh — cold-load is faster than live scroll.
  • No workaround for Bug 1 beyond remembering which branch you're in externally.

Code Example

<local-command-caveat>Caveat: The messages below were generated...  (Branch)
  24 seconds ago · release/mir-58-mir-59 · 10.5MB · a***/b***#159

  <local-command-caveat>Caveat: The messages below were generated...
  1 minute ago · release/mir-58-mir-59 · 18.7MB
RAW_BUFFERClick to expand / collapse

Environment:

  • Claude Code CLI on macOS (Darwin 25.3.0)
  • Model: Claude Opus 4.7 (1M context)
  • Session sizes: ~18.7 MB (parent) and ~10.5 MB (branch)
  • Session type: branched conversation (forked mid-session)
  • Project: Next.js monorepo (pnpm workspace)

Bug 1 — Branched sibling sessions report stale/false "recent activity"

Steps to reproduce:

  1. Start a conversation in project A.
  2. Mid-session, branch the conversation (fork).
  3. Continue working in only ONE of the two resulting sessions (e.g., the branch).
  4. Open the Claude Code resume/history picker.

Expected: Only the active session shows a recent timestamp; the inactive sibling shows its last real interaction time.

Actual: Both sibling sessions display near-identical recent timestamps (e.g., "24 seconds ago" vs "1 minute ago") despite no user interaction with the sibling. The resume picker implies both are live.

Example from my picker:

❯ <local-command-caveat>Caveat: The messages below were generated...  (Branch)
  24 seconds ago · release/mir-58-mir-59 · 10.5MB · a***/b***#159

  <local-command-caveat>Caveat: The messages below were generated...
  1 minute ago · release/mir-58-mir-59 · 18.7MB

Only the 10.5 MB branch was active. The 18.7 MB parent had not been touched.

Likely cause: resume index is driven by mtime of shared prefix or parent metadata; writes in the active branch bump the parent's mtime, making both appear recent.

Impact: Ambiguous which session is "real." Users can accidentally resume the wrong sibling and lose orientation.


Bug 2 — Rewinding (scrolling history) freezes on large branched sessions

Steps to reproduce:

  1. Open a branched conversation with ~15–20 MB of JSONL history on 1M-context Opus.
  2. Attempt to rewind / scroll up through prior messages.

Expected: Smooth scroll through history, even if first frame is slow.

Actual: UI freezes (no cursor, no keypress echo) for tens of seconds or indefinitely on every rewind attempt. Behavior is reliable, not intermittent. Cannot ^c to escape; must close terminal window.

Hypothesis: Rewind re-materializes full session history per frame rather than using a windowed view. Cost scales linearly with session size; becomes unusable past ~10 MB on branched conversations where prefix sharing may compound the work.

Impact: Users with long sessions cannot safely go back to review earlier context, retry a prior step, or reuse the "/rewind-to-message" flow. Effectively forces session termination to escape.


Additional context

  • Bug 2 reproducibly blocks recovery workflows (fork + rewind) on any session that accumulates real work.
  • A workaround for Bug 2: close terminal window, resume the specific session fresh — cold-load is faster than live scroll.
  • No workaround for Bug 1 beyond remembering which branch you're in externally.

extent analysis

TL;DR

To address the issues with branched sessions, consider modifying the resume index to use a more granular timestamp, and optimize the rewind functionality to use a windowed view of session history.

Guidance

  • Investigate the current implementation of the resume index and how it updates the mtime of shared prefixes or parent metadata to understand why both sibling sessions appear recent.
  • Verify that the rewind functionality is re-materializing the full session history per frame, and explore alternatives like using a windowed view to improve performance.
  • Test the hypothesis that the cost of rewinding scales linearly with session size, and evaluate the impact of prefix sharing on this cost.
  • Consider implementing a workaround for Bug 2, such as allowing users to cold-load a session instead of rewinding, to improve usability.

Example

No code snippet is provided as the issue does not contain sufficient technical details to generate a specific example.

Notes

The provided information suggests that the issues are related to the implementation of the resume index and rewind functionality, but further investigation is needed to determine the root cause and develop a comprehensive solution.

Recommendation

Apply a workaround, such as allowing users to cold-load a session instead of rewinding, to mitigate the impact of Bug 2 until a more permanent solution can be implemented. This is because the current implementation of the rewind functionality is causing significant usability issues, and a workaround can provide a temporary solution to improve the user experience.

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 [Bug] Branched sessions show false recent activity timestamps and rewind freezes on large histories [1 comments, 2 participants]