Why agentic coding tools are quietly wrecking people's API budgets
Been watching a pattern play out with devs using Claude Code, Cursor, and Codex-style agent loops: nobody budgets for the fact that agents don't make one call per task, they make dozens.
A single "refactor this module" prompt can trigger a chain of tool calls, retries, and context re-reads — each one a full priced API call if you're on the official list price. That's fine for a $20/month subscription tool with fixed usage, but the second you're hitting raw model APIs directly (which most agent frameworks do under the hood), the meter runs a lot faster than people expect.
A few things that actually help:
Cache aggressively — a lot of agent frameworks re-send full context on every step. If yours supports prompt caching, turn it on.
Route cheap tasks to cheap models — not every tool call needs your top-tier model. Use a fast/cheap model for classification-style steps, save the expensive one for actual reasoning.
Watch your cost-per-endpoint, not just cost-per-model — the same model can have wildly different pricing depending on which provider/route you hit it through.
That last point is basically why we built Relay Fast — one OpenAI-compatible endpoint in front of GPT and Claude, with select routes priced up to 98% below official list. Pay-as-you-go, no subscription, so it scales down when your agent isn't running and up when it is.
If you're running heavy agent workflows and haven't audited your actual per-task cost lately, worth doing — it's usually higher than people think.
