VS Code extension: sessions that used EnterWorktree are not restored after restarting VS Code (they open as "Untitled")
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 28/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- git, typescript, vscode
- Ambito
- tooling
Direzione di ricerca
Start from the panel restore path in the VS Code extension, which looks up sessions only in the workspace's project directory under ~/.claude/projects/. Reproduce by calling EnterWorktree in one session, then restarting, and compare the transcript location with the one that restores. Done means restored panels find sessions stored in .claude/worktrees/<name> project directories, or transcripts stay in the original directory. The issue does not name the source files, and the fix touches session storage, so this needs maintainer input.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Environment
- Claude Code VS Code extension (macOS, Darwin 27.0.0)
- Model: Opus 5.5
Steps to reproduce
- Open a git repository folder in VS Code (e.g.
~/projects/my-app). - Open a Claude Code panel and start a conversation.
- During the conversation, ask Claude to work in a worktree, so that it calls
EnterWorktree(cwd becomesmy-app/.claude/worktrees/<name>). - Open another Claude Code panel and have a conversation that does not use
EnterWorktree. - Restart the machine (or quit and reopen VS Code).
Expected
Both panels come back with their conversations.
Actual
- The conversation without
EnterWorktreeis restored. - The conversation that used
EnterWorktreereopens as an empty "Untitled" panel.
Observation
The transcripts are not lost. They are saved under a different project directory:
- Restored session:
~/.claude/projects/-<path>-my-app/<session-id>.jsonl - Not restored:
~/.claude/projects/-<path>-my-app--claude-worktrees-<name>/<session-id>.jsonl
I checked three sessions. Both sessions that called EnterWorktree (15 and 19 times) were stored in the worktree directory and were not restored. The one session that entered the worktree only with cd (0 calls) was stored in the main directory and was restored. My guess is that panel restore only looks in the project directory for the workspace folder, so it never finds sessions whose transcript moved to the worktree's directory.
Suggested fix
When restoring a panel, find the session by its ID across the workspace's worktree project directories as well. Or keep the transcript of a session that called EnterWorktree in the original project directory.
- Lingua principale
- TypeScript
- Stelle
- 157k
- Fork
- 25.1k
- Merge medio
- 20h 25m
- PR unite (30g)
- 4
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di anthropics/claude-code
-
area:tui enhancement platform:macos
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
anthropics/claude-code#112838 ·
-
area:docs area:plugins bug documentation low-priority platform:windows
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
anthropics/claude-code#112676 ·
-
area:docs area:hooks area:skills bug platform:windows
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
anthropics/claude-code#112675 ·
-
[DOCS] Private Azure DevOps plugin marketplaces work in the Claude desktop app – please documentApertaarea:docs area:plugins documentation enhancement platform:windows
Difficoltà 1/5 1-3 ore Idoneità per principianti 86/100
anthropics/claude-code#112663 ·
-
area:agents bug has repro platform:macos
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
anthropics/claude-code#112605 ·
Tutte le issue di anthropics/claude-code
Issue simili
-
sumHorizontal, maxHorizontal, minHorizontal, allHorizontal, anyHorizontal, struct and argSortBy treat strings as literals instead of column namesForse già presa @tomaionescu l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
pola-rs/nodejs-polars#486 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
jaegertracing/jaeger-ui#4853 ·
I maintainer di solito rispondono entro 1 giorno
-
area/plugins platform/linux reproduced type/bug version/v2
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
anomalyco/opencode#66970 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Add: Sports First TV (US)Apertaapproved check:passed streams:add
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
RequirementAgent treats list -> add -> list as a tool call cycle and drops the second list call (Python)Forse già presa @chaitanya0305 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
i-am-bee/beeai-framework#2049 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno