fix(cursor): await callback cleanup on stop

This commit is contained in:
t3-code[bot] committed 2026-08-05 23:06:40 +00:00
1 parent a1d871198a
commit f9f3ed7e35
1 file changed
+4 -2
@@ -480,8 +480,10 @@ export function makeCursorAdapter(
Effect.gen(function* () {
if (ctx.stopped) return;
ctx.stopped = true;
yield* settlePendingApprovalsAsCancelled(ctx.pendingApprovals);
yield* settlePendingUserInputsAsEmptyAnswers(ctx.pendingUserInputs);
yield* settlePendingCallbacksBeforeTurnCompletion(
ctx.pendingApprovals,
ctx.pendingUserInputs,
);
if (ctx.notificationFiber) {
yield* Fiber.interrupt(ctx.notificationFiber);
}