Agents Window: stream cut right after turnEnded → finished turns auto-resumed (extra requests), answer lost after restart

Where does the bug appear (feature/product)?

Grok Build (formerly Cursor)

Describe the Bug

Since the update to Grok Build (Dec 1) the model keeps being called again and again, and connections drop. Everything below comes from my local logs (%USERPROFILE%\.grok\agent-host-daemon\daemon.log and molten.log; one Windows machine, local agent turns, 2026-12-01 06:26Z → 2026-12-04 07:51Z, all times UTC). I left out project/chat names, chat contents, paths and account data.

Summary

  • 22 of 42 finished turns (52%) were hit by a dropped connection. Each time the client silently starts a resumeAction with a new request ID: 33 of 75 model requests (44%) in my log are automatic resumes.
  • In most cases the model had already finished: the stream is closed 0.14–0.49 s after interactionUpdate:turnEnded, before the final conversationCheckpointUpdate, and the finished turn is re-run.
  • Of the 22 hit turns: 17 completed after 1–3 resumes, 3 ended with “Agent stopped retrying”, and in 2 I stopped the agent manually while a resume was re-generating an answer that was already complete.
  • Today (Dec 4, 3.33.17) one turn needed 3 attempts: drop mid-stream → resume → cut right after turnEnded → another resume re-generating the answer I had already received (I stopped it). After I restarted the app the answer was gone from the chat. The full answer text is still in the local session store, but nothing references it any more (section 3).
  • I can’t go back to the previous agent window: there is no button and no switcher for it in my UI, so the old window is not a workaround for me.

1. Mechanism (from daemon.log)

Signature A – cut after turnEnded (dominant: 24 retried attempts + 3 that ended a turn):

  1. The server finishes the turn: a few kvServerMessage ↔ kvClientMessage:setBlobResult pairs, then interactionUpdate:turnEnded.
  2. A healthy ending continues with conversationCheckpointUpdate, and the stream is closed right after it.
  3. In the failing case the stream dies 144–490 ms (median 236 ms) after turnEnded, before the final checkpoint: ConnectError: [unknown] Premature close (ERR_STREAM_PREMATURE_CLOSE, connectCode: Unknown, transportFailureKind: "socket_reset"). Heartbeats had been exchanged in both directions within the previous 10 s, and nothing was aborted locally (abortOrigin: "none", stallAborted: false, abortSources: []).
  4. The client classifies this as a transport failure (decision=RETRY (countAsServerError=false, countAsTransportError=true)) and starts a resumeAction with a new requestId, which re-runs the last step on the whole conversation.
  5. The resume often fails the same way (3 turns needed 4 attempts). After two resumes without a checkpoint the client gives up (Resume attempts are streaming but not producing checkpoints; stopping automatic resume) and the UI shows “Agent stopped retrying”.

The bundled client has a guard for exactly this case (Ignoring transport close after terminal agent stream), but as far as I can tell from the code it only applies if a checkpoint arrived after turnEnded. Here the close comes first. The guard is hit all the time in “good” turns: 27 of 37 successful attempts logged the same Premature close right after the final checkpoint and ignored it. So the stream seems to be closed uncleanly at the end of most responses, and a turn only survives if the checkpoint wins the race.

Signature B – drop mid-stream (9 attempts, before turnEnded): Stream ended without turnEnded — connection likely dropped mid-stream. In 4 of them the last server frame was a heartbeat 9.0–12.7 s earlier, i.e. the connection had gone silent before it was reset.

How it looks in the chat: in the transcript export a resume shows up as an injected user message, Your previous response was interrupted. Continue from where you left off. (the timestamps match the resumed turns in the log). I have 4 such cases in one chat on Dec 1–2, 3 of them right after a complete answer; the model then repeats the answer, says the previous one was already complete, or just continues.

2. Numbers (as of 2026-12-04 07:51Z, one machine)

daemon build turns turns hit extra (resume) attempts
3.32.24 29 14 18
3.32.25 10 6 12
3.33.17 3 2 3
total 42 22 33
  • 42 turns = 26 of my prompts + 16 background-task completion notifications.
  • 17 turns had at least one cut after turnEnded; 7 had at least one mid-stream drop (2 had both).
  • Attempts per hit turn: 2 attempts in 14 turns, 3 in 5 turns, 4 in 3 turns.
  • Of all attempts that reached the end of a turn (turnEnded or a checkpoint as the last frame), 27 of 65 (about 40%) were cut before the final checkpoint.
  • Not tied to chat size: hit chats include small fresh ones (session store 3.6–16 MB) and a 433 MB one (at least 7 different chats).
  • Not tied to turn length: a ~5 min turn (including resumes) was hit, clean turns of up to ~25 min exist.
  • Usage example (usage export, kind “Included”): one answer on Dec 2 at 13:32Z = 4 attempts = 4 usage rows (967,877 + 825,112 + 158,399 + 1,434,850 = 3,386,238 total tokens); the first three attempts were cut after turnEnded.
  • Dec 1 07:18–07:19Z: 3 turns failed instantly with [permission_denied] HTTP 403 (NonRetriableError); not counted above.

3. Today’s incident (Dec 4, build 3.33.17)

Timeline (UTC), model claude-sonnet-5-5, one agent turn of 16.5 min in total:

  • 06:24:19 – turn starts (request 9428c82a…).
  • Attempt 0 is dropped mid-stream while streaming thinking/answer (Premature close, last server heartbeat 8.9 s earlier) → RETRY.
  • Attempt 1 (572fa1c6…, resumeAction): the model finishes and the complete answer appears in the chat; turnEnded arrives and the stream is cut 413 ms later → RETRY.
  • Attempt 2 (72c60597…, resumeAction) starts re-generating the answer I had already received. I stopped it at 06:40:48 (cancelAction, abortOrigin: "owner", retryStopReason: "user_cancelled", agent.turn.outcome = cancelled).
  • ~07:12 (and again ~07:16) I restarted the app. The answer is no longer shown in the chat; the first attach after the second restart logged ConnectError: [not_found] Agent host session not found for this chat (07:16:43).

What the local session store shows (my interpretation): the chat’s session.sqlite still contains the complete final assistant message of attempt 1 (reasoning + ~12k characters of answer) as a blob, but no turn/root structure references it. The newest turn structures, written after attempt 2 started, end with a short reasoning-only step from attempt 2. So the answer I had read was never checkpointed (cut before the final checkpoint), and the resumed-then-cancelled attempt replaced the tail of the persisted conversation. Nothing was deleted; the answer is just unreachable from the chat.

Other lines that may be related (molten.log, Dec 1–4): view reset … reason="tail out of order" in the middle of that turn (06:30:57) and 51 such resets in total; 20 × [not_found] Agent host session not found; 7 × cloud updates stream ended: protocol error: missing EndStreamResponse. At 07:15:10 the Agents Window replaced the running daemon (replacing daemon; the new one is started with --http-compatibility http1.1), and all open streams ended with write EPIPE. FYI: agent.turn.outcome of that turn reports served_runtime: "agent_host", route_reason: "managed-local-unavailable".

4. Still happening on 3.33.17, also with HTTP/1.1

All incidents above happened with the default transport (the daemon had no --http-compatibility flag until 07:15 today); since then it runs with --http-compatibility http1.1. A turn I started at 07:22 was dropped again at about 07:39, this time as connectCause.code: "ECONNRESET" (connectCode: Aborted, transportFailureKind: "socket_reset", abortOrigin: "none"), 3.2 s after the last server heartbeat, and was resumed with a new request ID (the resume completed). One data point so far, but HTTP/1.1 does not avoid the drop.

3.33.17 adds …SinceProgress retry counters and retryStopReason values, but the end-of-turn handling looks unchanged: a cut after turnEnded still leads to a resume.

5. What I ruled out

  • App-level proxy: same pattern with an HTTP proxy configured in the app (Dec 1–2) and with none (Dec 3–4).
  • Network path: I connect through a self-managed VPN tunnel, so I can’t exclude the network path completely. Not tested: a different network/ISP.
  • Local store: all 44 Turn terminal blob reads lines show errors: 0, misses: 0.
  • Local aborts: abortOrigin: "none" and stallAborted: false in every cut attempt.
  • The “Import Older Local Agents” loop from #179777 does not apply: my import finished on Dec 1 (126 of 126 imported, 0 failed) and is not looping.
  • The Agents Window preference autoContinueInterruptedAgents is false; the resumes come from the transport-retry path ([nal_agent_retries], actionCase: resumeAction).

6. No way back to the previous agent window

There is no button and no switcher/toggle for it in my UI. Staff wrote in #179870 and #179935 that there is no setting that returns accounts moved by the rollout to the previous window, so the old window is not an option for me while this bug exists.

Steps to Reproduce

Not deterministic; on my machine it happens in roughly every second turn.

  1. Agents Window, local agent, model claude-sonnet-5-5.
  2. Send a prompt that keeps the agent working for several minutes (tool calls, shell, file edits).
  3. Watch daemon.log for [AGENT_ERROR_DIAGNOSTICS] and Retrying attempt N … resumeAction, and the Usage page for extra rows per answer.

Expected Behavior

  • If turnEnded was received and all KV blobs were acknowledged, don’t re-run the turn: treat it as complete, or only re-request the final checkpoint. A finished turn must not end with “Agent stopped retrying”.
  • An answer that has been displayed must survive Stop and an app restart; a cancelled resume must not replace the persisted conversation tail.
  • Please don’t count the resume attempts caused by this against my usage, and restore the ones already counted.
  • Provide a way back to the previous agent window.

Operating System

Windows 10/11

Version Information

Version: 3.33.17 (user setup)
VS Code Extension API: 1.147.0
Commit: b4e9523beb0e43cb5d43c9f131b378ae54351870
Date: 2026-12-03T09:17:28.741Z
Layout: Agent Window (Molten)
Build Type: Stable
Release Track: Default
Electron: 43.8.9
Chromium: 150.0.7871.250
Node.js: 24.22.1
V8: 15.0.245.31-electron.0
xterm.js: 6.1.0-beta.291
OS: Windows_NT x64 10.0.26300

Agent-host daemon builds seen in daemon.log: 3.33.17 (commit b4e9523beb0e43cb5d43c9f131b378ae54351879, cut 2026-12-03T09:12:16Z), 3.32.25 (d3b7354f6e7809088c6623719f50cfbdf33a048f), 3.32.24 (35373c21b6adbc9abeeaff77fdc78e2c008ba8a2).

For AI issues: which model did you use?

claude-sonnet-5-5

For AI issues: add Request ID with privacy disabled

Privacy Mode is off on my account.

Today’s incident (Dec 4, three attempts of one turn):

  • 9428c82a-992a-4663-bb18-cd88037de461 – attempt 0, dropped mid-stream
  • 572fa1c6-284e-45ec-9e38-a101c3be7bc9 – attempt 1 (resumeAction), cut 413 ms after turnEnded
  • 72c60597-f32e-49ff-b3ae-9920b68f7e62 – attempt 2 (resumeAction), stopped by me

Same kind of drop with --http-compatibility http1.1 (Dec 4, ~07:39): d266de1f-f14d-400b-a575-cf61cfae98a8 (the resume that completed it: 07178066-8ea6-41cc-b82d-b68e4885acdc)

All hit turns: original request ID, start (UTC), attempts, result

end = cut after turnEnded, mid = dropped mid-stream, stopped = “Agent stopped retrying”, bg = background-task completion notification. Resumes share originalRequestId.

a06db776-f454-4140-b014-b28d507d868a  12-01 06:39  2  mid>ok
dd8610a0-3658-4419-8b6c-a1ddf5d87cc0  12-01 12:21  2  end>ok
62cd9d01-2044-4633-a036-b3d570117869  12-01 12:37  2  end>ok  (bg)
2ddb64ff-a664-495e-b1b3-ca2b0f213554  12-01 12:59  4  mid>mid>mid>ok
cea2e226-461d-4b4f-b19f-9b1671024e57  12-01 15:51  2  end>ok  (bg)
c850b6c8-0387-4516-af8d-bb32fc92d730  12-01 15:52  2  end>ok  (bg)
4edc29a0-b15e-41f5-863f-b1f436f42a5c  12-02 08:46  2  end>ok
267ddec4-6776-4b31-8d4d-7cbdac49eac6  12-02 09:34  3  end>end>ok  (bg)
4d6ae98d-3b79-4246-8028-b7fa1eb71894  12-02 09:52  2  end>ok
00b21b5f-4cc6-4c8e-b71f-15d97c58203c  12-02 10:24  2  end>ok
5607df61-3bc7-4b1f-aa0d-c314165800f8  12-02 11:30  2  end>ok
f4c8eaaf-1156-47e0-be26-5367594d429c  12-02 11:44  2  end>ok
6a01e064-5f2a-49c6-a771-4e9b07b9cf7f  12-02 11:47  2  mid>ok
b6251e6a-7e16-469d-b599-599bac0a5240  12-02 12:02  3  end>end>ok  (bg)
ae6d03c6-eeff-4c63-88f1-55b25ea5bf50  12-02 13:32  4  end>end>end>ok  (4 usage rows)
a2fd7cd5-7c40-4f5c-a57d-1922ec41a5d3  12-02 13:51  3  end>end>stopped
f29ac678-81f0-4ba3-87d6-f14a2da6f1f3  12-02 20:37  4  mid>end>end>stopped
694c9b5f-a2ff-4102-b0dc-de1a31b6afd1  12-03 06:31  2  end>stopped by me
c7c5c7e4-f332-401e-a97c-ddfc191c2be8  12-03 06:49  3  end>end>stopped
9c9e968e-1fb4-4596-bec9-a218e7e0b7a7  12-03 10:34  2  mid>ok
9428c82a-992a-4663-bb18-cd88037de461  12-04 06:24  3  mid>end>stopped by me
d266de1f-f14d-400b-a575-cf61cfae98a8  12-04 07:22  2  mid>ok  (HTTP/1.1, ECONNRESET)

Instant HTTP 403 (not counted):
d9ceed66-ea19-4c9b-8fb8-c1e15acbb156  12-01 07:18
9597db8d-687f-42b7-ad16-924474182013  12-01 07:18
ac083e41-7394-4350-be9e-f2516fb22db6  12-01 07:19

Additional Information

Questions

  1. Is this known, and is a fix in progress? The stream is closed ~0.2 s after turnEnded in about 40% of the attempts that reach the end of a turn – is that happening on the server/edge side?
  2. Can the duplicated requests be refunded? The request IDs are in the field above.
  3. Is there a setting to disable the automatic resume (enableAgentRetries is true in the diagnostics)? Is HTTP/1.1 compatibility mode recommended as a workaround?
  4. Will a way back to the previous agent window be offered?

Related topics

Log excerpts (abridged)
# A. cut after turnEnded (Dec 4, attempt 1)
[NAL client stall detector] Stream stall detector disposed {"reqId":"572fa1c6-…","stall":{"duration_ms":412.9,"last_server_sent_heartbeat_ago_ms":2641.7,"last_inbound_message_type":"interactionUpdate:turnEnded","last_outbound_message_type":"kvClientMessage:setBlobResult",…}}
[AGENT_ERROR_DIAGNOSTICS] requestId=572fa1c6-… originalRequestId=9428c82a-… decision=RETRY (countAsServerError=false, countAsTransportError=true) {"attempt":1,"transportFailureKind":"socket_reset","stallAborted":false,"abortOrigin":"none","errorName":"ConnectError","connectCause":{"code":"ERR_STREAM_PREMATURE_CLOSE"},"abortSources":[],"connectCode":"Unknown",…}
[nal_agent_retries] Retrying attempt 2 {"attempt":2,"actionCase":"resumeAction","requestId":"72c60597-…","originalRequestId":"9428c82a-…"}

# B. drop mid-stream (Dec 4, attempt 0)
Stream ended without turnEnded — connection likely dropped mid-stream … {"caughtError":"ConnectError: [unknown] Premature close"}
… "last_server_sent_heartbeat_ago_ms":8873.8,"last_inbound_message_type":"interactionUpdate:tokenDelta" …

# C. the resume stopped by me (Dec 4, attempt 2)
[AGENT_ERROR_DIAGNOSTICS] … decision=THROW CancelledError {… "retryStopReason":"user_cancelled","abortOrigin":"owner","abortSources":["conversation_action_abort"]}

# D. same drop with --http-compatibility http1.1 (Dec 4, ~07:39)
Stream ended without turnEnded — connection likely dropped mid-stream; retrying caught [aborted] aborted error
[AGENT_ERROR_DIAGNOSTICS] … decision=RETRY (countAsServerError=false, countAsTransportError=true) {"transportFailureKind":"socket_reset","abortOrigin":"none","errorName":"RetriableError","connectCause":{"code":"ECONNRESET"},"connectCode":"Aborted",…}

Does this stop you from using Grok

Sometimes - I can sometimes use Grok

Hi there,

Cursor isn’t offered in every region. Availability of the Service is governed by our Terms of Service and Acceptable Use Policy, and we monitor and enforce those on an ongoing basis. What you’re seeing may reflect the current availability for your account and location.

For questions about your account or subscription, please email [email protected].

Additionally, questions about whether duplicated resume requests can be refunded or restored against usage aren’t something the forum can handle. Please include that billing question in the same email. If you’re wondering how refunds work — eligibility, subscription proration, renewal charges, or on-demand charges — our refund policy is the up-to-date reference and covers the most common questions.