[BUG] `--resume` shows sessions from wrong project directory in devcontainer
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?
claude --resume in a devcontainer shows sessions from a host-path project directory instead of the container's /workspace directory. When both -workspace/ and -Users-<user>-dev-<repo>/ project directories exist for the same git repo, --resume only shows sessions from the host-style directory, completely ignoring container sessions.
What Should Happen?
Per the docs: "Claude Code's /resume picker shows sessions from all worktrees of the same repo"
--resume should aggregate and display sessions from ALL project directories that match the current git repo, not just one.
Error Messages/Logs
No error messages. The command runs successfully but returns the wrong sessions.
- `--continue` works correctly (finds most recent session from `-workspace/`)
- `--resume` silently ignores `-workspace/` sessions and only shows `-Users-<user>-dev-<repo>/` sessions
Steps to Reproduce
Environment: Claude Code 2.0.76, macOS host, Linux devcontainer
Setup: Mount ~/.claude from host to share auth across containers:
volumes:
- ${HOME}/.claude:/home/node/.claude:cached
Steps:
- Authenticate Claude Code CLI from inside a devcontainer
- Run sessions in the container (creates sessions in
~/.claude/projects/-workspace/) - Use Claude Code IDE plugin on host at
/Users/<user>/dev/<repo> - IDE creates sessions in
~/.claude/projects/-Users-<user>-dev-<repo>/ - Return to container and run
claude --resume - Observe: Only host-path sessions shown, container sessions ignored
Verification:
- Renamed
-Users-<user>-dev-<repo>/to.BACKUP --resumethen correctly showed-workspace/sessions- Confirms issue is directory selection, not session reading
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.76 (Claude Code)
Platform
Other
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
Root cause: --resume appears to select only ONE project directory per repo, preferring host-style absolute paths over /workspace.
Configuration state (container's ~/.claude/.claude.json):
{
"githubRepoPaths": {
"<org>/<repo>": ["/workspace"]
},
"projects": {
"/workspace": { "hasTrustDialogAccepted": true }
}
}
Ruled out: Changed container userID to match host userID - no effect. UserID is not used for session filtering.
Workarounds:
- Use
--continueinstead of--resume - Delete/rename host project directory
- Don't share
~/.claude/projects/between host and container
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗