oxagenDocs
CLI

Spend budgets

Hard period-to-date spend ceilings that gate agent runs: the org ceiling, the workspace ceiling, live burn, and the threshold ladder.

A spend budget is a hard USD ceiling on what an org or a workspace may spend in an accounting period. The platform's billing admission gate enforces it. Once spend exceeds a ceiling, the gate denies every call that counts against it until the period rolls over or someone raises the ceiling. A budget sits beside the prepaid wallet and does not replace it. Billing and the wallet are in Billing and usage.

Two ceilings apply independently:

  • The org ceiling covers every workspace in the organization.
  • The workspace ceiling covers the active workspace alone.

A run must clear both. The same ceilings back the get_spend_budget and set_spend_budget capabilities, so the CLI, the app, the API, and MCP all read one governed record. There is no CLI-local budget. Only a person signed in to Oxagen writes a ceiling.

Read the current ceilings

bash
oxagen budget show

For each configured scope, this prints the ceiling and its live burn: period-to-date spend, a projection to the end of the period, the percent of the ceiling consumed, and whether the gate is denying now.

bash
oxagen budget show --json

--json prints the exact contract payload on one line: {"budgets": [...]}, one status per configured ceiling, the org's first. Each status carries scope, publicId, enabled, period, windowDays, limit, spent, projected, ratio, state, reachedThreshold, windowStart, and windowEnd. limit, spent, and projected are money objects that count millionths of a dollar as a string, so a $500 ceiling reads {"micros": "500000000", "currency": "USD"}.

The threshold ladder

state reports where the scope sits now:

StateMeaning
okBelow 50% of the ceiling.
threshold_50Crossed 50%.
threshold_80Crossed 80%.
threshold_95Crossed 95%, the last warning before denial.
exceededAt or over the ceiling. The admission gate is denying.

reachedThreshold records the highest rung crossed in this period, so a notification fires once per rung rather than on every run.

Set a ceiling

Set a ceiling in Oxagen: open Guardrails, choose Budgets, and press Set a budget. A ceiling has a scope (the organization or the workspace), a period (monthly resets on the calendar month, and rolling uses a trailing window of days), and a limit in dollars. Saving one replaces the ceiling for that scope and creates it if absent. The form opens on a monthly ceiling that is enforced, so enter the limit and press Set the budget, or change the period or turn enforcement off first. A ceiling can be turned off without deleting it.

Raising a ceiling is how a denial is cleared, so only a person signed in to Oxagen can set one. An API key is refused with person_required, on the API and over MCP, and so is the key oxagen login saves. An agent on the same machine can read that key, so a key that could raise a ceiling would let the agent raise its own.

bash
oxagen budget set

oxagen budget set makes no change. It prints the Budgets page, opens it when you run it at a terminal, and exits 1, so a script does not read the run as done.

These roles can set a ceiling: an organization Owner or Compliance and Billing member for the organization's ceiling. A workspace's own ceiling takes an organization Owner, the workspace's Admin, or a Compliance and Billing member who also holds a role in that workspace.

The no-progress limit

The no-progress limit is the number of identical calls in a row that stop a run counting as progress. An identical call uses the same tool with the same input and gets the same output as the call before it. Every workspace starts at 20 calls in observe mode, which records each run that reaches the limit and lets it go on. Enforced mode also pauses the run before its next step.

The agent hears about the loop long before the limit. When a Claude Code, Codex, or Cursor agent makes the same call three times and gets the same result, or runs the same two or three calls in the same order three times, Oxagen tells it once to change the input or the approach. A failed call gets the same result when its error text is the same. Output or an error that prints a timing differs on every run, so it never matches. Claude Code, Codex, and Cursor also hear about one tool that keeps returning results it already returned. Each reads the message beside the result of the call that made it a loop. Stella's own engine already tells its agent, so Oxagen sends Stella nothing. The message changes no limit and pauses no run.

bash
oxagen budget no-progress show
oxagen budget no-progress show --from 2026-10-01 --to 2026-10-13

show prints the limit in force, the steering PR that waits to change it, and the runs that reached it this month, or over the days you name.

bash
oxagen budget no-progress set --repeats 30 --mode enforced
oxagen budget no-progress set --clear
FlagDescription
--repeats <n>Identical calls in a row, 2 or more. Leave it out to keep the count the open steering PR proposes, or the count in force.
--mode <observe|enforced>observe records each run that reaches the limit. enforced also pauses it. Leave it out to keep the mode the open steering PR proposes, or the mode in force.
--clearReturn to the default of 20 calls in observe mode. Send it alone.
--jsonMachine-readable output.

set writes no setting. It opens a steering PR that changes [limits.no_progress] in workspace.toml, and the limit changes when that PR merges. A second change while the PR is open updates the same PR. If you ask for the limit already in force while the PR is open, set closes the PR instead. Only an organization Owner or a workspace Admin can run it.

Projection vs. observation

oxagen budget show reports what was actually spent: metered usage, the same recorded figures the wallet ledger and the Spend page read.

To price a workload before it runs, use oxagen cost, which projects token counts against the rate card built into the CLI and makes no network call. To see where the spend on one run went, use oxagen run turns <run-id>. To see where the organization's spend went by model, operator, or workspace, use oxagen spend attribution.

On this page