I really wish there was a canonical platform endpoint to programmatically check Codex usage amount and the quota reset times so I could just vibecode an app to alert "hey, your usage just went to 100% so that means OpenAI did a reset" and "hey, your 5-hour usage is at 10%, wrap up what you're doing".
The only way to do it now is through shenanigans with the Codex App Server which is not ideal.
Use CodexBar: https://github.com/steipete/CodexBar
The 5h limit is gone (for now). It does not presently need to be chased. :)
For the automated checking of other stuff: It was a one-shot prompt to get Codex clank up some Python that returns remaining usage, next reset time/date, and so on.
The result does use Codex App Server, but it's a short-lived process that is dealt with over stdio so that's... fine-ish, I guess?
Check this site for the first part? Maybe they can offer a notifications API, hah.
You can use this endpoint for quota reset times.
Just ask Codex to use its local auth token as a bearer token and send a GET request to it. The response includes "available_count" and "credits[].expires_at". Or script it yourself obviously.
https://chatgpt.com/backend-api/wham/rate-limit-reset-credit...