Skip to content

fix: improve Codex usage polling reliability - #30

Merged
Waddas merged 1 commit into
mainfrom
codex/codex-usage-reliability
Sep 12, 2026
Merged

Waddas merged 1 commit into
mainfrom
codex/codex-usage-reliability

Conversation

@Waddas

@Waddas Waddas commented Sep 12, 2026

Copy link
Copy Markdown
Owner

What does this PR do?

Temporary Codex usage failures currently surface a generic connection error. This change retries recoverable failures and keeps the last reading visibly stale with its age, while showing specific guidance for login errors, rate limits, timeouts, and invalid responses.

  • Allow 30 seconds per Codex request and retry temporary failures once after two seconds.
  • Honor Retry-After and increasing rate-limit cooldowns, including after manual refresh or provider switching.
  • Show a brief “Updating…” grace period for recent retained readings, then surface persistent failures. Authentication errors appear immediately, and stale readings never enter usage history.
  • Document the behavior and preserve the lightweight, read-only HTTP integration.

Related issue

None.

Checklist

  • task check passes locally (type-check, Clippy lint, all tests)
  • The PR title follows Conventional Commits
  • Docs/comments updated if behaviour changed
  • I verified the change on at least one platform (note which below)

Screenshots / notes

Validated on macOS: 92 frontend tests and 112 Rust tests pass, along with Clippy, TypeScript checks, and npm run build. Local HTTP fixtures cover recovery, retry limits, timeouts, authentication failures, invalid responses, and server cooldowns without contacting the live usage API. Tests also cover stale-data age, account isolation, and history exclusion.

@Waddas
Waddas merged commit 85516c4 into main Sep 12, 2026
5 checks passed
@Waddas
Waddas deleted the codex/codex-usage-reliability branch September 12, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant