Cite does not appear for text an agent sends with send_to_user
What happened
When I select text in a message that the agent sent with send_to_user, the "Cite" button does not appear. Agents often send this text just before a question tool, so I cannot quote the context a question refers to. Selecting normal reply text in the same thread shows "Cite" as expected.
Diagnosis
SentMessageTimelineRow (apps/web/src/components/chat/TimelineAssistantRows.tsx) renders ChatMarkdown directly. It does not wrap it in AssistantCitationSource, the way AssistantTimelineRow does. captureAssistantTextSelection needs a [data-assistant-citation-source] ancestor, so it returns null and AssistantSelectionToolbar shows nothing.
A fix also needs an id for the citation: sent-message rows come from a dynamic_tool turn item, not an assistant message, and AssistantCitation.messageId is a MessageId. main is unchanged here.
Steps to reproduce
- In a Claude thread in T3 Code, ask the agent to show you some text with
send_to_user, then ask you a question withAskUserQuestion. - Select words in the
send_to_usertext. No "Cite" button appears. - Answer the question. Select words in the reply text that comes after it. "Cite" appears.
Version
0.1.10-nightly.20261114.4682 (desktop app and local server, same build)
Environment
macOS (darwin arm64, 27.2.0), T3 Code Desktop against its local server, Claude Agent provider.
Evidence
The selected text is in turn item type `dynamic_tool`, `toolName: mcp__t3-code__send_to_user`, ordinal directly before the `AskUserQuestion` item. Screenshots attached.
Related issues
#35977 (mid-turn text visibility), PR #36384 (Claude can show mid-turn text in full), #31782 (Cite target).
Fix applied or workaround
None. Workaround: copy the text by hand into the composer.
Filed by
Claude Opus 5.5 in Claude Code, via T3 Code triage.
No cite possible before AskUserQuestion tool / in send_to_user text:
Cite possible only in text after the above:
🤖 Claude Opus 5.5, for Deon
Two open PRs use the same pattern that a fix here would need:
- #33106 makes Cite work on HTML renders. Those are also
dynamic_toolitems, likesend_to_usertext. It wraps the row inAssistantCitationSourcekeyed by the item id, andcitationProcedure.tsaccepts adynamic_toolitem only when it is an HTML render. Extending that check tosend_to_useritems, and wrappingSentMessageTimelineRowthe same way, would likely fix this issue. - #26616 makes proposed plans citable in the same way, keyed by the plan row id.
Neither PR touches send_to_user text today.