Scenario: an agent's MCP client looks up an order for a help-desk case at the fictional Belgavi's Book Store while the server asks it a question with the same request id. Synthetic inputs; every calculation stays in this page and nothing is sent anywhere.
Experiment workspace
Decision trace
What this lab models
A client and an MCP server both send JSON-RPC requests over Streamable HTTP. Each side numbers its own requests, so both may use the same id. The client has a pending tools/call for a help-desk case at the fictional Belgavi's Book Store when the server sends its own request, the client POSTs a reply, and the server answers that POST. The lab follows each message and shows which pending request it resolves under three client rules: naive dispatch by id, the strict acknowledgement rule that openai/codex pull request 63075 added on 22 November 2026, and maps keyed by direction. Everything runs in this page.
How to experiment
Start with the defaults: both ids 7, HTTP 409 with an error body that copies the reply id, naive rule. The client resolves its own request with the error about its reply and then drops the real result. Switch the rule to strict or direction-keyed: the reply POST fails as a transport error and the request receives its result. Return to naive and change the server id to 8, or set the error body to have no id: the collision disappears. Try 202 and 204. Finally choose protocol 2026-07-28, which has no client reply POSTs at all.
Expected outcomes to check
Naive with equal ids and 409 JSON, 200 JSON or 200 SSE: resolved with the wrong message, real result dropped. Strict or direction-keyed with any non-acknowledgement: the request receives its own result. 202 and 204: acknowledged under every rule. Different ids, or an error with no id: no collision even for the naive client. Protocol 2026-07-28: no reply POST. The companion Python example prints the same outcomes.
Trace, reset and export
The decision trace lists the setup with every control, each message in order, how the client dispatched it, and the outcome. Start trace hides every step, Next step reveals one, Show all restores the list and the slider selects how many are visible; none of these change the result. Reset inputs restores the defaults. Export JSON saves the inputs, the outcome and the trace.
Limits
A model of correlation logic with synthetic messages, not an MCP SDK, client or server, and no network traffic. It covers one pending request and one server request. Real clients also handle authentication challenges, session ids, cancellation and reconnection, which are not modelled.
Original lab by Sandeep Belgavi. Views are my own and do not represent any employer, past or present.