Skip to content

The agent that grows with you

fix(agent): label a spent image-shrink fallback instead of 'Non-retryable error (HTTP 400)'

teknium1efcafea0667e
diff --git a/agent/turn_recovery.py b/agent/turn_recovery.py
index 08b7eae0d38..791ebf57336 100644
--- a/agent/turn_recovery.py
+++ b/agent/turn_recovery.py
@@ -768,6 +768,8 @@ def _welcome_outage_copy(base_url: Any, classified: Any) -> str:
_NONRETRYABLE_LABELS = {
FailoverReason.content_policy_blocked: "The provider's safety filter refused this request",
FailoverReason.ssl_cert_verification: "The provider's security certificate could not be verified",
+ # Only reached after the one-shot image shrink ran (recover_after_classification sets the flag first).
+ FailoverReason.image_too_large: "Request still exceeded the provider's size limit after shrinking images",
}