Hit Codex's five-hour limit again last week, right in the middle of debugging a state management issue. Agent had already burned through half the context window figuring out the problem, and then — 429. Session gone. Had to wait two hours to pick it back up.
That sucks. And it's happened enough times that I finally did something about it. Built a local proxy.
Codex Conduit sits between your Codex client and whichever accounts or API providers you use. It shows quota status, lets you switch routes mid-session without losing context, and auto-fails over to another account when one hits the five-hour limit or throws a rate error.
What it does
- Manage ChatGPT subscription accounts, OpenAI API keys, and third-party providers in one place
- See five-hour and weekly quota usage (where the upstream reports it), plus account health
- Switch between accounts without restarting Codex — keeps your session and context intact
- Auto-switch to another account when one hits the five-hour limit, so your task keeps running
- Control which routes participate in auto-selection (free, relay, paid, third-party)
- Backs up your original
~/.codex/config.tomland restores it when you disable the proxy
Setup
Grab the installer from the releases page. macOS and Windows builds are up. Quit any running Codex CLI or Codex App processes before enabling the proxy — saves you from weird config states.
Add accounts: Click + Sign In to go through OpenAI's OAuth flow in your browser. For third-party providers that expose /v1/responses or /chat/completions, use + Add Third-Party Provider and paste your API key.
Check status: The Accounts page shows which route is active, remaining quota or balance, health state, and when it was last refreshed.
Enable the proxy: Flip Local Proxy on in the Dashboard. The app backs up your Codex config, writes the proxy settings, and starts routing. Restart your Codex client and you're set. Turn it off later and it restores everything.
Routing policy: Under Settings > Background Services, pick which routes can auto-switch.
My setup: third-party routes stay out of auto-selection (I want to explicitly choose when I'm paying per token), subscription accounts are available as fallback when a paid route dies, and free-tier accounts stay out of rotation.
How failover works
The gateway sits between your Codex client and the upstream:
Codex CLI / Codex App / IDE
|
v
Codex Conduit (local)
|
healthy account or provider
When it sees 401, 429, or a quota-exhausted response, it picks the next healthy route that matches your policy. You still hit provider limits — this just saves you from manually reconfiguring when one runs dry. The dashboard shows which route is active, so you know what you're using.
Does this actually help?
The five-hour window is still there on individual subscription routes. Can't get around that.
But I'm wasting less time checking quota before I start, switching accounts mid-session, editing configs, restarting Codex... you know the drill. The dashboard gives me a quick answer to "which account should I use right now" instead of trial and error.
Try it / break it
Repo: https://github.com/cherrylfrei-max/codex-conduit
Bugs, feature requests, PRs — all welcome. If something's broken or unclear, open an issue and I'll take a look.



Top comments (0)