Restart continuation loses a Cursor turn's request when the restart lands before Cursor checkpoints it
What happened
A Cursor (Grok 4.7) thread was mid-turn when T3 restarted to apply an update. The automatic continuation turn did not include the interrupted request, so the model restated its previous answer instead of answering the new question. Sending the question again by hand worked.
Diagnosis
continueRestartedRun (apps/server/src/orchestration-v2/RestartContinuation.ts) sends only CONTINUE_PROMPT and assumes the interrupted request is already in the provider's history. For Cursor it isn't: the SDK drops a run cancelled before its first checkpoint.
The Cursor adapter already handles that case (packages/provider-cursor/src/server/adapter.ts, "Cursor drops a run cancelled before its first checkpoint, so the next message carries its prompt"). It keeps the dropped request in interruptedPrompt and adds it to the next message ("Your previous turn was interrupted and is missing from your history…"). But interruptedPrompt is an in-memory Ref, set only when the adapter sees the turn end as interrupted. A server restart kills the process before that and wipes the memory, so a restart, the most common cause of an interrupted turn, skips the recovery entirely.
This is the remaining gap named when #26384 was closed ("a provider turn exists but its input has not reached native history"), here on Cursor.
Steps to reproduce
- Open a Cursor thread with some history and send a question the model has to think about at length (no tool calls, so the run does not checkpoint).
- Restart the T3 server (for example, apply an update) while it is still thinking.
- The continuation turn gets only "Continue where you left off…". The model has no record of the question and repeats or continues its previous answer.
Version
Interrupted turn: 0.1.12-nightly.20261125.5222. Continuation turn: 0.1.13-nightly.20261125.5245. main still keeps interruptedPrompt in memory only.
Environment
Windows 11 x64, T3 Code Desktop with its local server. Cursor provider via cursor-agent-sdk.local, model grok-4.7, enableAgentRetries: true.
Evidence
Provider event log for the thread's Cursor agent (UTC):
- 14:30:38
run.startwith the user's question in<user_request>→run-2ce7aae7started. Only reasoning updates followed, no tool calls. - 14:32:41 The server restarted for an update. The run was cancelled with "Server restarted".
- 14:32:47
agent.open(resume), thenrun.startwhose<user_request>is onlyCONTINUE_PROMPT, thenrun.cancelforrun-2ce7aae7. - The continuation's reasoning: "My last turn was cut short. I had proposed a team." It restated the previous answer.
- 14:37:35 The user sent the question again and got a correct answer.
Related issues
#26384 (Codex version, partly fixed by #32413), #26861, #24498, #19112, #24859.
Suggested direction: when building a restart continuation, check whether the source run's provider turn ever checkpointed (Cursor: runCheckpointed). If it didn't, include the source run's user message, as the adapter already does in memory. Alternatively, store interruptedPrompt so it survives a restart.
Workaround
Send the message again after the restart notice.
Agent
Produced by Claude Opus 5.5 (claude-opus-5-5) running as a T3 Code triage agent.