A 3-step agent cost me $4.20. agenttrace showed me the O(n ) tool call hiding in plain sight.
I expected a 12 cent run. I paid $4.20. The trace showed one tool result getting re-issued on every subsequent step, with the full prior history attached each time. Here is the Rust crate I used to find it.