Cursor's tool_requests_listed (InteractionUpdate 27) counts every call of
the model's step, and is sent after them. That count includes calls the
plugin answers itself: a tool the request doesn't have (0.2.14's native
path refuses those) and Cursor's get_mcp_tools (exec 36). 0.2.14 counted
only the calls it accepted. A step with a refused call then either waited
30s for a call that never came (502 "did not complete its declared native
tool batch") or met the next step's count with the stale one (502
"inconsistent native tool count", the reporter's error). The stateless
decoder had the same miscount and hung. Both paths now count answered
calls toward the step and end a step whose calls were all answered without
one.
503 "native outbound messages limit reached": a long history goes out as
one blob per message, and Cursor asks for every blob at once. The native
transport caps its pending writes at 256 messages / 16 MiB and failed the
Run when a slow link backed them up past that. KV replies now wait for
room (NATIVE_LIMITS.writeWait, 30s) and fail only if the link doesn't
drain for that long. The stateless path writes directly and has no cap.
The fixtures are real Cursor frames captured on 2026-10-15 (model auto,
cursor-agent's agent.v1): get_mcp_tools plus a refused WebSearch in one
step followed by read_file, which gave 0.2.14 the reporter's exact
"inconsistent native tool count"; and read_file, refused WebSearch,
read_file under a count of 3, which gave 0.2.14 the batch timeout.
Run at this commit (on origin/main 43d93b0):
- packages/cursor `bun test` (isolated HOME): 263 pass, 0 fail.
- `bun scripts/check.mjs`: every package ok.
- Broken by hand: with native-session.mjs and index.mjs reverted to
0.2.14, the new tests fail with "inconsistent native tool count",
"native outbound messages limit reached", the batch wait, and the
stateless decoder's hang; 4 of 5 red (the stateless mixed case passes
on 0.2.14, which hands WebSearch to the caller there).
- Real Cursor, before the fix: the captures above reproduced both 502s
through the plugin's native path. The 503 was not reproduced on a real
link (my queue peaked at 160 of 256); it is reproduced in the test with
a 16-message bound and a slow fake write.
- Real Cursor, after the fix (owner's account, model auto, the mixed
prompt): native path 3 of 3 runs 200 with read_file a.txt and b.txt
(WebSearch refused to the model), stateless 3 of 3 runs 200; a native
Run with 1200 history messages 200.
- Not proven: the reporter's empty replies. They are likely the turns
after these failures and are not addressed separately.