[BUG] VS Code: resuming a web session that lived in a git worktree fails with "No conversation found with session ID"

Status Closed — not planned
Reported on v2.1.224
Maintainer reply ✓ Yes — bcherny
Activity 4 comments · opened Aug 7, 2026 · closed Aug 24, 2026
💡 Likely answer: A maintainer (bcherny, collaborator) responded on this thread — see the highlighted reply below.

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?

I started a session in my repo, Claude moved into a git worktree (.claude/worktrees/<branch>) via the worktrees skill, and I later teleported the session to web. The session shows up fine in the "Web" sessions list in the VS Code extension, but resuming it fails:

Error: Claude Code returned an error result: No conversation found with session ID: 0a1ad0b3-9cb1-4bc6-a989-42f4749b1c13

Each resume attempt writes a stub jsonl in the main repo's project dir with messageCount: 0:

{"type":"teleported-from","remoteSessionId":"session_01XNuYqBR3258LsAwGtTng7g","branch":"...","messageCount":0}
{"type":"teleport-skipped-branch","branch":"...","failed":false}

then errors out because the stub has no conversation in it.

Sessions are stored per working directory. When the session entered the worktree, its transcript continued under the worktree's project slug (...-repo--claude-worktrees-<branch>/<session-id>.jsonl). The main repo dir only has a small fragment with the same session ID. The extension resumes from the main repo dir, doesn't find the conversation there, and doesn't check the worktree slug. Teleport-back also downloads 0 messages instead of restoring from web.

What Should Happen?

Resuming from the Web sessions list should either pull the conversation from the cloud or find the local transcript under the worktree's project dir.

Workaround:

cd into the worktree and claude --resume <session-id> works fine, the full transcript is there.

Heads up: the nested triple-backtick blocks might trip GitHub's renderer — if the preview looks broken, the outer fence isn't needed since you're pasting into the description field directly.

If the template asks for environment info: VS Code extension, macOS (Darwin 25.4.0). You can get the exact versions from claude --version and the Extensions panel.

Error Messages/Logs

2026-08-07 08:54:13.166 [info] From claude: No conversation found with session ID: 0a1ad0b3-9cb1-4bc6-a989-42f4749b1c13
2026-08-07T05:54:13.166Z [ERROR] No conversation found with session ID: 0a1ad0b3-9cb1-4bc6-a989-42f4749b1c13
2026-08-07 08:54:13.717 [info] Closing Claude on channel: r65z695g7h
2026-08-07 08:54:13.717 [error] Error spawning Claude (on channel r65z695g7h): Error: Claude Code returned an error result: No conversation found with session ID: 0a1ad0b3-9cb1-4bc6-a989-42f4749b1c13

And the stub file it leaves behind (~/.claude/projects/<main-repo-slug>/0a1ad0b3-9cb1-4bc6-a989-42f4749b1c13.jsonl):

{"type":"teleported-from","remoteSessionId":"session_01XNuYqBR3258LsAwGtTng7g","branch":"fix-codegen-nested-optionals","messageCount":0}
{"type":"teleport-skipped-branch","branch":"fix-codegen-nested-optionals","failed":false}

Steps to Reproduce

  1. Start a Claude Code session in a repo from the VS Code extension
  2. Ask Claude to work in a git worktree (it uses the worktrees skill, creates .claude/worktrees/<branch> and continues there — transcript moves to the worktree's project slug under ~/.claude/projects)
  3. Teleport the session to web (claude.ai/code) and continue it there
  4. Back in VS Code, open the sessions list, find the session under "Web" and try to resume it
  5. Resume fails with "No conversation found with session ID: <new-id>" and leaves a stub jsonl with messageCount: 0 in the main repo's project dir

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

n/a

Claude Code Version

2.1.224

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

3 Comments

lazure-ocean · 17 days ago

+1, experience same problem

bcherny collaborator · 13 days ago

Thanks for the detailed report. I couldn't reproduce this end to end (it needs the VS Code extension plus a session round-tripped through claude.ai/code), but I did check the worktree part on 2.1.233: a session that ran inside .claude/worktrees/<branch> resumes fine with claude --resume <id> from the main repo directory, so the worktree location isn't what's breaking here.

What the logs show is different: when the extension pulls the web session back, it received an empty transcript (0 messages) from the server, saved that as a new local session, and then couldn't resume the empty file. That's a real bug on our side — an empty download should not be saved and then fail like this — and we're looking into why the transcript came back empty for a session that started locally and was moved to the web.

To help us pin it down, could you share:

  • Whether claude --teleport <web-session-id> from a terminal in the repo works for the same session (this tells us if it's extension-only)
  • Your current Claude Code and VS Code extension versions
  • The extension output log lines around "Teleport started" / "Fetched N log entries" for one attempt

🤖 Generated with Claude Code

github-actions[bot] · 13 days ago

We weren't able to reproduce this. Could you provide steps to trigger the issue — what you ran, what happened, and what you expected? This issue will be closed automatically if there's no activity within 7 days.

Showing cached comments. Read the full discussion on GitHub ↗