claude-code - 💡(How to fix) Fix [BUG] --resume picker does not show session when project path contains underscores [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#54930Fetched 2026-05-01 05:50:43
View on GitHub
Comments
2
Participants
3
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×4commented ×2

Error Message

Error Messages/Logs

Fix Action

Fix / Workaround

Workaround: claude -r <session-id> works correctly.

Code Example

Elliot@local /d/Desktop/workspace/feat_elliot_buy_esignbao_20260430 (feat_elliot_buy_esignbao_20260430)
$ pwd
/d/Desktop/workspace/feat_elliot_buy_esignbao_20260430

Elliot@local /d/Desktop/workspace/feat_elliot_buy_esignbao_20260430 (feat_elliot_buy_esignbao_20260430)
$ ll ~/.claude/projects/ | grep esignbao
drwxr-xr-x 1 Elliot 197121 0  430 15:53 D--Desktop-workspace-feat-elliot-buy-esignbao-20260430/

---
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

When the working directory path contains underscores (e.g., D:\Desktop\workspace\xx_xx_xx), Claude Code encodes the path into the ~/.claude/projects/ folder name by converting underscores to hyphens (result: D--Desktop-xx-xx-xx.

The session file exists on disk and is valid, but claude --resume interactive picker does not list it.

Workaround: claude -r <session-id> works correctly.

Now I'm using claude --resume with the sessionId command to continue my work, but I need to go into the folder to get the session ID, which is very inconvenient.

dir info

Elliot@local /d/Desktop/workspace/feat_elliot_buy_esignbao_20260430 (feat_elliot_buy_esignbao_20260430)
$ pwd
/d/Desktop/workspace/feat_elliot_buy_esignbao_20260430

Elliot@local /d/Desktop/workspace/feat_elliot_buy_esignbao_20260430 (feat_elliot_buy_esignbao_20260430)
$ ll ~/.claude/projects/ | grep esignbao
drwxr-xr-x 1 Elliot 197121 0  430 15:53 D--Desktop-workspace-feat-elliot-buy-esignbao-20260430/

What Should Happen?

Session appears in the picker regardless of underscores in path.

Error Messages/Logs

Steps to Reproduce

  1. cd into a directory with underscores in the path
  2. Start a Claude Code session, have a conversation
  3. Exit and run claude --resume
  4. The session does not appear in the picker

Claude Model

None

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.119

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

No response

extent analysis

TL;DR

The issue can be worked around by using claude -r <session-id> instead of claude --resume to resume sessions when the working directory path contains underscores.

Guidance

  • Verify that the session file exists on disk and is valid by checking the ~/.claude/projects/ folder.
  • Use the claude -r <session-id> command to resume sessions, as it works correctly even with underscores in the path.
  • To make it easier to get the session ID, consider navigating to the ~/.claude/projects/ folder and listing the directories to find the session ID.
  • If the issue persists, try checking the directory names in ~/.claude/projects/ to ensure they match the expected format (with hyphens instead of underscores).

Example

No code snippet is necessary for this issue, as it appears to be a command-line argument issue.

Notes

The root cause of the issue is likely due to the encoding of the path into the ~/.claude/projects/ folder name, which converts underscores to hyphens. This may be a bug in the Claude Code software.

Recommendation

Apply the workaround by using claude -r <session-id> to resume sessions, as it is a reliable alternative to claude --resume when working with directory paths containing underscores.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] --resume picker does not show session when project path contains underscores [2 comments, 3 participants]