A Cursor request stopped before its first checkpoint is lost once the session closes
What happened
The user presses Stop on a Cursor turn a second or two after sending it, before Cursor saves the run's first checkpoint. The Cursor session then closes before the next message: the 2-minute idle unload, or a server restart. The model never sees the stopped request again. The thread still shows it, so the user expects the model to know it. Asked "Did I ask you anything about math?", Grok 4.7 replied "You have not asked anything about math", right under a stopped math question.
If the next message comes while the session is still open, the model does get the stopped request.
Diagnosis
Cursor keeps a run in its history only from the run's first checkpoint on. T3 resends a dropped request in two ways:
failedandcancelledturns: the Cursor adapter checksrunCheckpointedwhen the turn ends and marks the turnpromptDropped(#40670). The next turn resends it as missed history. This state is stored, so it survives anything.- A Stop or steer (
interrupted): the adapter keeps the request ininterruptedPromptand adds it to the next message ("Your previous turn was interrupted and is missing from your history…", #32583). ThatReflives in the Cursor session (openSessioninpackages/provider-cursor/src/server/adapter.ts), so closing the session discards it.
#42938 added a check at the next turn start for cancelled turns that no adapter settled (restart cut-offs). Its unsettledCancelledProviderTurn in ProviderTurnStartService.ts skips interrupted turns, so a stopped turn is never checked. The server counts it as delivered, and nothing resends it.
#42909 would have covered this case as a side effect: it wrote the interrupted prompt to disk. It was closed as superseded by #42938, which covers only the restart case.
Steps to reproduce
- Open a Cursor thread (Grok 4.7) and send one message. Let it finish.
- Send a question the model has to think about ("Without using any tools, list every prime number below 300, then give their sum"). Press Stop about 2 seconds after sending, before any text streams.
- Either wait more than 2 minutes, or restart the T3 server.
- Ask "What questions have I asked you so far in this chat? Did I ask you anything about math?" The model says you asked nothing about math.
Control: skip step 3 and ask right away. The model names the primes question.
Version
Reproduced on main at 9ea5044aef in an isolated dev server (T3CODE_DEV_SEED=0 vp run dev, fresh state directory). main at 2cc5253241 has the same code.
Environment
Windows 11 x64. Cursor provider via cursor-agent-sdk.local, signed in through the browser, model grok-4.7.
Evidence
Provider event log for the idle-unload run (UTC):
- 20:31:58.925
run.startedfor the primes question (run-1fe791fc). Nointeraction.updatefollowed. - 20:32:00.546
run.cancel(Stop). The run endedcancelledafter 2.1 s. The stored provider turn isinterrupted, with nopromptDropped. - 20:34:00.569
agent.close, exactly 2 minutes later (idle unload). - 20:35:16 The next turn opened the agent with
operation: "resume". Itsrun.start(20:35:21) held only the new message: no stopped request and no context handoff.
The server-restart run was the same: Stop 1.9 s after run.started, then a restart, then a run.start with only the new message.
The control thread, asked without waiting, sent "Your previous turn was interrupted and is missing from your history… Its request was: Without using any tools, list every prime number below 300…".
Related issues
#42896 and #42938 (the restart version of this, fixed), #42909 (closed), #40670, #32583, #26861, #26384.
Suggested direction: check interrupted turns as #42938 checks cancelled ones, and have Cursor's nativeTurnKept answer true while its session still holds the stopped request, so the request is not sent twice.
Longer term, four mechanisms answer the same question, "did the provider keep this request?": promptDropped at turn end, Cursor's in-memory interruptedPrompt, the nativeTurnKept check at the next start, and #26861's inputRecordedAt for Codex and ACP. Each covers some turn statuses and lifetimes, and this bug sits in the gap between two of them. I wrote up a proposal for one stored answer in an Ideas discussion: https://github.com/pingdotgg/t3code/discussions/43271
Workaround
Send the request again after a Stop if you waited more than 2 minutes or T3 restarted.
Agent
Produced by Claude Opus 5.5 (claude-opus-5-5) running as a T3 Code triage agent.