codeburn/src/quota
iamtoruk a6005df140 fix(quota): persist a rotated Codex refresh token before anything can exit
The quota command races every provider read against a five second
timeout and exits as soon as output is written. The Codex read refreshes
the OAuth grant, and between parsing the grant and writing auth.json
there were two await points, so a timeout or the exit could land with
the old refresh token already retired server-side and the new one only
in memory, signing the user out of Codex. A rotated token was also
dropped when the re-read of auth.json failed or when the grant carried
no access token, and a failed write looked like a network error.

The persist path is now synchronous from the parsed grant to the atomic
rename, keeps the credential file's own private mode, falls back to the
in-memory document when auth.json cannot be re-read, persists a rotated
refresh token even without an access token, reports a failed write on
stderr, and the grant request no longer honours the caller's abort so a
rotation the server has committed cannot be cancelled mid-response.
2026-09-02 15:11:01 -07:00
..
antigravity.ts fix(quota): Antigravity looks for its language server the Windows way 2026-09-02 07:00:22 -07:00
claude.ts feat(cli): codeburn quota command reading provider capacity from the CLI 2026-09-01 12:48:58 -07:00
clinepass.ts feat(cli): live ClinePass quota in codeburn quota 2026-09-01 17:01:33 -07:00
codex.ts fix(quota): persist a rotated Codex refresh token before anything can exit 2026-09-02 15:11:01 -07:00
copilot.ts fix(cli): read the Copilot plugin token from %LOCALAPPDATA% on Windows 2026-09-01 16:52:44 -07:00
cursor.ts feat(cli): live Cursor quota in codeburn quota 2026-09-01 16:55:40 -07:00
gemini.ts feat(cli): codeburn quota command reading provider capacity from the CLI 2026-09-01 12:48:58 -07:00
grok.ts feat(cli): live Grok Build quota in codeburn quota 2026-09-01 17:00:01 -07:00
index.ts feat(cli): live ClinePass quota in codeburn quota 2026-09-01 17:01:33 -07:00
kimi.ts feat(cli): codeburn quota command reading provider capacity from the CLI 2026-09-01 12:48:58 -07:00
security.ts fix(quota): persist a rotated Codex refresh token before anything can exit 2026-09-02 15:11:01 -07:00
types.ts feat(cli): live ClinePass quota in codeburn quota 2026-09-01 17:01:33 -07:00
zai.ts feat(cli): live Z.ai GLM Coding Plan quota in codeburn quota 2026-09-01 16:57:54 -07:00