π customTitle not restored when resuming session via --resume <session-id>
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When a session is renamed via /rename, the customTitle is correctly persisted to both the JSONL file (as a custom-title entry) and to sessions-index.json (as a customTitle field).
However, when resuming that session via claude --resume <session-id>, the custom title is not restored β the blue label in the input area does not appear.
What Should Happen?
Expected: The blue "my-session" label appears in the input area, matching the state before exit
Actual: No label appears β the session resumes without its custom title
Steps to Reproduce
- Start a new Claude Code session
- Run
/rename my-session - Verify the blue "my-session" label appears in the bottom-right of the input area
- Exit the session
- Resume with
claude --resume <session-id>
The customTitle is correctly stored in two places:
sessions-index.json:
{
"sessionId": "002eed07-...",
"customTitle": "my-session",
...
}
Session JSONL (inline entry):{"type": "custom-title", "customTitle": "my-session", "sessionId": "..."}
The data survives the round-trip β it's just not being read back on resume.
Related
This is closely related to #24502, which reports customTitle being ignored in the /resume picker after /clear. Both bugs stem from customTitle not being properly read back from
persisted state. This bug is about the in-session display; #24502 is about the picker display.
Also related to #23610
Additional Information
- Is this a regression?: I don't know
- Code Version: 2.1.38
- Platform: Anthropic API
- Operating System: macOS
- Terminal/Shell: Terminal.app (macOS)
This issue has 4 comments on GitHub. Read the full discussion on GitHub β