Skip to content

Commit ebcf129

Browse files
PR Batch Testerclaude
andcommitted
fix(provider-cursor): any new agent step after turn-ended counts as a continuation
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent d57689b commit ebcf129

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

‎packages/provider-cursor/src/server/adapter.test.ts‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,31 @@ describe("CursorAdapterV2", () => {
328328
message: "Agent turn stopped after repeated resume attempts made no progress",
329329
},
330330
},
331+
{
332+
reason: "the error a continuation's tool call after the turn ended stopped with",
333+
updates: [
334+
{ type: "text-delta", text: "The answer." },
335+
{ type: "turn-ended" },
336+
{
337+
type: "partial-tool-call",
338+
modelCallId: "native-model-call",
339+
callId: "read-file",
340+
toolCall: { type: "read", args: { path: "math.ts" } },
341+
},
342+
] satisfies ReadonlyArray<InteractionUpdate>,
343+
wait: Effect.succeed({
344+
id: "native-cursor-run",
345+
requestId: "native-request",
346+
status: "error" as const,
347+
error: { message: "Agent turn stopped after repeated resume attempts made no progress" },
348+
model: { id: "claude-fable-5" },
349+
durationMs: 1,
350+
}),
351+
failure: {
352+
class: "provider_error",
353+
message: "Agent turn stopped after repeated resume attempts made no progress",
354+
},
355+
},
331356
{
332357
reason: "no answer from a resume after the turn ended that made no progress",
333358
updates: [{ type: "turn-ended" }] satisfies ReadonlyArray<InteractionUpdate>,

‎packages/provider-cursor/src/server/adapter.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1924,8 +1924,11 @@ export const makeCursorAdapterV2 = Effect.fn("makeCursorAdapterV2")(function* (
19241924
if (update.type === "turn-ended") {
19251925
context.turnEnded = true;
19261926
} else if (
1927+
update.type === "step-started" ||
1928+
update.type === "user-message-appended" ||
19271929
update.type === "text-delta" ||
19281930
update.type === "thinking-delta" ||
1931+
update.type === "partial-tool-call" ||
19291932
update.type === "tool-call-started"
19301933
) {
19311934
context.turnEnded = false;

0 commit comments

Comments
 (0)