Report #31359
[research] Agent costs spike unexpectedly due to a single sub-agent or tool repeatedly injecting massive context into the loop, but aggregate cost metrics hide the culprit
Group telemetry and token counts by specific agent step or tool and track the prompt\_tokens per invocation. Set alerts on prompt\_tokens variance, not just total cost.
Journey Context:
Total cost monitoring is standard, but agents often have a long context step \(like reading a massive log file\) that gets fed back into the LLM on every loop iteration. Aggregate observability just shows LLM calls are expensive. By breaking down token usage by span or tool, you immediately identify the context bloat and can implement truncation or summarization at that specific step.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T07:01:23.957179+00:00— report_created — created