Marks / Execution controls / Budget enforcement
opencode · Budget enforcement
steps unset by default, cost reporting only; setting the named per-agent steps key gives a level-2 work limit (R3)
Level
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)
default - 2
An enforced work limit (turns/steps/iterations at a practical default) or a $/token limit checked after each step, per run
best - 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
What the source review found
Per-agent steps (unset by default) forces a final tool-less step; it counts per agent loop and does not include descendants. No local $/token cap: cost is computed after each call from the provider-reported figure, else the models.dev catalog. OpenCode Console spend limits are enforced provider-side and surface as errors. Goal loop capped at 50 rounds. X105X106X107X108X109
Pinned evidence
Cited by the mark
- X105
steps limit forces final tool-less step
anomalyco/opencode packages/core/src/session/runner/llm.ts L263-L283
- X106
cost after call: provider-reported else catalog
anomalyco/opencode packages/core/src/session/usage.ts L21-L50
- X108
goal loop MAX_ROUNDS 50, MAX_STALLS 3
Also cited by the review finding
- X107
Console usage/spend-limit errors surfaced
anomalyco/opencode packages/core/src/session/to-session-error.ts L40-L58
- X109
feature flags on in dev, off in release (full Code Mode, codemode_agents...)
anomalyco/opencode packages/schema/src/config/flag.ts L6-L44
Two independent graders
- Grader A
- 1 / 1
- Grader B
- 1 / 1
- Final
- 1 / 2
Adjudicated · R3 (agreed cell changed from 1/1)
steps unset by default, cost reporting only; setting the named per-agent steps key gives a level-2 work limit (R3)