diff --git a/src/agents/pi-embedded-runner/run.ts b/src/agents/pi-embedded-runner/run.ts index e396ca08249..dc36421fbf6 100644 --- a/src/agents/pi-embedded-runner/run.ts +++ b/src/agents/pi-embedded-runner/run.ts @@ -960,13 +960,18 @@ export async function runEmbeddedPiAgent( timedOut || assistantFailoverReason === "timeout" ? "timeout" : (assistantFailoverReason ?? "unknown"); - await markAuthProfileFailure({ - store: authStore, - profileId: lastProfileId, - reason, - cfg: params.config, - agentDir: params.agentDir, - }); + // Skip cooldown for timeouts: a timeout is model/network-specific, + // not an auth issue. Marking the profile would poison fallback models + // on the same provider (e.g. gpt-5.3 timeout blocks gpt-5.2). + if (reason !== "timeout") { + await markAuthProfileFailure({ + store: authStore, + profileId: lastProfileId, + reason, + cfg: params.config, + agentDir: params.agentDir, + }); + } if (timedOut && !isProbeSession) { log.warn( `Profile ${lastProfileId} timed out (possible rate limit). Trying next account...`,