Agent Quota

A LITTLE MORE CLARITY

Know your headroom.
Choose your next session.

Read your coding subscription’s quota through one typed library and a small command-line tool. Keep a fresh reading, an unknown window and a stale cache distinct.

Node 20+ · Anthropic and installed Codex · local to your machine

YOUR QUOTA, WITHOUT THE GUESSWORK
$ agent-quota codex

Provider-reported quota windows
Usage · reset time · fetch time
Available resets · never redeemed

Illustrative output · run the command to read your account.

NUMBERS WITH THEIR MEANING

Read the allowance.
Keep the context.

Codex, through Codex

Ask the installed official app-server for its current quota windows and available reset balance. Codex manages its own existing sign-in; Agent Quota never opens your token files or starts inference.

Anthropic, with discipline

Supply your authorized OAuth token. Session, weekly, model-scoped and extra-usage readings preserve missing values and decimal currency amounts. Share a client to coordinate polling and simultaneous refreshes.

A reading you can trust

Provider-reported values remain labeled. Local fetch time tells you when a refresh happened; cached Anthropic data carries its freshness and error state. An absent window does not become zero.

One explicit refresh

Use a short command for a fresh Codex reading, or integrate the typed API into your own tool. No model turn, subscription change or reset redemption is part of the read.

START ON YOUR MACHINE

A package.
A useful command.

Download the npm-compatible package, verify its SHA256 and install it locally. It includes the CLI and typed library, with no runtime npm dependencies.

Download v0.2.1 packageSHA256 checksum4711532f69d2c781e5240a619990c23b05c1a40435efb4e7e363904c1a414de2
npm install https://agent-quota.aylith.com/downloads/aylith-agent-quota-0.2.1.tgz
npx agent-quota --help
npx agent-quota codex

Install and sign in to the official Codex CLI first. Agent Quota uses that existing account; it does not choose another account from a label.

Using the library or Anthropic
import { readCodexQuota } from '@aylith/agent-quota';
const result = await readCodexQuota();

For Anthropic, supply your authorized token in ANTHROPIC_OAUTH_TOKEN and run agent-quota anthropic --account LABEL. The library also exposes AnthropicQuotaClient, QuotaBudget and SingleFlight.

GOOD TO KNOW

Choose with the details in hand.

Use your existing sign-in

Sign in to the official Codex CLI before your first read. For Anthropic, provide your authorized OAuth token on your own machine. Your credentials stay in the tools you choose.

Keep refreshes coordinated

Run the CLI when you need a reading. In a long-running app, share an Anthropic client and persist its budget with your own store. Independent CLI processes have separate budgets; respect provider lockouts and leave time between refreshes.

Codex and Anthropic

Codex quota reads use the installed app-server’s rate-limit method. Anthropic subscription reads use its OAuth usage endpoint, which is undocumented and can change. Use a compatible Codex version and an authorized Anthropic token.

Bring readings into your tool

Install the package linked above with Node 20 or newer. Import the typed API to show usage, reset times and freshness in your own interface, and keep unknown values distinct from zero.

More clarity.
A better next step.

Get Agent Quota