askwire

askwire notes · 2026-10-25 · 中文版

Decline vs cancel, and who is actually answering

MCP elicitation lets a server pause a tool call and ask the user something. The reply carries one of three words: accept, decline or cancel. We ran Claude Code, Codex and opencode against a probe server to see which word comes back, how fast, and whether a person could have seen the question at all.

Q1

What the spec says

The MCP specification defines three response actions for elicitation/create:

All three are described as things a user does. None of them is described as "there was no user". That is the gap this post is about.

Q2

What came back

Latest releases on 2026-10-25, one Linux machine. The answers were the same on every run; the milliseconds vary by machine.

clienthow it was runadvertisesformurl
Claude Code 2.1.310claude -pform + urlcancel, 4 mscancel, 3 ms
Claude Code 2.1.310interactive, Escform + urlcancel, 1.7 scancel, 2.0 s
Codex 0.164.0codex execform + urldecline, 3 msdecline, 1 ms
Codex 0.164.0interactive, Escform + urlcancel, 1.8 sdecline, 2.1 s
opencode 1.19.4opencode runnonenot sentnot sent

Across runs: claude -p answered cancel in 3 to 5 ms and codex exec answered decline in 1 to 3 ms. Neither drew anything; there was no terminal to draw on.

In the interactive TUIs the question was drawn (askwire saw the probe's nonce on screen after 120 to 230 ms) and then askwire pressed Esc. Claude Code returned cancel both times. Codex returned cancel for the form and decline for the URL request. By the spec, dismissing without a choice is cancel.

opencode 1.19.4 does not advertise elicitation (its capabilities are {roots:{}}), so the SDK refuses to send one. A raw elicitation/create sent anyway gets -32601 Method not found. That is the honest answer.

Q3

Who is actually answering

Three observations, each from a probe log line:

If the reply came back in 3 ms, no one read it.

Q4

How the measurement works

npx github:Blackman99/askwire            # headless: claude -p, codex exec, opencode run
npx github:Blackman99/askwire --tui      # the real TUIs in tmux (needs tmux)

Q5

What your server should do

  1. Treat only accept, with the content you asked for, as consent.
  2. Treat decline and cancel the same: do not proceed. Clients don't use them consistently.
  3. Put a timeout on the request and treat no answer as no.
  4. When the client is running headless, refuse risky actions instead of asking. If the action matters, log that it was accepted; a hook can accept too.
const r = await server.server.elicitInput({
  message: "Delete 312 rows from orders?",
  requestedSchema: { type: "object", properties: { confirm: { type: "boolean" } }, required: ["confirm"] },
}, { timeout: 60_000 });                       // no answer in 60 s: treated as no

if (r.action !== "accept" || r.content?.confirm !== true) {
  // decline and cancel both land here: they mean the same thing to you
  return { content: [{ type: "text", text: "Not confirmed. Nothing was changed." }] };
}
log.info("confirmed via elicitation", { client: server.server.getClientVersion()?.name });  // accept can come from a hook

Q6

What was not measured

Everything above was measured on Linux only. The unit tests also run on macOS, but no real-client run has been done there. Windows is untested. Cursor agent, Gemini CLI, Copilot CLI and Kiro CLI are not covered yet, nor is elicitation over Streamable HTTP or inside MCP Tasks.

If your machine gives a different answer, askwire --markdown prints a table you can paste into an issue. Full flags and the JSON format are in the docs.