Files
magpie/docs
yetone 9d4a4bfd3f gateway: a late Claude Code call tells the client after 500ms, not 1s
In Claude Code's interactive mode a call of a client's tool waits callFirst
for its message in the transcript before the call tells the client itself.
Measured on a real account (a probe build logging the time from the MCP call
to the transcript's tool_use), a message written before its call was read
118 to 162ms after the call came in, 8 calls of 8. 500ms leaves it room and
halves what a late message costs.

Run: go test -race -count=3 -run 'TestClaudeTUI|TestSubscription'
./internal/gateway on mote, ok. Real account (claude-haiku-5-5, sandbox
HOME, interactive TUI): 9 runs of the one/two/text scenarios, all ok, every
call told once with its own id; 1 took the late path, none fell back to -p.
Not tried: sonnet/opus, Linux.
2026-10-31 04:35:16 +08:00
..