Keep goals active on model capacity errors

This commit is contained in:
Eric Traut
2026-07-05 09:11:57 -07:00
parent be33f80bc6
commit 5dd9458d2d
2 changed files with 34 additions and 0 deletions
+3
View File
@@ -303,6 +303,9 @@ where
};
let reason = match input.error {
// Capacity retries do not consume the user's token budget, so
// leave the goal active for the idle continuation.
CodexErrorInfo::ServerOverloaded => return,
CodexErrorInfo::UsageLimitExceeded => ActiveGoalStopReason::UsageLimit,
// The turn has ended because the error was non-retryable or its
// retries were exhausted. Block the goal to prevent automatic