claude-code - 💡(How to fix) Fix Plan-mode inline comments left via desktop UI are silently lost — never reach session jsonl or plan file

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

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.

Error Message

  1. At minimum, warn the user before discarding them on plan rejection or whatever lifecycle event currently kills them.

Root Cause

Root cause hypothesis

RAW_BUFFERClick to expand / collapse

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

  1. Persist plan-UI inline comments to the session jsonl as a dedicated event type (e.g. plan_comment with {planFilePath, anchor, comment_text, author, timestamp}).
  2. 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).
  3. At minimum, warn the user before discarding them on plan rejection or whatever lifecycle event currently kills them.
  4. Bonus: surface existing comments to the agent in the plan_mode reminder 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 gh without confirming they exist on the repo): claude-code-desktop, plan-mode

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING