pub(crate) const ASK_USER_QUESTION_DENY_MESSAGE: &str = "The user declined to answer this question.";Expand description
Fixed, server-owned decline message for a cancelled AskUserQuestion (the
Cancel button / Escape in AgentQuestionPanel.tsx) — not client-suppliable,
since Cancel and Escape both mean exactly one thing and there is no user-
authored content to carry. See deny_question and
docs/specs/SPEC_AGENT_CONTROL_PROTOCOL_2026_06_15.md.
KEEP IN SYNC (no shared constant crosses the Rust/TypeScript boundary for
a plain string literal): CANCEL_FALLBACK_MESSAGE in
frontend/app/view/agent/hooks/useAgentQuestions.ts is a hand-copied
mirror of this exact text, used only for its SAFE_TO_RETRY_VIA_FOLLOWUP
fallback path. If you change this string, update that one too — the test
ask_user_question_deny_message_matches_frontend_cancel_fallback_text
below pins the literal on this side; the frontend test asserting
sendMessage was called with this exact text (in
useAgentQuestions.test.ts, “handleCancel fallback” describe block)
pins it on that side. Neither test can see the other language’s
constant, so both must be updated by hand together.