diff --git a/src/auto-reply/status.test.ts b/src/auto-reply/status.test.ts index 78d2ba29b..0f58159ff 100644 --- a/src/auto-reply/status.test.ts +++ b/src/auto-reply/status.test.ts @@ -90,6 +90,28 @@ describe("buildStatusMessage", () => { expect(normalized).toContain("Queue: collect"); }); + it("falls back to sessionEntry levels when resolved levels are not passed", () => { + const text = buildStatusMessage({ + agent: { + model: "anthropic/pi:opus", + }, + sessionEntry: { + sessionId: "abc", + updatedAt: 0, + thinkingLevel: "high", + verboseLevel: "full", + reasoningLevel: "on", + }, + sessionKey: "agent:main:main", + queue: { mode: "collect", depth: 0 }, + }); + const normalized = normalizeTestText(text); + + expect(normalized).toContain("Think: high"); + expect(normalized).toContain("verbose:full"); + expect(normalized).toContain("Reasoning: on"); + }); + it("notes channel model overrides in status output", () => { const text = buildStatusMessage({ config: { diff --git a/src/auto-reply/status.ts b/src/auto-reply/status.ts index 46c67fa63..a08931b1c 100644 --- a/src/auto-reply/status.ts +++ b/src/auto-reply/status.ts @@ -506,9 +506,11 @@ export function buildStatusMessage(args: StatusArgs): string { } } - const thinkLevel = args.resolvedThink ?? args.agent?.thinkingDefault ?? "off"; - const verboseLevel = args.resolvedVerbose ?? args.agent?.verboseDefault ?? "off"; - const reasoningLevel = args.resolvedReasoning ?? "off"; + const thinkLevel = + args.resolvedThink ?? args.sessionEntry?.thinkingLevel ?? args.agent?.thinkingDefault ?? "off"; + const verboseLevel = + args.resolvedVerbose ?? args.sessionEntry?.verboseLevel ?? args.agent?.verboseDefault ?? "off"; + const reasoningLevel = args.resolvedReasoning ?? args.sessionEntry?.reasoningLevel ?? "off"; const elevatedLevel = args.resolvedElevated ?? args.sessionEntry?.elevatedLevel ??