[BUG] `--resume` shows sessions from wrong project directory in devcontainer

Resolved 💬 3 comments Opened Jan 4, 2026 by foldedstar Closed Jan 8, 2026

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:

  1. Authenticate Claude Code CLI from inside a devcontainer
  2. Run sessions in the container (creates sessions in ~/.claude/projects/-workspace/)
  3. Use Claude Code IDE plugin on host at /Users/<user>/dev/<repo>
  4. IDE creates sessions in ~/.claude/projects/-Users-<user>-dev-<repo>/
  5. Return to container and run claude --resume
  6. Observe: Only host-path sessions shown, container sessions ignored

Verification:

  • Renamed -Users-<user>-dev-<repo>/ to .BACKUP
  • --resume then 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:

  1. Use --continue instead of --resume
  2. Delete/rename host project directory
  3. Don't share ~/.claude/projects/ between host and container

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗