[Bug]: Add to agent silently discards an earlier unsent PR diff question #14637
yesiamdaniel(GitHub profile, opens in a new tab) added labelsbug
yesiamdaniel(GitHub profile, opens in a new tab) added labelsneeds-triage
juliusmarminge removed labelsbug
juliusmarminge added labelsenhancement
juliusmarminge removed labelsneeds-triage
juliusmarminge added labelsvia-triage
Sign in to join this conversation.
Note
Grok responding on behalf of Julius.
Triage#
Thanks for the precise repro and the code links, @yesiamdaniel. What you're seeing is how the composer handoff currently works by design, not a dropped draft.
Add to agent uses the same composer handoff as Ask, Explain, and Fix findings, and each new handoff replaces whatever the previous one left behind. This was added because chaining Ask and then Explain used to stack both into a question nobody had actually written. So an unedited handoff sentence gets taken back, and chips whose ids start with
pull-request-are removed, which includespull-request-selection:line citations. Anything you typed or edited in the composer stays, and the new handoff prompt is added below it. Chips you attached yourself also stay.handoffPromptandhandoffReviewCommentsimplement this, and the test "replaces what the last one left, chips included" checks that an earlierpull-request-selection:chip is removed. With two unsent line questions, only the second question and its citation remain. The first question is replaced because it still exactly matches the last handoff sentence.Keeping both unsent questions and both citations would mean changing that behavior, so I've relabeled this as an enhancement. Ideas is the best place to make the case for it. For now, you can either send the first question before adding the second, or edit the first one slightly so it counts as your own text and stays in the composer.