What happened?
Transient Azure OpenAI 500 came back with body "The server had an error processing your request. Sorry about that!". Auto-retry didn't fire; the agent gave up.
Two reasons it slips through:
packages/ai/src/providers/azure-openai-responses.ts catch block does errorMessage = error.message and drops the HTTP status. mistral.ts already prefixes status: Mistral API error (${statusCode}): ....
_isRetryableError in packages/coding-agent/src/core/agent-session.ts keys off 429|500|502|503|504|server.?error|.... With the status stripped, no code matches. The body says "server had an error" — 8 chars between, doesn't match server.?error (0–1 chars). Nothing fires.
openai-codex-responses.ts already wraps the request in a provider-level retry on 429/5xx. Azure doesn't.
Steps to reproduce
Hard to trigger on demand (Azure 5xxs are transient). Inspection: compare catch blocks of azure-openai-responses.ts vs openai-codex-responses.ts. Hit on provider: azure-openai-responses, model gpt-5.3-codex.
Expected behavior
Prefix the status onto errorMessage so the existing classifier matches (mirrors mistral.ts), or add a provider-level retry loop like openai-codex-responses.ts. Happy to PR if you'd prefer.
Version
0.73.0
What happened?
Transient Azure OpenAI 500 came back with body
"The server had an error processing your request. Sorry about that!". Auto-retry didn't fire; the agent gave up.Two reasons it slips through:
packages/ai/src/providers/azure-openai-responses.tscatch block doeserrorMessage = error.messageand drops the HTTP status.mistral.tsalready prefixes status:Mistral API error (${statusCode}): ...._isRetryableErrorinpackages/coding-agent/src/core/agent-session.tskeys off429|500|502|503|504|server.?error|.... With the status stripped, no code matches. The body says"server had an error"— 8 chars between, doesn't matchserver.?error(0–1 chars). Nothing fires.openai-codex-responses.tsalready wraps the request in a provider-level retry on 429/5xx. Azure doesn't.Steps to reproduce
Hard to trigger on demand (Azure 5xxs are transient). Inspection: compare catch blocks of
azure-openai-responses.tsvsopenai-codex-responses.ts. Hit onprovider: azure-openai-responses, modelgpt-5.3-codex.Expected behavior
Prefix the status onto
errorMessageso the existing classifier matches (mirrorsmistral.ts), or add a provider-level retry loop likeopenai-codex-responses.ts. Happy to PR if you'd prefer.Version
0.73.0