# pi · Budget enforcement

> Levels are per column and must not be summed, averaged or ranked. A level states which written criterion the runtime's source meets. It is not a measure of quality or task success. Higher is not always preferable.

Source: "Agent runtime comparison: ten open-source agent runtimes, source review", study of 2026-11-28. Mark notation: `3` is the level in the default deployment; `1→4 [opt: …]` is level 1 by default and level 4 in the named configuration; `s` source-verified, `d` documented or test only. Service dependencies are classes (E embedded, O on demand, R resident service, X external server required), not levels.

- Runtime: [pi](https://ai-agents-review.com/runtime/pi.md)
- Column: [Budget enforcement](https://ai-agents-review.com/column/budget-enforcement.md) (Execution controls)
- Mark: 1→2 [alt: pi-durable maxTurns] s
- Default deployment: 1
- Best supported configuration: 2 (alt: pi-durable maxTurns)
- Page: https://ai-agents-review.com/cell/pi/budget-enforcement

## Rationale

CLI reports usage only with a 3-retry cap; the pi-durable stack enforces a maxTurns work limit when set (R3); no cost admission

## Rubric criteria for this column

- 0: No limits of any unit, and no usage reporting
- 1: Usage or cost reported only, **or** only coarse safety caps (retry counts, iteration ceilings ≥1000, wall-clock timeouts ≥ hours)
- 2: An enforced work limit (turns/steps/iterations at a practical default) **or** a $/token limit checked after each step, per run
- 3: A $ or token limit checked **before** the model call (admission) for a run, **or** a post-step $ limit covering descendants
- 4: Pre-call admission across the whole delegation tree, with stated settlement of in-flight calls

## Review finding

No spend, token or turn budget in the pi CLI. Tokens and USD are computed per response from the bundled or remote catalog (or the provider's own figure) and summed for display and stats. Existing limits: 3 provider retries, codemode caps, the compaction threshold. [alt: pi-durable `maxTurns`; no cost admission]. [X120][X121][X122][X123]

## Evidence cited by the mark

- [X120] pi — https://github.com/earendil-works/pi/blob/2126569de40d5595dd3f41f7af126001f04c1de0/packages/ai/src/models.ts#L1289-L1310 — per-response cost math (tiered rates) — [S]
- [X121] pi — https://github.com/earendil-works/pi/blob/2126569de40d5595dd3f41f7af126001f04c1de0/packages/coding-agent/src/core/usage-totals.ts#L22-L28 — usage totals for display/stats — [S]
- [X123] pi — https://github.com/earendil-works/pi/blob/2126569de40d5595dd3f41f7af126001f04c1de0/packages/durable/src/harness/generation.ts#L1274 — [alt pi-durable] maxTurns ends run with turn_limit — [S]

## Evidence also cited by the review finding

- [X122] pi — https://github.com/earendil-works/pi/blob/2126569de40d5595dd3f41f7af126001f04c1de0/packages/coding-agent/src/core/settings-defaults.ts#L18-L26 — retry defaults: 3 retries, 2000 ms base — [S]

## Grading record

- Grader A (default / best): 1 / 1
- Grader B (default / best): 1 / 1
- Adjudication: R3 (agreed cell changed from 1/1). CLI reports usage only with a 3-retry cap; the pi-durable stack enforces a maxTurns work limit when set (R3); no cost admission
