Skip to content

A Cursor request stopped before its first checkpoint is lost once the session closes #43270

Done

Description

@grenmango51

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:

#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

  1. Open a Cursor thread (Grok 4.7) and send one message. Let it finish.
  2. 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.
  3. Either wait more than 2 minutes, or restart the T3 server.
  4. 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 9ea5044 in an isolated dev server (T3CODE_DEV_SEED=0 vp run dev, fresh state directory). main at 2cc5253 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.started for the primes question (run-1fe791fc). No interaction.update followed.
  • 20:32:00.546 run.cancel (Stop). The run ended cancelled after 2.1 s. The stored provider turn is interrupted, with no promptDropped.
  • 20:34:00.569 agent.close, exactly 2 minutes later (idle unload).
  • 20:35:16 The next turn opened the agent with operation: "resume". Its run.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: #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.

Activity

  1. added
    via-triage
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    via-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions