Skip to content

claude --resume fails silently for worktree conversations when run from main repo #48835

Description

@premiumFrye

Summary

claude --resume <id> silently fails with "No conversation found" when the conversation occurred inside a git worktree and the command is run from the main repository root. There is no indication that the conversation exists or where to look for it.

Steps to Reproduce

  1. Start a Claude Code session inside a git worktree (e.g. /repo/.claude/worktrees/my-worktree/)
  2. Do some work — the conversation is stored in ~/.claude/projects/-<path-to-worktree>/
  3. Exit the session
  4. From the main repo root (/repo/), attempt to resume: claude --resume <conversation-id>
  5. Result: No conversation found with session ID: <id>

Expected Behavior

One of:

  • --resume finds conversations across all worktrees for the same repo, or
  • The error message indicates where conversations for that ID are stored (e.g. "found in worktree project — run from /repo/.claude/worktrees/my-worktree/"), or
  • The docs clearly explain that --resume is scoped to the current working directory's project path

Actual Behavior

Silent failure: No conversation found with session ID: <id>. No hint that the conversation is in a different project path, no suggestion to cd into the worktree.

Workaround

cd /repo/.claude/worktrees/<worktree-name>
claude --resume <conversation-id>

Conversation files for worktree sessions live in:
~/.claude/projects/-<encoded-worktree-path>/

Why This Is Confusing

  • --resume accepts the ID without error — it just says "not found", implying the ID is wrong
  • The conversation ID comes from the same ~/.claude/projects/ tree, so users assume it's globally addressable
  • There's no documentation explaining that --resume scope is tied to cwd
  • Worktrees are commonly used for parallel/agent work where resuming a dropped session is especially important

Environment

  • Claude Code CLI on WSL2 (Ubuntu on Windows)
  • Git worktrees created both manually (.worktrees/) and by agent tooling (.claude/worktrees/)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:clibugSomething isn't workingduplicateThis issue or pull request already existsplatform:wslIssue specifically occurs on WSLstaleIssue is inactive

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions