From e981d902097bbee056b4334f9a8fe9a6785b81ab Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Tue, 9 Dec 2025 01:22:50 +0100 Subject: [PATCH] fix: always emit tool events --- src/auto-reply/command-reply.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/auto-reply/command-reply.ts b/src/auto-reply/command-reply.ts index 4fa7ed283..6bf7adbed 100644 --- a/src/auto-reply/command-reply.ts +++ b/src/auto-reply/command-reply.ts @@ -513,10 +513,9 @@ export async function runCommandReply( let pendingMetas: string[] = []; let pendingTimer: NodeJS.Timeout | null = null; let streamedAny = false; - const enableToolStreaming = verboseLevel === "on"; const toolMetaById = new Map(); const flushPendingTool = () => { - if (!onPartialReply || !enableToolStreaming) return; + if (!onPartialReply) return; if (!pendingToolName && pendingMetas.length === 0) return; const text = formatToolAggregate(pendingToolName, pendingMetas); const { text: cleanedText, mediaUrls: mediaFound } = @@ -603,7 +602,7 @@ export async function runCommandReply( } // Forward tool lifecycle events to the agent bus. - if (enableToolStreaming && ev.type === "tool_execution_start") { + if (ev.type === "tool_execution_start") { emitAgentEvent({ runId, stream: "tool", @@ -625,7 +624,6 @@ export async function runCommandReply( } if ( - enableToolStreaming && (ev.type === "message" || ev.type === "message_end") && ev.message?.role === "tool_result" && Array.isArray(ev.message.content)