My cost per task was fine in the demo and insane in production
retained text
In testing each run cost me a few cents. In production the same agent averaged way more because real inputs are messy, it retried on ambiguous tool errors, and it re-read the same context on every step. Nobody warns you that a reasoning loop with no step budget will happily burn tokens chasing a goal it cannot reach. I added three things: a hard max step count, a token budget per task that aborts cleanly, and logging of cost per completed task not per call. Once I could see cost per outcome I killed two features that were quietly the most expensive thing I shipped. Measure cost per finished task or you are flying blind.
document fetched 2026-10-30 00:18 · canonical https://reddit.com/r/AI_Agents/comments/1xijnxn/my_cost_per_task_was_fine_in_the_demo_and_insane