2c4e76dbba06f306ee6ecbcf5cc21b97901cec91
7
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
4f3eddc256 |
cursor 0.2.40: a new user turn whose old native calls are all answered gets a retained Run (#672)
A new user turn whose earlier native calls (call_cursor_…) all have tool results now gets a retained Run of its own, with those calls imported as history the way the stateless path imports them. Any call still pending, a request ending in tool results with no live owner, or a tool attachment last still falls back as before; the owner-busy check is unchanged. Nothing is submitted to an old exec: a user message last has no trailing handles. By ooboqoo (#672). Run at the reviewed head 5b4dcf1 on mote: - packages/cursor `bun test`: 394 pass, 0 fail - `bun scripts/check.mjs`: ok Broken by hand: with origin/main's native-session.mjs and the PR's tests, "terminal old handles do not wedge a new user turn" and the new admission test both fail (2 fail, 168 pass in those two files). Not tried: a real Cursor account (the author reports ~270 requests over a day, all 200 or client-cancelled 499); Cursor dashboard usage or caching. |
||
|
|
1a5b184991 |
cursor 0.2.34: the quiet error names its checkpoint; an opt-in Wire trace saves a failed Run's frames (#550)
Windsland52 (#550, 0.2.33, cursor/grok-4.6 at xhigh): four Runs ended
"Cursor went quiet: 24 heartbeats and nothing else for 240 s, its last
message checkpoint". They asked for the checkpoint to be named, and for a
way to see what Cursor sends after it. No change to quiet's budget or to
retry, as asked.
The quiet error now says, for a checkpoint: its number in the Run, which
of its step's checkpoints it was (native path; the stateless path doesn't
count steps), how many came in a row, and the kinds before it, e.g.
"its last message checkpoint #1 of the Run, the first of step 1, after
blob request x2, thinking". Other kinds read as before.
Wire trace is a new plugin option (wire_trace), off by default. With it
on, a Run that fails (not one the caller cancels), native or stateless,
writes <magpie's folder>/cursor-traces/<start>-<rand>.json (temp and
rename, mode 600, newest 20 kept). It holds both directions' frames as
time, size, kind, top-level field numbers with wire type and size, and
the field numbers and sizes one level inside: the shape, never the bytes.
No text, thinking, tool name or argument, blob or blob id, checkpoint
content, token, header, account or conversation id is read into it. The
error message is scrubbed of email-, uuid-, auth-id- and token-shaped
strings. It also has quiet's counters, the model id and plugin version.
The first 2000 and last 3000 frames are kept, the rest counted. The
folder comes from input.directory, which magpie sets to its config
folder. The option exists only in magpie, so OpenCode's project folder is
never written to.
Run on mote at this tree (
|
||
|
|
f0bd94c4e2 |
cursor 0.2.22: a heartbeat keeps a counted tool batch open, and its failure says how much came (#377)
Okxdd123's grok-4.7 step counted its batch, thought, then wrote one long call for over 30 s with only heartbeats, and failed as "Cursor did not complete its declared native tool batch". batchWait was reset by a call, answered call, count or text, never a heartbeat, so a single long call's arguments could not outlast it. A heartbeat (InteractionUpdate 13) now resets it while the batch is open; silence stays bounded by idle (60 s) and a heartbeat-only stretch by quiet (240 s), as #2672 set. The failure now reads "N of M calls came, K answered here, none since X ms", the counts the report asked for. Not changed: the issue's third ask, a stateless rebuild for this failure. A streamed reply has already shown its reasoning by then, and the rebuild only runs before output is exposed. Run: the two new native-session tests and the updated #155 test are red on the old code (3 fail) and green after; bun test packages/cursor 291 pass in a sandbox HOME; bun scripts/check.mjs ok. Not tried live: it needs a real Cursor step writing one call for over 30 s. |
||
|
|
cf1873e292 |
cursor 0.2.21: a Run Cursor stops answering ends, retained or stateless (yetone/magpie#2672) (#364)
A Run Cursor stops answering mid-turn now ends with a 502 that says so,
on both the stateless path (runOnce/decode) and the retained path
(NativeSession.pump), instead of holding the reply open until the agent
gives up (yetone/magpie#2672: two composer-2.5 turns waited 305 s).
Quiet wraps a Run's frames: 60 s with no message at all, or 240 s with
only Cursor's heartbeats (InteractionUpdate.heartbeat), ends it. Only
time spent waiting on Cursor's next frame counts; a retained Run parked
for the caller's tool results is paused (resultWait bounds it) and
resumes from nothing after the submit. Each frame gets a fresh wake
promise, so frames already passed on are not held for the stream's life
(review of cbd5d3b). cursor 0.2.20 -> 0.2.21.
Run at the reviewed head 6a17d61 (base 79e383c; main
|
||
|
|
c7c6498d85 |
cursor: a multi-step turn's last step reports its own share of usage, and a step's calls get batchWait from the latest one (#156 erzay, #155 midmirror)
#156: a native Run of N tool steps ended with TurnEndedUpdate's totals as the final step's prompt_tokens (1,105,934 on erzay's ~21-step turn, where the real context was ~61K), and Codex compacted at once. The final step now keeps its last model call's share, max(that call's chars/4 prompt estimate, turn total / model calls), split proportionally across input, cache read and cache write; the rest goes into usage.magpie_deferred (merged with any settled stateless debt), so magpie still bills the whole turn. On erzay's numbers that is ~52.7K reported, ~1.05M deferred. #155: waitForBatch armed once, at a step's first call, so a step whose calls arrive one by one as the model writes them (13 calls, 9 long-arg) failed 502 "did not complete its declared native tool batch" ~30s after the first call even though it never paused that long. The deadline now restarts on every call, answered call, count and text/reasoning frame. Run at this commit: packages/cursor `bun test` (isolated HOME) 266 pass, 0 fail, three times; `bun scripts/check.mjs` ok. The three new tests fail on 4e64f26's source (prompt 1105934; sealed step failed at 300ms; stall failed 303ms after the first call instead of after the latest). |
||
|
|
1bf9113390 |
cursor: calls the bridge answers itself count toward Cursor's tool count, and KV replies wait for a slow link instead of failing the Run (#142, Evopower)
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
|
||
|
|
33cdf7c1a8 |
cursor: Run tool calls stay on one native Cursor session and resume stateless after a long tool, not a failed turn (#135, nicegui)
Cursor's Run (native) calls stay on one Cursor session across a tool result. With them, a tool that runs longer than Cursor's limit resumes stateless, not as a failed turn. The session pool lives in native-session.mjs. It applies to a conversation's first user turn, and a new user turn goes stateless (see the README). X-Magpie-Cursor-Continuity says which path a request took.
The dashboard-usage ledger counts two distinct events in one response that share a millisecond, as main did. Only timestamps claimed by earlier fetches are left out. A new deferred-usage test covers it.
Run at the reviewed head 398aeddc0186cfc38189b1f05577b181aa2d587d (merge base 5d5d86e; main has no packages/cursor change since):
- packages/cursor `bun test` 3 times: 258 pass, 0 fail each time.
- `bun test latency` 12 times with fresh HOMEs: 12/12 pass.
- Broken by hand: putting back `if (claimed.has(key + "\0" + ev.timestamp) || at >= before()) continue` makes the new test "distinct same-millisecond events in one response are billed together, not again on later fetches" fail (2 pass, 1 fail). The head's line passes.
- `bun scripts/check.mjs`: all packages pass.
- `npm pack`, extracted into a fresh dir: index.mjs, native-session.mjs, package.json, README.md. `import("./index.mjs")` exports CursorAuthPlugin and _internal, and native-session.mjs imports.
- CI: test and on-npm green.
Not tried: a real Cursor account. The owner's stored plugin sign-in has no access token. The author reports a real Claude Code run through an isolated gateway: a child resumed stateless after a 125s tool, and all 6 requests returned 200.
|