/resume loads wrong session when continuation files share the same slug
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 using /resume to resume a session, the selected session sometimes shows context and messages from a completely different session. Selecting "Session A" by name/slug displays the content of "Session B".
What Should Happen?
Resuming a session should load the complete conversation — either by appending new messages to the original session file, or by correctly linking continuation files so that selecting a session by slug always loads the full chain. The session list should not show duplicate entries for the same logical conversation.
Error Messages/Logs
Inspecting ~/.claude/projects/<project>/ reveals mismatched session files:
File: 3240e317-05c7-4101-9375-18a3544dd18e.jsonl (30MB, Mar 3)
Inner sessionId: 1575475e-ede7-481e-b026-6e01c57d5d5d
Slug: lazy-imagining-pillow
File: 1575475e-ede7-481e-b026-6e01c57d5d5d.jsonl (9.5MB, Mar 2)
Inner sessionId: 1575475e-ede7-481e-b026-6e01c57d5d5d
Slug: lazy-imagining-pillow
Both files appear as the same slug in /resume but contain different halves of the conversation.
Full list of mismatched continuation files found:
- 3240e317 → continues 1575475e (slug: lazy-imagining-pillow)
- 15627a59 → continues da30e773 (slug: sequential-snacking-bengio)
- 3604a66e → continues f3897e0a (slug: lovely-stirring-lovelace)
- 43c38c8a → continues d5811346 (slug: scalable-spinning-moth)
- 733451b3 → continues 7f80aece (slug: whimsical-moseying-shell)
- d5811346 → continues 18eefb86 (slug: scalable-spinning-moth)
Steps to Reproduce
- Start a session (e.g. slug: "lazy-imagining-pillow", file:
1575475e.jsonl) - Exit the session with
/exit - Resume it with
/resume— Claude Code creates a NEW file (3240e317.jsonl) for the continuation, but the messages inside still reference the original session ID (1575475e) - Exit again
- Open
/resume— both1575475eand3240e317now appear as separate entries with the SAME slug ("lazy-imagining-pillow") - Select the session you want — you may get either the original first half OR the continuation second half of the conversation, not the full thing
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.63 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
- macOS Darwin 25.3.0
- Claude Code v2.1.63
- Project directory: ~/Documents/customers/hycentra/agent_team
- 109 total session files accumulated in this project directory
Root cause hypothesis: When /resume is invoked, Claude Code creates a new .jsonl file (with a new UUID as filename) to hold the continuation messages, rather than appending to the original session file. The messages written to this new file still carry the original session's UUID as their sessionId field. This creates two distinct files on disk that both identify as the same logical session (same slug, same inner sessionId). The /resume session picker then shows both as separate selectable entries with identical names, causing the user to inadvertently load only part of the conversation.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗