# letta-code · 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: [letta-code](https://ai-agents-review.com/runtime/letta-code.md)
- Column: [Budget enforcement](https://ai-agents-review.com/column/budget-enforcement.md) (Execution controls)
- Mark: 2 s
- Default deployment: 2
- Best supported configuration: 2
- Page: https://ai-agents-review.com/cell/letta-code/budget-enforcement

## Rationale

Workflow maxCostUsd is a per-call parameter of a default tool (R1); post-step, per run; main agent reporting only

## 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

The only $ budget is Workflow `maxCostUsd`: per-worker usage is priced from the pi-ai catalog after each step, the workflow aborts once the total reaches the limit (one in-flight step may overshoot), and it stops when cost is unknown. `--max-turns` is opt-in and checked after each step. No token/$/time budget for the main agent or Task subagents. [X60][X61][X62]

## Evidence cited by the mark

- [X60] letta-code — https://github.com/letta-ai/letta-code/blob/52a3bb3bc1999a2fd0f06b1dc2e4b0d94a925c21/src/tools/workflow/workflow-engine.ts#L148-L203 — workflow maxCostUsd: charge after usage, abort at limit, stop on unknown cost — [S]
- [X62] letta-code — https://github.com/letta-ai/letta-code/blob/52a3bb3bc1999a2fd0f06b1dc2e4b0d94a925c21/src/headless.ts#L810-L837 — --max-turns opt-in max_steps stop — [S]

## Evidence also cited by the review finding

- [X61] letta-code — https://github.com/letta-ai/letta-code/blob/52a3bb3bc1999a2fd0f06b1dc2e4b0d94a925c21/src/usage/cost.ts#L1-L122 — client-side pi-ai catalog pricing; local providers 0, unknown null — [S]

## Grading record

- Grader A (default / best): 2 / 2
- Grader B (default / best): 1 / 2
- Adjudication: disagreement; R1. Workflow maxCostUsd is a per-call parameter of a default tool (R1); post-step, per run; main agent reporting only
