01:52
2026-05-21
dev.to
developer-tools
A 3-step agent cost me $4.20. agenttrace showed me the O(n ) tool call hiding in plain sight.
A simple three-step AI agent unexpectedly cost $4.20 due to a hidden bug in the cite-check step, where the model made nine tool calls instead of one because each iteration re-attached the full prior hโฆ