claude-code - 💡(How to fix) Fix claude --resume fails silently for worktree conversations when run from main repo [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#48835Fetched 2026-04-16 06:49:37
View on GitHub
Comments
2
Participants
3
Timeline
6
Reactions
0
Timeline (top)
labeled ×4commented ×2

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.

Error Message

  • 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
  • --resume accepts the ID without error — it just says "not found", implying the ID is wrong

Root Cause

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.

Fix Action

Workaround

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

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

Code Example

cd /repo/.claude/worktrees/<worktree-name>
claude --resume <conversation-id>
RAW_BUFFERClick to expand / collapse

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/)

extent analysis

TL;DR

Run claude --resume <conversation-id> from the specific git worktree where the conversation was started to successfully resume the conversation.

Guidance

  • To resume a conversation, navigate to the git worktree where the conversation was initiated using cd /repo/.claude/worktrees/<worktree-name>.
  • Then, run claude --resume <conversation-id> to access the conversation.
  • Be aware that conversation files are stored in ~/.claude/projects/-<encoded-worktree-path>/, which is specific to each worktree.
  • Consider documenting or noting the worktree path for each conversation to easily resume sessions later.

Example

No explicit code example is necessary for this issue, as the solution involves navigating to the correct directory and running the claude command with the --resume option.

Notes

The current implementation of claude --resume is scoped to the current working directory's project path, which may not be immediately clear to users. This can lead to confusion when trying to resume conversations started in different worktrees.

Recommendation

Apply the workaround by running claude --resume <conversation-id> from the specific git worktree where the conversation was started, as this allows users to access conversations that are not found when running the command from the main repository root.

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 claude --resume fails silently for worktree conversations when run from main repo [2 comments, 3 participants]