diff --git a/src/auto-reply/reply/agent-runner-execution.test.ts b/src/auto-reply/reply/agent-runner-execution.test.ts index 27757c1ffeaf..cbec84628f88 100644 --- a/src/auto-reply/reply/agent-runner-execution.test.ts +++ b/src/auto-reply/reply/agent-runner-execution.test.ts @@ -7867,10 +7867,6 @@ describe("runAgentTurnWithFallback", () => { reason: "timeout" as const, message: "provider request timed out without status token", }, - { - reason: "overloaded" as const, - message: "provider capacity exhausted briefly", - }, ])( "retries once for structured FailoverError $reason without leading HTTP status text", async ({ reason, message }) => { diff --git a/src/auto-reply/reply/agent-runner-execution.ts b/src/auto-reply/reply/agent-runner-execution.ts index c0fca6f5da1f..217ceeddc299 100644 --- a/src/auto-reply/reply/agent-runner-execution.ts +++ b/src/auto-reply/reply/agent-runner-execution.ts @@ -3084,12 +3084,11 @@ async function runAgentTurnWithFallbackInternal( !shouldSurfaceToControlUi ? classifyProviderRequestError(err) : undefined; + // Typed overloaded failures stay out of the transient retry: they surface + // dedicated overloaded copy immediately instead of being retried silently. const isTransientHttp = isTransientHttpError(message) || - (isFailoverError(err) && - (err.reason === "timeout" || - err.reason === "server_error" || - err.reason === "overloaded")); + (isFailoverError(err) && (err.reason === "timeout" || err.reason === "server_error")); // Drain/restart aborts stay silent and defer to post-restart // main-session recovery, which resumes the interrupted turn (or emits its