C:/Program Files/Git/resume fails to match customTitle when session grows beyond 64KB after /rename
Resolved 💬 1 comment Opened Apr 20, 2026 by jqxcode Closed May 27, 2026
The lite metadata scanner (lXA) reads only the first and last 64KB of the session JSONL to extract customTitle. When a session is renamed early/mid-conversation and then grows significantly, the {"type":"custom-title"} lines get pushed outside the 64KB tail window and become invisible to /resume title matching.
Reproduction
- Start a session,
/rename my-session - Keep working until JSONL grows well past 128KB after the rename point
- Exit, then
/resume my-session→ "Session not found" /resume <uuid>works fine and shows the correct title
Evidence
- Session file: 2.8MB
custom-titleentries at byte offsets: 147K, 148K, 172K, 2.4M- Tail window starts at byte 2.75M (file size minus 64KB)
- All
custom-titleentries are outside the 64KB tail — the last one is ~355KB before the tail window
Code References (v2.1.81)
lXA: reads head/tail withha = 65536bufferNHY: extractscustomTitleviaiZ(Y, "customTitle")from tail onlyyF: searches sessions bycustomTitlefor/resumematchingW3Y: the/resumecommand handler that callsyF
Suggested Fix
Re-append custom-title (and other metadata lines) at session close so they're always in the tail window. This is the simplest fix — just one extra append at shutdown.
Alternatively, scan backward from EOF until all metadata types are found, or maintain a separate lightweight index file.
Environment
- Claude Code v2.1.81
- Windows 11 Enterprise
- Session storage: JSONL files in
~/.claude/projects/
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗