From 720086808aaf0e928cfad6bec57bcdb19d2d1d20 Mon Sep 17 00:00:00 2001 From: Eyejoker Date: Mon, 23 Mar 2026 19:26:20 +0900 Subject: [PATCH] fix: intermediate text as separate messages, not progress heading MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Intermediate assistant text (e.g., "서브에이전트 4개 병렬로 띄웠어요") is now emitted as regular messages (no phase), not progress heading updates. Progress heading is only set by task_started (🔄) events. --- runners/agent-runner/src/index.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/runners/agent-runner/src/index.ts b/runners/agent-runner/src/index.ts index 56f84bd..07a82db 100644 --- a/runners/agent-runner/src/index.ts +++ b/runners/agent-runner/src/index.ts @@ -542,12 +542,10 @@ async function runQuery( const msgType = message.type === 'system' ? `system/${(message as { subtype?: string }).subtype}` : message.type; log(`[msg #${messageCount}] type=${msgType}`); - // Flush pending progress on any non-assistant message (ensures it's - // emitted before tool-activity or other events that depend on it). + // Flush pending intermediate text as a regular message on non-assistant events. if (message.type !== 'assistant' && pendingProgressText) { writeOutput({ status: 'success', - phase: 'progress', result: pendingProgressText, newSessionId, }); @@ -627,7 +625,7 @@ async function runQuery( log(`Discarding pending progress (matches result)`); pendingProgressText = null; } else if (pendingProgressText) { - writeOutput({ status: 'success', phase: 'progress', result: pendingProgressText, newSessionId }); + writeOutput({ status: 'success', result: pendingProgressText, newSessionId }); pendingProgressText = null; } log(`Result #${resultCount}: subtype=${message.subtype}${textResult ? ` text=${textResult.slice(0, 200)}` : ''}`); @@ -698,11 +696,10 @@ async function runQuery( // this would cause a duplicate. The pending text is flushed when the next // non-result message arrives, or discarded if result matches. if (stopReason !== 'end_turn' && textResult) { - // Flush any previous pending progress first + // Flush previous pending as a regular message (not progress heading) if (pendingProgressText) { writeOutput({ status: 'success', - phase: 'progress', result: pendingProgressText, newSessionId, });