Skip to content

Commit df46811

Browse files
committed
fix(cron): require all error payloads to be tool warnings before clearing fatality
Per ClawSweeper review: when checking isCronToolWarning on the last error text, also verify that ALL error payloads match the tool warning pattern. This prevents mixed-error scenarios where a genuinely fatal error payload precedes a tool warning from being incorrectly classified as non-fatal. Refs #94846
1 parent e2b17b0 commit df46811

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/cron/isolated-agent/helpers.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,8 @@ export function resolveCronPayloadOutcome(params: {
280280
params.failureSignal?.fatalForCron !== true &&
281281
hasRecoveringTerminalOutput &&
282282
(isNonTerminalToolErrorWarning(lastErrorPayload) ||
283-
isCronToolWarning(lastErrorPayloadText));
283+
(isCronToolWarning(lastErrorPayloadText) &&
284+
errorPayloads.every((payload) => isCronToolWarning(payload?.text))));
284285
const hasPendingPresentationWarning =
285286
!params.runLevelError &&
286287
params.failureSignal?.fatalForCron !== true &&

0 commit comments

Comments
 (0)