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:
accept: the user explicitly approved and submitted, withcontentholding the data.decline: the user explicitly declined the request.cancel: the user dismissed it without making an explicit choice (closed the dialog, pressed Escape).
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.
| client | how it was run | advertises | form | url |
|---|---|---|---|---|
| Claude Code 2.1.310 | claude -p | form + url | cancel, 4 ms | cancel, 3 ms |
| Claude Code 2.1.310 | interactive, Esc | form + url | cancel, 1.7 s | cancel, 2.0 s |
| Codex 0.164.0 | codex exec | form + url | decline, 3 ms | decline, 1 ms |
| Codex 0.164.0 | interactive, Esc | form + url | cancel, 1.8 s | decline, 2.1 s |
| opencode 1.19.4 | opencode run | none | not sent | not 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:
- Headless
declineis not a person saying no.codex exec(approval policy never) returnsdecline, the word the spec reserves for an explicit refusal, in a couple of milliseconds. cancellooks the same with or without a person.claude -pwith nobody there and the Claude Code TUI after a real Esc send the identical reply. A server cannot tell "dismissed" from "nobody existed".acceptdoes not prove a person either. A Claude CodeElicitationhook returning accept produced{"action":"accept","content":{"confirm":true}}in about 20 ms underclaude -p. The hook input carries the server name, message, mode and requested schema, so a script can answer anything.
If the reply came back in 3 ms, no one read it.
Q4
How the measurement works
- Probe server. A stdio MCP server whose tools each send exactly one
elicitation/create(form, url, and one raw request to a client that never advertised the capability), tagged with a per-run nonce such asAW-4FJ7. It logs what the client advertised atinitialize, the answer, the round trip and any JSON-RPC error. - Local stand-in model. A small endpoint that speaks the Anthropic Messages, OpenAI Responses and Chat Completions formats just well enough to call the next probe tool and then stop. No account, no API key, no tokens.
- Throwaway homes. Each client runs with a temporary
HOME/CODEX_HOME/ XDG directory, pointed at the stand-in through its documented custom-endpoint settings. Your own configs are never read or written. - Screen check. With
--tui, the real interactive client runs in a private tmux server. askwire waits for the nonce to appear on screen, records when, then presses Esc.
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
- Treat only
accept, with the content you asked for, as consent. - Treat
declineandcancelthe same: do not proceed. Clients don't use them consistently. - Put a timeout on the request and treat no answer as no.
- 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.