[Bug] Plan file comments lost after "keep planning" rejected exit—silent data loss and orphaned threads

Open 💬 0 comments Opened Jul 11, 2026 by james-lq

Bug Description
Title: Plan-file comment annotations added after "keep planning" are silently lost — not persisted, not submittable, threads can't be reopened Environment Claude Code VS Code extension 2.1.205 (also present: 2.1.204), VS Code 1.128.0, macOS 26.1 (arm64) Plan mode, plan file at ~/.claude/plans/<slug>.md, model claude-fable-5 Steps to reproduce In plan mode, let Claude write a plan file; Claude calls ExitPlanMode, producing the plan-approval prompt. Respond with "keep planning" (the ExitPlanMode call shows as interrupted/rejected in chat). The plan document tab remains open. Using the comment affordance in that tab, add inline comments to several text spans (in my case 3 comments across sections of the doc). Expected Comments are either delivered to Claude (attached to a next message / review round), or at minimum persist and stay openable so they can be read back. If commenting isn't supported on a plan tab whose review session ended, the UI should refuse or warn instead of accepting input. Actual All comments were accepted by the UI at creation time, but were never delivered to Claude and were never written anywhere on disk. Some annotation markers vanished from the document view entirely (in my case, all comments below a certain point in the doc); the earlier ones still render as highlighted spans with a numbered badge (screenshot attached), but clicking them no longer opens the thread — content is unrecoverable. Manual save (Cmd+S) on the tab is a no-op — VS Code doesn't treat it as a real dirty document, and it's unclear anything saved. Evidence that nothing persisted (checked with the agent's help) The plan .md on disk is byte-identical to the version Claude wrote (no comment text, no markers). No sidecar files in ~/.claude/plans/; the session's ~/.claude/file-history/ snapshot matches the pre-comment content. No comment data in workspace state.vscdb or global state.vscdb (including the Anthropic.claude-code key). Hypothesis Rejecting ExitPlanMode ("keep planning") tears down the review session backing the plan tab, but the tab keeps accepting comment input against a dead session — comments go into an in-memory overlay with no owner: nothing to submit to, nothing persisting them, and thread state partially garbage-collected (which would explain some markers disappearing while others remain as inert highlights). Impact Silent data loss of user-authored review feedback, at a moment (plan iteration) where that feedback is the whole point of the flow. The user has to reconstruct their comments from memory.

Environment Info

  • Platform: darwin
  • Terminal: vscode
  • Version: 2.1.204
  • Feedback ID: 797cc12a-5451-47f4-81ef-2c19ac0b6062

Errors

[]

View original on GitHub ↗