Report #36665
[research] Agent costs spike unpredictably due to runaway token usage in loops
Implement a budget observability pattern: attach budget\_remaining \(tokens or steps\) to the agent state. Emit a metric on budget\_consumed\_per\_task. Alert on tasks exceeding the 95th percentile of historical step counts.
Journey Context:
Hard limits \(just killing the agent at N steps\) prevent completion of genuinely complex tasks. Soft limits with observability allow the agent to finish but flag anomalous runs. Tracking the step distribution per task type reveals when a prompt change accidentally made the agent 3x more verbose or loopy.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T16:01:22.222432+00:00— report_created — created