docs(mcp): what a shared transport does to the call-deadline limit

One property and one consequence, in the two places that own them.

`docs/CONTRACT-mcp.md` §1 gains the operational fact an operator meets
first: tool calls are serialised across every caller, not per session, so
two agents on two tokens queue behind each other.

`docs/TODO/mcp-in-process-has-no-call-deadline.md` gains why that matters
for the limit it already describes. The serialisation is not new -- it is
the same process-wide lock -- but over stdio a call only ever queued
behind the same client's previous call. One process for everyone means a
stuck call delays other people's agents, and whoever notices is not
necessarily whoever caused it. That makes the reachable-timeout idea
worth more than it was and the forked-child idea less unreasonable.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KchcvnbfhhZhUHy83YL3Ya
This commit is contained in:
HermenixandClaude Opus 5 committed 2026-10-11 22:44:53 +00:00
1 parent c32a2dd2ce
commit d788d5723e
2 files changed
+17

No files matched your search

+7
View File
@@ -136,6 +136,13 @@ fails the test if it is reached.
makes binding every interface the one case where the hostnames must be named.
* **No TLS.** The token crosses the wire in clear text. Loopback is the
default; anything else wants a reverse proxy and says so in a module warning.
* **Tool calls are serialised across every caller**, not per session. The
`Runner` holds a process-wide lock because the CLI it calls prints to a
stdout this process shares — invisible while each client had a process of its
own, visible now that one process serves many. Two agents on two tokens queue
behind each other, and a slow call delays everyone's next one rather than
only its own caller's. Latency, never a hang: the event loop answers a `ping`
throughout. See `docs/TODO/mcp-in-process-has-no-call-deadline.md`.
## 2. Configuration
@@ -65,3 +65,13 @@ and not high.
(1) is latent. It becomes real the first time a compositor stops answering while
an agent is driving it: the agent's next tool call waits behind the stuck one
with no way to give up, where a CLI user would have pressed ctrl-C.
**The HTTP transport widens (1) without changing it.** The serialisation was
always there — `Runner` holds a process-wide lock because the CLI prints to a
shared stdout — but over stdio each client had a process of its own, so a call
only ever queued behind that same client's previous call. `mcp.http.enable`
puts every caller in one process, so a stuck call now delays *other people's*
agents too, and the one of them who can see something is wrong is not
necessarily the one who caused it. That makes idea 1 (a reachable
frame-socket timeout) worth more than it was, and idea 2 (a forked child per
call) less unreasonable than it was.