Skip to content

[Bug] /rewind creates in-file branches not visible in resume picker, contrary to documentation #19451

Closed as not planned

Description

@shi-kejian

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

The documentation states that "Forked sessions (created with /rewind or --fork-session) are grouped together under their root session" with →/← keys to expand/collapse. However, /rewind creates in-file branches (via parentUuid relationships within a single session file), NOT separate session files. These in-file branches are not visible in the resume picker, and the documented expand/collapse functionality does not work.

From Common Workflows documentation:

"Forked sessions (created with /rewind or --fork-session) are grouped together under their root session"
"Use arrow keys (→/←) to expand or collapse grouped sessions"

Actual behavior:

  • /rewind creates in-file branches via parentUuid tree within a SINGLE session file
  • No separate session files are created for branches
  • Resume picker shows flat list - no grouping, no expand/collapse
  • Arrow keys (→/←) have no effect
  • 483 branch points in my session file are completely invisible in UI

What Should Happen?

Based on documentation:

  • /rewind should create forked sessions visible in the resume picker
  • Forked sessions should be grouped under their root session
  • Arrow keys (→/←) should expand/collapse to show branches
  • Users should be able to navigate and resume from different branch points

Error Messages/Logs

No error messages - the feature silently doesn't work. The data exists but isn't surfaced:


# Analyzing session file d6ea9071-7c07-4cc9-9938-0b406b452f45.jsonl
file_size = 57.5 MB
total_entries = 29,344
branch_points = 483 (entries with multiple children via parentUuid)
unique_conversation_endpoints = 330 (leafUuid in summaries)
separate_fork_session_files_created = 0

# sessions-index.json for this session
{
  "sessionId": "d6ea9071-...",
  "isSidechain": false,
  "messageCount": 9733
  // MISSING: parentSessionId, rootSessionId, forkedFrom, forkDepth
}

Steps to Reproduce

  1. Start a new Claude Code session
  2. Have a conversation with multiple exchanges
  3. Use /rewind or Esc+Esc to go back to an earlier point
  4. Continue the conversation (this should create a branch)
  5. Repeat steps 3-4 multiple times to create multiple branches
  6. Run claude --resume to open the session picker
  7. Observe: Flat list with no grouped/hierarchical view of branches
  8. Press → or ←: No expand/collapse behavior occurs

My test case:

  • Session spanning Dec 8, 2025 - Jan 19, 2026 (42 days)
  • 483 branch points created via interruptions/rewind
  • 330 unique conversation endpoints (via leafUuid)
  • All branches stored in-file via parentUuid, none as separate session files

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.4

Claude Code Version

2.1.12

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

No response

Activity

  1. github-actions commented on Jan 20, 2026

    @github-actions

    Found 3 possible duplicate issues:

    1. [BUG] Code permanently lost on rewind #16023
    2. [BUG] Checkpoints cannot be restored #15403
    3. [BUG] claude --resume only shows one session despite multiple saved sessions (Windows) #16235

    This issue will be automatically closed as a duplicate in 3 days.

    • If your issue is a duplicate, please close it and 👍 the existing issue instead
    • To prevent auto-closure, add a comment or 👎 this comment

    🤖 Generated with Claude Code

  2. shi-kejian commented on Jan 20, 2026

    @shi-kejian
    Author

    The issue #19451 creator is aware of related issues.

    This issue is distinct from the flagged potential duplicates:

    The core of this issue: The documentation states /rewind creates "forked sessions grouped together under their root session" with →/← to expand/collapse. However, /rewind
    creates in-file branches via parentUuid that are never surfaced in the UI. This is either a missing feature or a documentation error.

  3. what-name commented on Jan 20, 2026

    @what-name

    agree, not able to revert to before-rewind in any case. I thought it was weird.

  4. HennadiiM commented on Feb 5, 2026

    @HennadiiM

    Additional bisection data from a separate user:

    • 2.1.29: toggles present ✓ (branches from /compact visible, expand/collapse works)
    • 2.1.31: toggles missing ✗ (flat list, no expand/collapse)
    • 2.1.30 not tested directly, but changelog mentions session index rewrite for that version

    Environment: macOS 15 (Darwin 25.2.0, arm64), sessions with 7–168 unique leafUuid values.

    Workaround: claude install 2.1.29

  5. github-actions commented on Mar 5, 2026

    @github-actions

    Closing for now — inactive for too long. Please open a new issue if this is still relevant.

  6. github-actions commented on Mar 13, 2026

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  7. locked as resolved and limited conversation to collaborators on Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:corearea:tuibugSomething isn't workingdocumentationImprovements or additions to documentationhas reproHas detailed reproduction stepsplatform:linuxIssue specifically occurs on LinuxstaleIssue is inactive

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions