Plan-mode inline comments left via desktop UI are silently lost — never reach session jsonl or plan file
Summary
Inline comments / annotations left on a plan file through the Claude Code Desktop plan UI are not persisted anywhere accessible. They are silently lost on a lifecycle event with no warning, no recovery, and no diff. The agent (in-session or any later session) cannot see them either.
Identified lifecycle trigger
User authored a plan, the agent wrote it via Write/Edit, user left "a ton of" inline comments via the desktop plan UI, then rejected the plan via ExitPlanMode and attempted to edit the plan post-rejection. After that, the comments were gone. Plan rejection appears to tear down the plan-UI comment state without persisting it.
Forensic evidence (three independent passes on this machine)
Pass 1 — the plan file itself/Users/<user>/.claude/plans/<plan>.md — pure agent-authored markdown, no inline annotation markers (<!-- USER: -->, > USER:, [[comment]], sticky-note JSON blobs, etc.). Nothing in the file carries user-authored content.
Pass 2 — the session jsonl~/.claude/projects/-Volumes-Developer-Developer-vendle/dbf22c98-99db-4766-9172-555ed1cdd6e9.jsonl (156 lines). Event-type histogram: 48 assistant, 46 attachment, 33 user, 14 queue-operation, 12 last-prompt, 3 system. Every user-type event content is either (a) one of the 6 user-typed prompts in chat, or (b) a tool-result echo. Every attachment payload is a hook output, deferred-tool-delta, MCP instructions, plan_mode reminder (which only carries {planFilePath, planExists}), task_reminder, or file attachment. There is no event type, payload shape, or field name that carries comment/annotation/review/feedback/highlight content.
Pass 3 — clean-context subagent reverse-scan
A clean-context subagent walked a dump of session-tool events (replay.txt, 674 lines) and an extracted events stream (events.jsonl, 9 lines) in reverse order, line by line. Verdict matched Pass 2: no user-authored content beyond the 6 chat prompts, no annotation markers, all UTF-8 clean, no encoded blobs.
Root cause hypothesis
The desktop plan UI keeps inline comments only in app-local UI state (presumably IndexedDB / sqlite local to the desktop app's profile). When something resets that state — plan rejection, refresh, resume, navigation away, plan-file rewrite by the agent — the comments are silently lost. There is no on-disk artifact that survives the reset.
Asks
- Persist plan-UI inline comments to the session jsonl as a dedicated event type (e.g.
plan_commentwith{planFilePath, anchor, comment_text, author, timestamp}). - Or, persist them into the plan file itself as inline markers the agent can read back (e.g. HTML comment blocks with a known prefix).
- At minimum, warn the user before discarding them on plan rejection or whatever lifecycle event currently kills them.
- Bonus: surface existing comments to the agent in the
plan_modereminder attachment so it can address them without the user having to re-type them.
Environment
- macOS
- Claude Code Desktop, plan mode
- Session id:
dbf22c98-99db-4766-9172-555ed1cdd6e9 - Session window: ~2026-05-20T01:45 → 02:23 UTC
- Suggested tags (couldn't apply via
ghwithout confirming they exist on the repo):claude-code-desktop,plan-mode
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗