/rename doesn't persist when session is missing from sessions-index.json
Resolved 💬 3 comments Opened Feb 13, 2026 by gulliversgames Closed Feb 17, 2026
Bug Description
/rename <name> silently fails to persist the new name when the session is not present in sessions-index.json.
Steps to Reproduce
- Open a session in a project where
sessions-index.jsonis stale (not updated recently) - Run
/rename terminal-playground - CLI outputs:
Session and agent renamed to: terminal-playground - Exit and run
claude --resume— the session appears without the custom name
Expected Behavior
The rename should persist and show the custom name in the resume picker.
Actual Behavior
The rename is lost. Investigation shows:
- No
renameormetadataentry is written to the session JSONL - The
namefield on JSONL entries remains empty ("") - The
slugfield retains the auto-generated value (e.g.,crispy-orbiting-crane) sessions-index.jsonwas stale (last updated Feb 4) and didn't contain the session/renamelikely only updatessessions-index.json, so if the session isn't indexed, the rename is silently dropped
Root Cause (Suspected)
/rename writes to sessions-index.json but doesn't:
- Verify the session exists in the index first
- Write a fallback entry to the JSONL transcript
- Warn the user if the rename couldn't be persisted
Workaround
Manually add the session entry to sessions-index.json with the name field set.
Environment
- Claude Code: 2.1.41
- macOS (Darwin 24.6.0)
🤖 Generated with Claude Code
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗