Skip to content

bug(codex): incidental 429 digits are classified as provider rate limits #3175

Closed

Description

@alex-furman

On official dev 12cb5f9d5378bb9cbe5160caedb16fac72b5ca1f, _classify_codex_failure treats any occurrence of the digits 429 as a provider rate limit. A failed tool message such as 2026-10-01T12:30:14.429Z failed to spawn tool process or connection refused at localhost:4299 therefore returns HTTP 429 instead of a generic execution error (500). A timestamp containing those digits can also override a real authentication diagnostic.

Reproduction: construct ExecutionMetadata(error_message=...) with either example and call _classify_codex_failure(1, "", metadata) in docker/base-image/agent_server/services/codex_runtime.py. The same result reproduces through parse_codex_jsonl with a turn.failed error message. No provider account or live service is required. Tested under Python 3.12.

Expected: incidental digits do not establish rate limiting. Preserve explicit HTTP/status 429 and existing named rate/quota markers.

A small candidate requiring status context for numeric 429 has regression tests failing on stock dev and passing after the change. This report is deliberately limited to numeric false positives; it does not propose changing competing-error precedence or all provider error classification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions