Skip to content

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

Closed as duplicate

Description

@foldedstar

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?

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

Activity

  1. github-actions commented on Jan 4, 2026

    @github-actions

    Found 3 possible duplicate issues:

    1. [BUG] claude --resume only shows one session despite multiple saved sessions (Windows) #16235
    2. [BUG] /resume shows global history instead of filtering by current directory (breaks worktree isolation) #14036
    3. [BUG] Resuming sessions only works from the directory in which they were started #5768

    This issue will be automatically closed as a duplicate in 3 days.

    • If your issue is a duplicate, please close it and 👍 the existing issue instead
    • To prevent auto-closure, add a comment or 👎 this comment

    🤖 Generated with Claude Code

  2. added
    duplicateThis issue or pull request already exists
    and removed
    bugSomething isn't working
    has reproHas detailed reproduction steps
    platform:macosIssue specifically occurs on macOS
    platform:linuxIssue specifically occurs on Linux
    on Jan 8, 2026
  3. github-actions commented on Jan 8, 2026

    @github-actions

    This issue has been automatically closed as a duplicate of #16235.

    If this is incorrect, please re-open this issue or create a new one.

    🤖 Generated with Claude Code

  4. github-actions commented on Jan 15, 2026

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  5. locked as resolved and limited conversation to collaborators on Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions