I design scalable platforms and streamline infrastructure so your team can move faster, safer, and smarter.
Β© 2026 Raditya Surya. All rights reserved.
I code with Claude, Codex, and GLM at once, and each one runs on a different clock. How quota-axi lets my agents check which provider still has quota and share the work across all three.
Most of my code is written by agents now. I describe the goal, an orchestrator splits it into lanes, and each lane goes to whichever model fits the job. Some lanes need taste, some need deep reasoning, and most just need a model that will keep going until the tests are green.
That setup runs on three subscriptions at once. For a while, none of my agents had any idea how much of each one was left.
Each provider does a different job for me, and each one is scarce in a different way.
| Provider | Plan | What it does for me | Limits |
|---|---|---|---|
| z.ai (GLM) | GLM Coding Max | Most implementation work: ports, tests, fix loops | 5-hour |
| Anthropic (Claude) | Claude Max | Planning, UI work, and hard reasoning | 5-hour and 7-day |
| OpenAI (Codex) | ChatGPT Plus | The hard lane, only after GLM has failed once | 5-hour and weekly |
The idea is simple. Spend the loosest plan first, and keep the tight ones for work that actually needs them.
The practice was not simple. Every window resets on its own schedule, every vendor shows usage on its own dashboard, and none of those dashboards are something an agent can read. The first time I found out a plan was empty was usually when an agent stalled halfway through a task.
Picking the right model for a job is the part everyone talks about. I wrote a whole routing table for it. What I had skipped was the question that comes before it: does that model still have quota?
A human checks this without thinking. You glance at the meter, notice you burned through most of the week on Tuesday, and slow down. An agent does none of that. It picks the lane it was told to pick, and it spends until the provider says no.
So the fix was not a smarter router. It was giving the router something to read.
quota-axi is a command line tool by Kun Chen that reports quota windows for local AI coding tools. It covers Claude, Codex, Z.AI, Cursor, GitHub Copilot, Kimi, OpenRouter, and about ten more.
It reads the auth state the coding CLIs already keep on your machine, and it calls the same first-party usage endpoints those tools use. It never proxies traffic, never logs in for you, and never mints a credential.
It also never routes. That surprised me at first, and now it is my favorite part. quota-axi reports the facts and stops there. The decision belongs to whoever reads them.
This is what my machine showed while I was writing this post:
quota[4]{provider,scope,effectivePercentRemaining,spendPriority,runway,confidence,limitedBy,resetsAt}:
claude,all_models,45,0.0146,through_reset,early,seven_day,"2026-09-29T14:00:00+00:00"
claude,"model:fable",45,0.7284,through_reset,early,seven_day,"2026-09-29T14:00:00+00:00"
codex,all_models,44,71.0775,through_reset,early,weekly,"2026-09-26T11:43:24.000Z"
zai,all_models,99,0.8548,through_reset,early,five_hour,"2026-09-26T15:27:28.286Z"
Three fields do most of the work.
On that morning, z.ai was nearly full, and Claude and Codex were both under half. That alone tells an agent where the next batch of work should go.
If you read Agent eXperience Interface (AXI): My CLI Was Never Built for My Agents, the output above will look familiar. quota-axi follows the same ten principles, and it shows.
The output is TOON, not JSON. Field names appear once, so a table of providers costs the agent a handful of tokens instead of a wall of repeated keys.
Running it with no arguments prints the live state rather than a help screen. That is the content-first principle again. An agent that runs a command blind should learn the state of the world, not be handed a manual.
Anything unusual goes into a separate attention block. My machine reports fifteen providers there that are not signed in, and none of them clutter the table the agent actually decides from.
It is also the same reason I built coolify-axi. A dashboard built for my eyes is useless to something that reads every byte and pays for all of them.
I hand a goal to an orchestrator agent. It plans the lanes, and before it spends anything scarce, it checks quota.
The check does not run on every task. A single small edit is not worth the call. It runs when the orchestrator is about to fan out to more than two specialists, and before every Codex job, because that is where running dry hurts.
The orchestrator then sorts each provider into one of three states.
Codex has one extra rule. It only runs after GLM has failed once, and if its 5-hour window is under 20%, the job goes back to GLM instead.
The last step matters more than it looks. The plan the orchestrator shows me lists every provider's state and every fallback it took. When a job lands on a model I did not expect, I can see why.
I run a fork published as @radityasurya/quota-axi. The difference is small: one fix to how it reads Claude utilization, which my setup depends on. Everything else is upstream, and upstream is where you should start.
npx -y quota-axi
Agents stopped stalling halfway through a task. When a plan runs low, the work moves before it breaks.
The loosest subscription now does the bulk of the work, which is what I was paying it for. The two tight ones are saved for planning, UI, and the hard lane.
And I stopped opening three dashboards to answer one question.
I used to think of quota as a billing problem. It is actually a scheduling problem, and schedulers need to know what they have left.
quota-axi does not make any decision for me, and that is exactly why it works. It tells my agents the truth in a format they can afford to read, and the routing rules I already wrote finally have something real to act on.
I did not set this up because I enjoy watching usage meters. I set it up because I am lazy, and I would rather my agents check the meter than have me do it at midnight. π±