---
title: "oz0 tenant spend"
description: "Every agent's jobs in the tenant run with these unless the agent's definition says otherwise."
canonical_url: "https://docs.oz0.ai/reference/cli/oz0/tenant/spend"
---
# oz0 tenant spend

> Every agent's jobs in the tenant run with these unless the agent's definition says otherwise.

For: Operators and developers looking up a command.

Every agent's jobs in the tenant run with these unless the agent's definition says otherwise. --on-loop is what a loop does: report (a finding only), wait (the default: the job waits for a person as an approval of kind loop) or stop (the job ends with LoopDetected).

--on-budget is what a job tree's spent budget does: fail, or wait for a person to raise it; unset means wait for a tree a person started and fail for one a routine, a webhook, an event, an API key or a channel started.

--on-unknown is what a write whose outcome is unknown does (its call ran out of time, its node was lost): wait for a person, who says it happened, runs it again under the same idempotency key or stops the job, or fail.

It is the tenant's default: an agent's own on_unknown (its definition, or its plugin's configuration, which wins over the definition) wins over it, and when neither says and it is unset, who started the tree decides, as for --on-budget.

--repeats, --cycles and --no-progress are the loop detectors' thresholds; --warn-share is when the agent is told to wrap up (people are alerted at the shares of oz0 tenant spend-alerts), --soft-wall when the agent may only finish; --forecast-chance and --forecast-min-runs say when the gateway asks a person before the wall.

--reserve is what a model call that does not fit its budget's worst case does: last_call (the default) lets it start when no other call of the budget runs and the budget is not spent, so a tree passes its budget by at most one call's reservation; strict refuses it. --tree-* are the limits of a whole job tree: -1 (or none for --tree-wait) is no limit, and 0 (or empty) takes the platform's default again.

Without flags it shows the defaults in effect. The settings are part of the tenant's tool policy, so `oz0 tenant tool-policy` keeps them, and a change takes --reason (or $OZ0_REASON) as any tool-policy change does; one that loosens waits for another admin where the tenant turned four eyes on.

## Usage

```bash
oz0 tenant spend <tenant> [flags]
```

## Flags

<table>
<thead>
  <tr>
    <th>
      Flag
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        --cycles
      </code>
    </td>
    
    <td>
      int
    </td>
    
    <td>
      
    </td>
    
    <td>
      times in a row a sequence of two to four calls repeats before it is a loop
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --decision-ref
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      
    </td>
    
    <td>
      the decision or case the change follows, such as a case number (at most 200 characters)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --defaults
      </code>
    </td>
    
    <td>
      bool
    </td>
    
    <td>
      
    </td>
    
    <td>
      start from the platform's defaults instead of the tenant's settings
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --forecast-chance
      </code>
    </td>
    
    <td>
      float
    </td>
    
    <td>
      
    </td>
    
    <td>
      share of the agent's past trees passing the budget at which the gateway asks early, 0.5 to 0.99
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --forecast-min-runs
      </code>
    </td>
    
    <td>
      int
    </td>
    
    <td>
      
    </td>
    
    <td>
      finished trees of an agent the forecast needs
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --forecast-off
      </code>
    </td>
    
    <td>
      bool
    </td>
    
    <td>
      
    </td>
    
    <td>
      never ask early from a forecast
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --forecast-on
      </code>
    </td>
    
    <td>
      bool
    </td>
    
    <td>
      
    </td>
    
    <td>
      ask early from a forecast again
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --json
      </code>
    </td>
    
    <td>
      bool
    </td>
    
    <td>
      
    </td>
    
    <td>
      print JSON instead of a table
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --no-progress
      </code>
    </td>
    
    <td>
      int
    </td>
    
    <td>
      
    </td>
    
    <td>
      tool results in a row that add nothing before only the answer is left
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --on-budget
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      
    </td>
    
    <td>
      what a job tree's spent budget does: fail or wait (empty: by who started it)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --on-loop
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      
    </td>
    
    <td>
      what a loop does: report, wait or stop
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --on-unknown
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      
    </td>
    
    <td>
      what a write whose outcome is unknown does: wait (a person decides) or fail (empty: by who started it)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --reason
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      
    </td>
    
    <td>
      why, required for every governance change (at most 500 characters; default $OZ0_REASON); the audit log keeps it
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --repeats
      </code>
    </td>
    
    <td>
      int
    </td>
    
    <td>
      
    </td>
    
    <td>
      calls of one function with the same arguments that are a loop
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --reserve
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      
    </td>
    
    <td>
      a call whose worst case does not fit: last_call (the default: the last call may start) or strict
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --soft-wall
      </code>
    </td>
    
    <td>
      float
    </td>
    
    <td>
      
    </td>
    
    <td>
      share of a job tree's budget at which the agent may only finish, such as 0.85
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --tree-children
      </code>
    </td>
    
    <td>
      int
    </td>
    
    <td>
      
    </td>
    
    <td>
      child jobs of a whole job tree (-1: no limit, 0: the default)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --tree-depth
      </code>
    </td>
    
    <td>
      int
    </td>
    
    <td>
      
    </td>
    
    <td>
      how deep a job tree may go (-1: no limit, 0: the default)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --tree-fan-out
      </code>
    </td>
    
    <td>
      int
    </td>
    
    <td>
      
    </td>
    
    <td>
      child jobs of a tree running at once (-1: no limit, 0: the default)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --tree-model-calls
      </code>
    </td>
    
    <td>
      int
    </td>
    
    <td>
      
    </td>
    
    <td>
      model calls of a whole job tree (-1: no limit, 0: the default)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --tree-tokens
      </code>
    </td>
    
    <td>
      int
    </td>
    
    <td>
      
    </td>
    
    <td>
      tokens of a whole job tree (-1: no limit, 0: the default)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --tree-wait
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      
    </td>
    
    <td>
      the most a job tree may wait for people in total, such as 8h (none: no limit, empty: the default)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --warn-share
      </code>
    </td>
    
    <td>
      float
    </td>
    
    <td>
      
    </td>
    
    <td>
      share of a budget at which the agent is told to wrap up and people are notified, such as 0.8
    </td>
  </tr>
</tbody>
</table>

## Inherited flags

<table>
<thead>
  <tr>
    <th>
      Flag
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        --context
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      <code>
        $OZ0_CONTEXT or &lt;config dir>/orchestrator-zero/context.json
      </code>
    </td>
    
    <td>
      CLI context file written by server init
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --log-level
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      <code>
        info
      </code>
    </td>
    
    <td>
      log level: debug, info, warn or error
    </td>
  </tr>
</tbody>
</table>

See [all `oz0` commands](https://docs.oz0.ai/reference/cli/oz0) and the [global flags](https://docs.oz0.ai/reference/cli/oz0#global-flags).


## Sitemap

See the full [sitemap](https://docs.oz0.ai/sitemap.md) for all pages.
