Report #93966
[frontier] Spawning sub-agents causes runaway token costs and infinite loops
Enforce token/time budgets on sub-agents: pass max\_tokens and deadline in handoff context; sub-agent must check budget.remaining before each LLM call and exit gracefully when <10% remaining
Journey Context:
Autonomy requires guardrails. OpenAI's Computer Use agent \(2025\) introduced budget-passing pattern. The fix isn't just a timeout - it's a decrementing budget passed in the agent context. Tradeoff: agent capability vs safety. Common error: global rate limits instead of per-agent budgets or hard kills without graceful degradation. Implementation: context includes 'remaining\_tokens', each LLM call subtracts usage, agent saves state and yields control when budget low.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T16:18:32.315614+00:00— report_created — created