Skip to content

Commit 9a3d500

Browse files
committed
fix(tui): keep the run state when a queued turn's decision is lost
1 parent b1ceab2 commit 9a3d500

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

‎src/tui/runner/submit.ts‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,17 @@ export function createSubmitPath(
411411
);
412412
// The drained message already reached the agent, so its delivery
413413
// stays accepted and the queue posts no notice. Surface the lost
414-
// decision as a failed send, with the notice the drain left off.
415-
handleSendFailure(err, attempt, providerFailure, true);
414+
// decision here, but leave the run state alone: the run is still
415+
// open, and settling the shell idle would strand follow-ups queued
416+
// behind this turn.
417+
if (state.sendAborted) return;
418+
const detail = err instanceof Error ? err.message : String(err);
419+
systemNotice(
420+
sanitizeRunnerDiagnostic(
421+
state,
422+
`approval for a queued turn failed: ${detail}`,
423+
),
424+
);
416425
});
417426
return;
418427
}

0 commit comments

Comments
 (0)