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.