Skip to content

fix: refresh Codex quota without running Codex#6

Draft
mabyes1 wants to merge 1 commit into
masterfrom
codex/fix-codex-quota-refresh
Draft

fix: refresh Codex quota without running Codex#6
mabyes1 wants to merge 1 commit into
masterfrom
codex/fix-codex-quota-refresh

Conversation

@mabyes1

@mabyes1 mabyes1 commented Jul 25, 2026

Copy link
Copy Markdown
Owner

What changed

  • Make POST /api/quotas/refresh fetch current Codex usage directly with the existing local Codex login state.
  • Parse live primary/secondary windows and credit balance into the existing normalized quota model.
  • Preserve session JSONL and cached quota data as a safe fallback when the live request is unavailable.
  • Prevent an older session snapshot from overwriting a newer live-refresh cache entry.
  • Add coverage for the live usage response shape.

Root cause

The force-refresh path only forced AGY to contact its provider. Codex always re-scanned local session JSONL files, so when Codex was closed no new rate_limits event existed and VibeDeck kept showing the old snapshot after manual refresh.

User impact

Manual quota refresh now obtains current Codex quota independently of whether the Codex app or CLI is running. Existing offline behavior remains available as a fallback.

Validation

  • Release .NET tests: 75/75 passed
  • Managed connector Worker tests: 7/7 passed
  • Browser JavaScript and PowerShell syntax checks passed
  • Windows Setup 0.1.37 built and installed locally through the canonical update path
  • Installed product-flow checks passed after the Host process was replaced
  • git diff --check passed

The first Release run hit an unrelated transient SQLite rollback failure. The complete release workflow was rerun without skipping tests and passed 75/75.

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.

2 participants