claude-code - 💡(How to fix) Fix Plan-mode sidebar comments ("Select any text to leave a comment for Claude") aren't delivered to the assistant [1 comments, 2 participants]

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…
GitHub stats
anthropics/claude-code#49715Fetched 2026-04-17 08:33:27
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×3commented ×1

When a plan file is open in the Claude Code sidebar (with the hint text "Select any text to leave a comment for Claude"), selecting text and typing a comment appears to succeed in the UI — but the comment never reaches the assistant. The next user turn contains only the typed message, with no attachment, system reminder, or annotation payload carrying the selection-anchored comments.

Root Cause

When a plan file is open in the Claude Code sidebar (with the hint text "Select any text to leave a comment for Claude"), selecting text and typing a comment appears to succeed in the UI — but the comment never reaches the assistant. The next user turn contains only the typed message, with no attachment, system reminder, or annotation payload carrying the selection-anchored comments.

RAW_BUFFERClick to expand / collapse

Summary

When a plan file is open in the Claude Code sidebar (with the hint text "Select any text to leave a comment for Claude"), selecting text and typing a comment appears to succeed in the UI — but the comment never reaches the assistant. The next user turn contains only the typed message, with no attachment, system reminder, or annotation payload carrying the selection-anchored comments.

Environment

  • App: Claude Code Desktop
  • Version: 2.1.111
  • Entrypoint: claude-desktop
  • OS: macOS 15 (Darwin 25.4.0)
  • Plan file location: ~/.claude/plans/<slug>.md

Steps to reproduce

  1. Enter plan mode; the assistant writes a plan file (e.g. ~/.claude/plans/swirling-squishing-rossum.md) and calls ExitPlanMode.
  2. Approve the plan. The file is displayed in the sidebar with the hint "Select any text to leave a comment for Claude".
  3. Select a paragraph in the sidebar and type a comment.
  4. Send a next message referencing "my comments" (e.g. "look at my comments on stage 0 and update that part").

Expected: the assistant receives the selected-text + comment pairs, either as a structured attachment, a system reminder, or inline markup in the user turn.

Actual: the assistant only receives the typed message. No trace of the sidebar comments appears in:

  • The plan file on disk (mtime and md5 unchanged).
  • The session JSONL at ~/.claude/projects/<project-slug>/<session-id>.jsonl (searched for selectedText, annotation, comment, etc.).
  • Any other ~/.claude/ directory (checked sessions/, cache/, project memory dirs).

The assistant has no way to discover the comments and must ask the user to paste them into chat, which defeats the purpose of the feature.

Impact

  • Users who use the sidebar comment affordance reasonably expect their comments to reach the assistant, since the UI explicitly invites them to leave comments "for Claude".
  • Round-trip is wasted clarifying where comments are and asking the user to repeat them.
  • Creates a user-perceived "Claude isn't reading what I wrote" experience.

Suggested fix direction

On message send, serialize any pending sidebar comments as a structured attachment (or inlined as <comment anchor="...">...</comment> system reminders) so the assistant can read them.

Notes

Filed on behalf of a user after the assistant was unable to locate comments the user had left via this feature. The user wrote: "the sidebar says 'Select any text to leave a comment for Claude' — that is how I left comments. There is no save button."

extent analysis

TL;DR

Serialize pending sidebar comments as a structured attachment or inline system reminders on message send to ensure the assistant receives them.

Guidance

  • Investigate the message sending logic to determine why sidebar comments are not being included in the sent message.
  • Verify that the selectedText and comment data are being stored correctly in the application state when a user selects text and types a comment.
  • Consider adding logging or debugging statements to track the flow of comment data from selection to message send.
  • Review the serialization of message data to ensure that comment attachments or system reminders are being properly formatted and included.

Example

No code snippet is provided as the issue does not include specific code references.

Notes

The suggested fix direction implies that the issue lies in the serialization of message data, but further investigation is needed to confirm this. The fix may require changes to the message sending logic, the application state management, or the serialization of comment data.

Recommendation

Apply workaround: Modify the message sending logic to include pending sidebar comments as a structured attachment or inline system reminders. This will ensure that the assistant receives the comments and can process them accordingly.

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