Agent costs leak in the architecture, not the model tier: 4 patterns
Key-Register-1969 · reddit · 2026-10-24
The author argues per-run agent cost is mostly structural, not model-tier. Four leak patterns:
- Unbounded retries: a stuck step replays the whole trajectory on each retry; one flaky step can burn tens of thousands of tokens for nothing. Cap retries and replay only the last error plus current state.
- Tool-result bloat: full API responses, directory listings, and stack traces in the loop price every subsequent call on accumulated junk. Truncate at the tool-result layer.
- Fan-out multiplication: N parallel sub-agents each get a full context copy — the bill is context × N. Keep shared state centrally and hand sub-agents a minimal brief.
- No per-task accounting: teams know per-million-token prices but not per-task cost; without per-run measurement nothing gets cheaper. Log tokens per task like latency.
Takeaway: cost scales with trajectory length and context width, not output quality — design for short trajectories and narrow context.
More from coding & agent
- Mubit trains small models from your own agent API traffic to cut cost and latency — rohanpaul_ai · 2026-10-24
- Heavy AI user: marketed automations are fragile, exhausting, and dumber than we admit — mrks86 · 2026-10-24
- Google's playbook: evaluating AI agents beyond the vibe check — bibryam · 2026-10-24
- Running CI weekly on dotfiles setup.sh inside a fresh Ubuntu container to catch breakage — 4310sy · 2026-10-24
- Codex CLI's hidden remote-control feature praised as better than Claude Code's — antirez · 2026-10-24
- PWAs can't use foldable screens on the Duo yet, but two Chrome flags unlock the APIs — mitsuhiko · 2026-10-24