C:/Program Files/Git/resume picker loses renamed sessions after ~16KB of new activity
Bug Description
Sessions renamed with /rename disappear from the /resume interactive picker after enough new content is added to the session.
Root Cause
The /resume picker reads only the last 16KB (gv6=16384) of each .jsonl session file to find the customTitle entry (via the SOz function in cli.js). When a session accumulates more than 16KB of data after the /rename command, the {"type":"custom-title","customTitle":"..."} line is pushed beyond the read window and the session becomes invisible in the picker.
Reproduction
- Start a new session, do substantial work (the session file grows)
- Run
/rename MySession - Continue working — generate >16KB of new messages
- Exit and run
/resume— "MySession" no longer appears
Evidence
Two sessions with customTitle entries at these byte offsets:
| Session | customTitle offset | File size | Distance from end |
|---------|-------------------|-----------|-------------------|
| Session A | 121,855,654 | 126,805,680 | 4.9 MB |
| Session B | 146,526,706 | 149,547,154 | 3.0 MB |
Both sessions are visible in the Cursor IDE extension (which presumably reads the full file or uses sessions-index.json), but invisible in the terminal /resume picker.
Suggested Fix
When writing a custom-title entry via /rename, also append it to the end of the file (or always write it as the last line). Alternatively, increase the tail read window or do a targeted reverse scan for "type":"custom-title".
Workaround
Manually re-run /rename after long sessions to move the title entry closer to the end of the file.
Environment
- Claude Code v2.1.42 (npm
@anthropic-ai/claude-code) - Windows 11, Git Bash
- Session files:
~/.claude/projects/{project}/*.jsonl
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗