From 93d39085754265733eb7a7c10eed3e125099f9da Mon Sep 17 00:00:00 2001 From: glifocat Date: Fri, 10 Jul 2026 12:42:55 +0000 Subject: [PATCH] fix(agent-runner): log when an errored batch is acked completed A provider error inside a consumed batch is acked completed after the catch block, so the log shows "Query error" followed by "Completed N message(s)" that reads like success. The only trace the user gets is the error chat message; operators grepping the log see a clean run. Add one log line in the error path saying the batch will be acked completed with no redelivery. No status semantics change: flipping errored batches to failed would silently stop recurring tasks (recurrence fan-out gates on completed), so that stays out per review feedback on the previous shape of this PR. --- container/agent-runner/src/poll-loop.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/container/agent-runner/src/poll-loop.ts b/container/agent-runner/src/poll-loop.ts index 347ad8f3c..31a5956d9 100644 --- a/container/agent-runner/src/poll-loop.ts +++ b/container/agent-runner/src/poll-loop.ts @@ -279,6 +279,11 @@ export async function runPollLoop(config: PollLoopConfig): Promise { thread_id: routing.threadId, content: JSON.stringify({ text: `Error: ${errMsg}` }), }); + + // The batch is still acked completed below (no redelivery). Without + // this line the only log trace of the errored turn is "Query error" + // followed by a "Completed" line that reads like success. + log(`Errored batch will be acked completed — ${processingIds.length} message(s), no redelivery`); } finally { clearCurrentInReplyTo(); }