[BUG] Renamed Sessions Not Appearing in /resume
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?
Summary
Sessions that are renamed using /rename do not appear in the /resume command list if they lack a corresponding session directory in ~/.claude/projects/.
Steps to Reproduce
- Start a new Claude Code session and have a conversation
- Use
/renameto rename the session (e.g., "Capacity Planning App") - Exit the session
- Run
/resumecommand
Expected behavior: The renamed session appears in the resume list
Actual behavior: The renamed session does not appear in the resume list
Technical Details
- Claude Code Version: 2.1.39
- Session ID:
349f6ae6-b351-4bb3-88c9-d8de1e012e15 - Session file exists:
~/.claude/projects/-Users-v140432/349f6ae6-b351-4bb3-88c9-d8de1e012e15.jsonl(1.1MB, 540 lines) - Session directory missing:
~/.claude/projects/-Users-v140432/349f6ae6-b351-4bb3-88c9-d8de1e012e15/did not exist - Rename timestamp: 1771880696978 (Feb 23, 2026)
- Workaround: Manually creating the directory makes the session appear in
/resume
Root Cause
The /resume command appears to list sessions by checking for the presence of session directories rather than scanning for .jsonl files. Sessions that never spawn subagents or generate tool result artifacts may only have .jsonl files without directories, causing them to be invisible to /resume even after being renamed.
Suggested Fix
The /resume command should index sessions by scanning for .jsonl files in the projects directory, not by directory presence. Session directories should be optional artifacts, not required for session discovery.
Impact
Users cannot easily resume renamed sessions that lack directories, requiring manual session ID lookup or directory creation.
What Should Happen?
The renamed session appears in the resume list
Error Messages/Logs
Steps to Reproduce
- Start a new Claude Code session and have a conversation
- Use
/renameto rename the session (e.g., "Capacity Planning App") - Exit the session
- Run
/resumecommand
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
Claude Code 2.1.39
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗