Marks / Execution controls / Budget enforcement
software-agent-sdk · Budget enforcement
500 iterations and post-step $ cap; child cost merged only at completion does not meet 'covering descendants' (R4)
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)
- 2
An enforced work limit (turns/steps/iterations at a practical default) or a $/token limit checked after each step, per run
met - 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
max_iteration_per_run defaults to 500. max_budget_per_run ($, default None) is checked after each step against the conversation's accumulated cost across all its LLMs. It is not a pre-call check, so a step can overshoot, and unknown costs (None) are never counted. Subagents get the parent's full cap; a child's cost reaches the parent's total only when the child's metrics are synced at completion. X124X134X135X136X137X138 Note X-5
Pinned evidence
Cited by the mark
- X124
max_iterations 500, max_budget_per_run None (accumulated conversation cost), NeverConfirm, analyzer None
OpenHands/software-agent-sdk openhands-sdk/openhands/sdk/conversation/state.py L162-L186
- X135
budget checked after each step (post-hoc), MaxBudgetReached
- X138
child metrics merged into parent stats after child finishes
OpenHands/software-agent-sdk openhands-tools/openhands/tools/task/manager.py L502-L510
Also cited by the review finding
- X134
budget check uses combined accumulated cost of all the conversation's LLMs
- X136
cost source header, usage, litellm; failure returns None
OpenHands/software-agent-sdk openhands-sdk/openhands/sdk/llm/utils/telemetry.py L505-L556
- X137
sub-agent cap = definition value else parent's full cap
OpenHands/software-agent-sdk openhands-tools/openhands/tools/task/manager.py L262-L290
Two independent graders
- Grader A
- 2 / 2
- Grader B
- 2 / 3
- Final
- 2 / 2
Adjudicated · disagreement; R4
500 iterations and post-step $ cap; child cost merged only at completion does not meet 'covering descendants' (R4)