From 67767f9653d46b508310dcddf9cf5dbbbc80455f Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Fri, 28 Aug 2026 15:36:24 +0000 Subject: [PATCH 1/3] Allow dismissing AskUserQuestion with a decline reply Question cards had no close control, so users were stuck until they picked an option or waited for the 15-minute timeout. Add an X that resolves the paused tool call with "None, I don't want to respond to the question" for every asked question so the agent can continue. Co-authored-by: Shreya Shankar --- docs/agent/ask-and-steer.mdx | 2 +- src/lib/components/AgentModal.svelte | 23 +++++++++++++++++++++++ src/routes/+page.svelte | 11 +++++++++-- 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/docs/agent/ask-and-steer.mdx b/docs/agent/ask-and-steer.mdx index d4be7e5..4096590 100644 --- a/docs/agent/ask-and-steer.mdx +++ b/docs/agent/ask-and-steer.mdx @@ -51,7 +51,7 @@ While the agent responds, you can see the active request above the activity log ## Questions from the agent -You may see a question card when the agent needs a choice before continuing, such as which audience a section should address. A single choice submits immediately. A multi-question card shows how many answers remain. Unanswered questions expire after 15 minutes so the run can continue. +You may see a question card when the agent needs a choice before continuing, such as which audience a section should address. A single choice submits immediately. A multi-question card shows how many answers remain. Click the **X** to decline without answering — the agent continues with the message that you do not want to respond. Unanswered questions expire after 15 minutes so the run can continue. Authentication failures show a sticky **Agent auth failed** toast with sign in guidance. Other run failures show **Agent run failed** and remain in the activity log. diff --git a/src/lib/components/AgentModal.svelte b/src/lib/components/AgentModal.svelte index 2671975..5f52f3a 100644 --- a/src/lib/components/AgentModal.svelte +++ b/src/lib/components/AgentModal.svelte @@ -121,6 +121,21 @@ onAnswerQuestion(card.id, answers); } + /** Decline-without-answering reply sent when the user Xs out of a + * question card. The agent is still paused on AskUserQuestion, so we + * must resolve the tool call — an empty answers map would leave the + * agent without a clear signal; this fixed string tells it to move on. */ + const DECLINE_ANSWER = "None, I don't want to respond to the question"; + + function dismissQuestion(card: PendingUserQuestion) { + const answers: Record = {}; + for (const q of card.questions) { + answers[q.question] = DECLINE_ANSWER; + } + clearCardSelections(card); + onAnswerQuestion(card.id, answers); + } + /** Single-select click. A one-question card submits immediately (the * common quick-clarification case keeps its one-click feel); a card * with more questions records the choice radio-style and waits for @@ -206,6 +221,14 @@