askwire docs
askwire tells MCP server authors what really happens to an elicitation/create request in each AI client: was the question drawn on a screen, or did the client answer it by itself? It runs the clients installed on your machine against a probe server and a scripted stand-in model. Everything stays local.
1Install
Needs Node.js 20 or newer. Nothing to configure, no API key.
npx github:Blackman99/askwire # run straight from GitHub
Or install the release tarball globally, which gives you an askwire command:
npm install -g https://github.com/Blackman99/askwire/releases/download/v0.1.0/askwire-0.1.0.tgz askwire --version
askwire only tests clients that are already installed. To try one without touching your global install, put it in a scratch folder and point at it with --bin:
npm install --prefix /tmp/clients @anthropic-ai/claude-code @openai/codex opencode-ai @google/gemini-cli
askwire --bin claude=/tmp/clients/node_modules/.bin/claude \
--bin codex=/tmp/clients/node_modules/.bin/codex \
--bin opencode=/tmp/clients/node_modules/.bin/opencode \
--bin gemini=/tmp/clients/node_modules/.bin/gemini
--tui also needs tmux (apt install tmux, brew install tmux). Real-client runs are tested on Linux in CI and the unit tests also run on macOS. Windows is untested so far.
2Usage
Headless (the default)
Runs claude -p, codex exec and opencode run and gemini -p: the way agents run in CI, scripts and sub-agents. No terminal exists, so any answer you get came from the client.
askwire # every supported client found on PATH askwire claude codex # just these
Interactive (--tui)
Starts each client's real terminal UI inside a private tmux server, waits until the probe's nonce (for example AW-4FJ7) shows up on screen, records how long that took, then presses Esc. That tells you the question was really drawn, and which answer a dismissal produces.
askwire --tui
askwire codex --tui --answer none --timeout 60 # leave the prompt open: see how long the client holds the call
Nobody answers (--wait)
The timeout scenario sends one more form question and never touches it. askwire records whether anything answers within --wait seconds, and with --tui whether the question was on screen and whether the client takes it down in the 10 s after the probe gives up. It is off by default because it takes a minute per client; it always runs last.
askwire claude codex --tui --wait 60 # the usual three questions, then one left alone for 60 s askwire --tui --scenarios timeout # only the untouched question (60 s, or 30 s when CI is set)
For an issue or a script
askwire --markdown # table to paste into a bug report askwire --json > run.json # everything, see the reference askwire --strict # exit 1 if any client answered without a human: useful in CI
Use the probe server by hand
Want to see what your own setup does, with your real model? Add the probe server to the client yourself and ask the agent to call the askwire_form tool.
claude mcp add askwire -- npx -y github:Blackman99/askwire server --log /tmp/askwire.jsonl tail -f /tmp/askwire.jsonl
Each line in the log is a JSON event: initialized (with the client's capabilities), sent, then result, error, timeout or abandoned. By hand, the askwire_timeout tool waits --wait seconds (default 60).
3Configuration
There is no config file. Everything is a flag.
| flag | default | what it does |
|---|---|---|
[clients...] | all found | Any of claude, codex, opencode, gemini. Naming a client that is not installed is reported as a problem, not skipped. |
--tui | off | Run the interactive UI in tmux and check the question is on screen. |
--scenarios | form,url,unadvertised | Which probes to send, comma separated, or all. unadvertised is only sent to a client that did not advertise elicitation. timeout is opt-in. |
--wait | 60 (30 when CI is set) | Seconds the timeout scenario leaves its question untouched. Giving --wait adds the scenario to the default list; with an explicit --scenarios list, include timeout in it. |
--timeout | 20 (server: 120) | Seconds the probe waits for each answer before logging a timeout. |
--bin id=path | PATH lookup | Use a specific binary. Repeat for each client. |
--answer | esc | TUI only. esc dismisses the question once it is visible; none leaves it open until the timeout. |
--json / --markdown | text | Output format. Progress still goes to stderr when it is a terminal. |
--strict | off | Exit 1 if any client got a bad verdict (see below). |
--keep | off | Keep the run directory in ./.askwire-<time>/: generated configs, the probe log and the captured screens. |
--no-color | auto | Plain text. NO_COLOR=1 does the same; FORCE_COLOR=1 forces color into a pipe. |
What askwire does to your machine
Each client runs with its own temporary home directory (HOME, CODEX_HOME, XDG dirs) and a generated config that points it at 127.0.0.1. Your real ~/.claude, ~/.codex, ~/.gemini and opencode settings are not read or written. The stand-in model only calls the probe tools; it never asks for shell or file tools. The run directory is deleted afterwards unless you pass --keep or the run failed. One exception: opencode downloads its provider package on first use, and askwire keeps that cache in ~/.cache/askwire/opencode so later runs are fast. Delete it whenever you like.
4Reference
Outcomes per scenario
| outcome | meaning |
|---|---|
answered | The client replied with accept, decline or cancel, after ms. |
error | The client replied with a JSON-RPC error, for example -32601 Method not found. |
timeout | No reply within --timeout (--wait for the timeout scenario). limitMs is the bound that applied. No answer is ever filled in for the client. |
abandoned | The client cancelled the tool call while its question was still open (the server saw the abort signal), after ms. |
not-advertised | The client did not advertise this mode at initialize, so the probe did not send it. |
not-needed | The unadvertised probe is skipped for clients that do advertise elicitation. |
not-reached | The stand-in model never got to call that tool. Usually the client crashed or refused the tool; the problem line says why. |
Client verdicts
| verdict | when |
|---|---|
| CLAIMS SUPPORT · ANSWERS WITHOUT A HUMAN | Advertises elicitation, and answered a question that was never on a screen (every headless answer; a TUI answer whose nonce never appeared). |
| QUESTION NEVER ANSWERED | A probe timed out with no proof anyone could see it (headless, or the nonce never appeared). |
| GIVES UP · CANCELS THE TOOL CALL | The client cancelled the tool call while a question was open. |
| ADVERTISED BUT ERRORS | Advertised a mode, then returned an error for it. |
| SHOWN ON SCREEN | TUI run: every advertised question was drawn on the terminal, and each answer followed askwire pressing Esc. |
| SHOWN ON SCREEN · WAITS FOR A PERSON | The same, and the untouched question stayed unanswered until the probe gave up. A TUI answer nobody pressed a key for counts as answering without a human. |
| NO SUPPORT · SAYS SO | Does not advertise elicitation and rejects an unadvertised request cleanly. |
| INCOMPLETE / COULD NOT RUN | Something stopped the run; the problem line (and the kept screens with --keep) tell you what. |
JSON
{
"askwire": "0.1.0",
"probe": "AW-4FJ7",
"when": "2026-10-25 10:39 UTC+08:00",
"runs": [{
"client": "codex", "version": "0.164.0", "mode": "tui",
"command": "codex (interactive)",
"advertised": { "form": true, "url": true, "raw": { "elicitation": { "form": {}, "url": {} } } },
"results": [
{ "scenario": "url",
"outcome": { "kind": "answered", "action": "decline", "ms": 2114 },
"seen": true, "seenAfterMs": 229, "escPressed": true }
]
}]
}
seen, seenAfterMs and escPressed only appear in TUI runs. stillOnScreen appears on an unanswered TUI question: was it still drawn 10 s after the probe gave up. A timeout result looks like { "scenario": "timeout", "outcome": { "kind": "timeout", "ms": 60014, "limitMs": 60000 }, "seen": true, "seenAfterMs": 120, "escPressed": false, "stillOnScreen": false }. problem appears on a run that could not complete; logDir when its files were kept.
Exit codes
0 | The probe ran and a report was printed (whatever the verdicts, unless --strict). |
1 | --strict and at least one bad verdict. |
2 | Usage error, no supported client found, or askwire itself failed. |
5FAQ
Is it a bug that headless clients answer by themselves?
Not necessarily: with no terminal there is nobody to ask, and answering quickly beats hanging. The problem is for your server. The client still advertised elicitation at initialize, and the answer it returns (cancel from Claude Code, decline from Codex) is indistinguishable from what a person would send. Your server cannot tell "the user said no" from "there was no user".
Why does it matter whether I get decline or cancel?
The spec gives them different meanings: decline means the user explicitly refused, cancel means they dismissed the prompt without choosing. A server might reasonably retry after a cancel and stop after a decline. In our runs, Codex returned decline when Esc dismissed its URL prompt, and also in headless mode where nobody was there. Treat both as "do not proceed" and do not build retry logic on the difference.
What happens if nobody answers the question?
In our runs, nothing. Claude Code 2.1.310 to 2.1.312 and Codex 0.164.0 and 0.165.0 drew the question in their TUIs within about 200 ms, then kept it open for the full 60 s without answering; neither cancelled the tool call. Only the probe's own timeout ended it (the TypeScript SDK then sends notifications/cancelled). Codex took the stale question down every time. Claude Code took it down when other questions came before it in the same turn and left it on screen when it was the only one. Headless, the same question was answered at once (cancel in 2 ms, decline in 1 ms). So pass a timeout to elicitInput, treat it as no, and make sure an answer that arrives late cannot do anything. Measure your own clients with askwire --tui --wait 60.
Does askwire use my API key or send anything to a model provider?
No. Each client talks to a stand-in endpoint on 127.0.0.1 that speaks just enough of the Anthropic Messages, OpenAI Responses, Chat Completions and Gemini formats to call the probe tools. No tokens are spent and nothing leaves the machine. (The clients themselves may still try their own update checks or telemetry.)
Can a client accept an elicitation without a person?
Yes. Claude Code's Elicitation hook can return an answer, including accept with content, before anything is shown; in our test it did so in about 20 ms. That is a feature for automation, and it is why your server should log accepted answers, not assume a person typed them.
Why is my client missing?
askwire drives Claude Code, Codex CLI, opencode and Gemini CLI, because each can be pointed at a local model and run both headless and as a TUI. Cursor, VS Code, Copilot CLI and others are on the roadmap. If a client can be scripted, open an issue.
The TUI run says the question never appeared.
Run again with --keep and look at screen-*.txt in the run directory: it is the exact terminal text askwire saw. Common causes are a first-run dialog the adapter does not know yet (new client versions add them) and a very slow machine; try --timeout 60.
How fresh are the numbers on the homepage?
They come from runs on 2026-10-25 to 2026-10-28 with Claude Code 2.1.310 to 2.1.312, Codex CLI 0.164.0 and 0.165.0, opencode 1.19.4 and 1.19.5, and Gemini CLI 0.65.0, reproduced on a GitHub Actions runner. A daily CI job installs the latest releases and runs askwire again, headless, --tui and the untouched question at 30 s, with the reports in the job summary.