From 85246664548b4481f2da2b706dd58157484abe86 Mon Sep 17 00:00:00 2001 From: hyf0-agent Date: Thu, 5 Feb 2026 12:52:55 +0800 Subject: [PATCH] fix: gracefully downgrade xhigh thinking level in cron isolated agent (#9363) When thinkingDefault is set to "xhigh" but the configured model does not support it (e.g. Claude), the cron isolated-agent path throws a hard error causing the job to fail. The interactive chat path already handles this by silently downgrading to "high". Apply the same graceful downgrade in the cron path: log a warning and fall back to "high" instead of crashing. Co-authored-by: hyf0-agent --- src/cron/isolated-agent/run.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cron/isolated-agent/run.ts b/src/cron/isolated-agent/run.ts index 3f6e06f4b7..422a81fe32 100644 --- a/src/cron/isolated-agent/run.ts +++ b/src/cron/isolated-agent/run.ts @@ -232,7 +232,10 @@ export async function runCronIsolatedAgentTurn(params: { }); } if (thinkLevel === "xhigh" && !supportsXHighThinking(provider, model)) { - throw new Error(`Thinking level "xhigh" is only supported for ${formatXHighModelHint()}.`); + logWarn( + `[cron:${params.job.id}] Thinking level "xhigh" is not supported for ${provider}/${model}; downgrading to "high".`, + ); + thinkLevel = "high"; } const timeoutMs = resolveAgentTimeoutMs({