From 62a905b690fc302517439dfa3589dc9818b98996 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Thu, 12 Mar 2026 11:31:58 +0900 Subject: [PATCH] fix(runtime-fallback): reuse normalized messages for visible assistant checks Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- src/hooks/runtime-fallback/message-update-handler.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/hooks/runtime-fallback/message-update-handler.ts b/src/hooks/runtime-fallback/message-update-handler.ts index 86b2e1c6e..488ffc17d 100644 --- a/src/hooks/runtime-fallback/message-update-handler.ts +++ b/src/hooks/runtime-fallback/message-update-handler.ts @@ -7,6 +7,7 @@ import { createFallbackState } from "./fallback-state" import { getFallbackModelsForSession } from "./fallback-models" import { resolveFallbackBootstrapModel } from "./fallback-bootstrap-model" import { dispatchFallbackRetry } from "./fallback-retry-dispatcher" +import { extractSessionMessages } from "./session-messages" export function hasVisibleAssistantResponse(extractAutoRetrySignalFn: typeof extractAutoRetrySignal) { return async ( @@ -20,12 +21,7 @@ export function hasVisibleAssistantResponse(extractAutoRetrySignalFn: typeof ext query: { directory: ctx.directory }, }) - const msgs = (messagesResp as { - data?: Array<{ - info?: Record - parts?: Array<{ type?: string; text?: string }> - }> - }).data + const msgs = extractSessionMessages(messagesResp) if (!msgs || msgs.length === 0) return false