[Bug] VSCode extension plan comments (in UI) not persisted, cleared on plan updates

Status Closed — not planned
Reported on v2.1.80
Maintainer reply None cached
Activity 3 comments · opened Mar 20, 2026 · closed Apr 17, 2026

Bug Description
VSCode plan "Comments" (in the UI) are highly ephemeral and easy to delete. Expected behavior: COmments work and are recoverable in worst-case; actual behavior: my beloved comments are gone and not persisted. Root cause (from claude):

 Here's what happened — your ~30 comments are gone with no recovery path. Here's the forensic breakdown:

  What happened

  1. Comments were in-memory only. The Claude Code VSCode extension stores plan comments in planCommentsByChannel = new Map() — a JavaScript in-memory Map. They are never persisted to
  disk.
  2. The plan was rewritten, which cleared them. When Claude called openMarkdownPreview() to update the plan (going from v2 → v3, the big rewrite to the final design doc), this line ran:
  this.planCommentsByChannel.set(z, [])  // resets comments to empty array
  2. This wiped all existing comments every time the plan markdown was updated.
  3. No trace in session log. The plan_comment events are only sent from extension → webview (UI-layer), never written to the .jsonl session log. I searched the entire session file — zero
  plan_comment entries.
  4. No trace in VSCode storage. The workspace state DB (state.vscdb) only stores webview UI state, not comment content.
  5. No trace in file history. The two file history snapshots (v2 and v3) are just the plan markdown itself — no comment metadata.

  Root cause

  This is a bug/design gap in Claude Code's VSCode extension. Plan comments are:
  - Stored only in runtime memory
  - Cleared whenever the plan content is updated
  - Not persisted to any file, database, or session log

  The previous session (at 01:49:04 UTC) told you the same thing: "Those VS Code rendered markdown comments aren't visible to me — they're UI-layer annotations that don't get written to the file."

macos latest, m4 max, vscode, claude-extension latest. all versions as of march 19th.

Environment Info

  • Platform: darwin
  • Terminal: ghostty
  • Version: 2.1.80
  • Feedback ID: ae22b258-0fd5-4b28-ad07-97b07af7da04

Errors

[]

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗