From 79fb746a1c62ceb9bb2ded712c9f298d66cbedcf Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Thu, 12 Mar 2026 11:31:58 +0900 Subject: [PATCH] fix(runtime-fallback): resolve agents from normalized session messages Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- src/hooks/runtime-fallback/auto-retry.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hooks/runtime-fallback/auto-retry.ts b/src/hooks/runtime-fallback/auto-retry.ts index 9679961ab..64d972e5e 100644 --- a/src/hooks/runtime-fallback/auto-retry.ts +++ b/src/hooks/runtime-fallback/auto-retry.ts @@ -15,6 +15,7 @@ import { prepareFallback } from "./fallback-state" import { SessionCategoryRegistry } from "../../shared/session-category-registry" import { buildRetryModelPayload } from "./retry-model-payload" import { getLastUserRetryParts } from "./last-user-retry-parts" +import { extractSessionMessages } from "./session-messages" const SESSION_TTL_MS = 30 * 60 * 1000 @@ -172,7 +173,7 @@ export function createAutoRetryHelpers(deps: HookDeps) { path: { id: sessionID }, query: { directory: ctx.directory }, }) - const msgs = (messagesResp as { data?: Array<{ info?: Record }> }).data + const msgs = extractSessionMessages(messagesResp) if (!msgs || msgs.length === 0) return undefined for (let i = msgs.length - 1; i >= 0; i--) {