Agent demo cost cents, production cost insane: a dev's 3 fixes for token burn
cloudwithharshal3805 · reddit · 2026-10-29
A developer shares how agent costs exploded between demo and production:
- The problem: a few cents per run in testing, but real inputs are messy, the agent retried on ambiguous tool errors, and it re-read the same context every step. A reasoning loop with no step budget happily burns tokens chasing unreachable goals.
- Three fixes: a hard max step count; a per-task token budget that aborts cleanly; logging cost per completed task rather than per call.
- The payoff: once cost per outcome was visible, he killed two features that were quietly the most expensive things he shipped.
Takeaway: measure cost per finished task or you're flying blind.
More from coding & agent
- Personal agent digs through mail, calendar & Slack to find who to meet — signulll · 2026-10-30
- Inworld launches Reasoning for Realtime TTS-2, first context-steering TTS model — Scobleizer · 2026-10-30
- Relics packages domain-specific research machinery into installable agent swarm configs — Scobleizer · 2026-10-30
- Baseten partners with Postman to serve enterprise agents for 40M developers — baseten · 2026-10-30
- Pedro Domingos: Claude is 'pretty useless' for code never written before — pmddomingos · 2026-10-30
- AI Code Security Finally Improves: Veracode Benchmark Pass Rate Jumps From 56% to 62% — WeldPond · 2026-10-30