[BUG] Renaming a forked session also renames the original session

Resolved 💬 3 comments Opened Dec 19, 2025 by jackzhouusa Closed Feb 14, 2026

Description

When forking a session and then renaming the forked session using /rename, the original (parent) session's name is also changed. The two sessions should have independent names after forking.

Steps to Reproduce

  1. Start a new Claude Code session
  2. Have a conversation (so there's content to fork)
  3. Rename the session:

``
/rename original-session
``

  1. Fork the session from CLI:

``bash
claude --continue --fork-session
``

  1. In the forked session, rename it:

``
/rename forked-session
``

  1. Run /resume to view the session list

Expected Behavior

  • The original session should still be named original-session
  • The forked session should be named forked-session
  • Both sessions should have independent names

Actual Behavior

  • Both sessions show the same name forked-session
  • Renaming the forked session affected the original session's name

Environment

  • Claude Code version: 2.0.73
  • OS: macOS (Darwin 24.6.0)
  • Shell: zsh

Additional Context

  • Fork session feature was introduced in 2.0.64
  • The --session-id parameter requires UUID format, so custom naming relies on /rename
  • Session files in ~/.claude/projects/ have a slug field (auto-generated) but user-defined names from /rename appear to be stored separately, possibly shared between forked sessions

Possible Cause

The session name mapping might be stored by reference rather than copied when forking, causing both sessions to share the same name entry.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗