Skip to main content
The spend-limit command group caps what an organization can spend in a billing period. Once the cap is reached, new sessions are blocked; sessions already running are not interrupted. It’s the backstop for a misconfiguration — a runaway min-agents, a loop that starts sessions — rather than a substitute for right-sizing your deployment.

show

Show the current spend limit and usage. Usage:
Options:
string
Organization to query. If not provided, uses the current organization from your configuration.
boolean
default:"false"
deprecated
Deprecated alias for --output json. Use the global output mode instead.
Reports the limit, current spend, the billing period it covers, and whether the organization is currently blocked. An organization with no limit set shows no limit set rather than an error.

set

Set or update the spend limit. Usage:
Arguments:
string
required
Limit in dollars, as a non-negative number with at most two decimal places — 50 or 12.34. More precision than that is rejected.
Options:
string
Organization to update. If not provided, uses the current organization from your configuration.
boolean
default:"false"
Skip the confirmation prompt.

When it asks for confirmation

Raising a limit, or setting one for the first time, applies without a prompt. Two cases prompt because they block new sessions immediately:
  • Setting the limit to 0, which blocks everything until you raise it.
  • Setting a limit below current spend, which blocks new sessions for the rest of the period.
Only those two cases need --yes in CI. A script that raises a limit works non-interactively without it.

clear

Remove the spend limit. Usage:
Options:
string
Organization to update. If not provided, uses the current organization from your configuration.
boolean
default:"false"
Skip the confirmation prompt.
New sessions stop being capped. This always prompts, so --yes is required to run it non-interactively.

More Information

Scaling and capacity

Right-size min-agents and max-agents so the cap stays a backstop

Output modes and exit codes

Read the limit programmatically with --output json