# Where Your AI Coding Budget Actually Goes: Retry Loops, Broken Caches, and Over-Provisioned Models

> Monthly LLM invoices keep climbing while teams have no idea which repositories, stale instructions, or silent retry loops are burning half the budget.

- **Published:** 2026-09-24
- **Category:** Agent Ops & Cost
- **Author:** 23step Engineering (Agent Ops & FinOps)
- **Reading time:** 7 min
- **Featured 23step offering:** Stride + Team Analytics
- **Canonical URL:** https://23step.com/blog/cutting-ai-coding-spend-without-downgrading-output

## Key takeaways

- Most wasted AI coding spend comes from three fixable operational leaks: repeated retry loops, broken prompt cache reuse, and running frontier models on routine boilerplate.
- Inspecting usage, cache hit rates, and retry churn by repository and engineer turns opaque provider bills into concrete engineering fixes.
- 23step Stride scores execution efficiency 0–100 and converts recurring build and test stumbles into copy-ready AGENTS.md rules that prevent the loop from happening again.

## Why provider invoices tell you how much—never why

Every engineering VP sees the same chart in Q3 2026: aggregate AI coding spend rising month over month across Claude Code, Cursor, Codex, Antigravity, and Gemini CLI. Yet provider billing dashboards only show aggregate spend by API key or seat. They never tell you *which task* burned $14 in six minutes.

When teams instrument actual sessions, the distribution is almost always Pareto-skewed. A small fraction of runs—typically 10% to 15%—accounts for more than half of total compute spend. And those expensive runs are rarely the hardest architectural tasks; they are ordinary tasks trapped in avoidable friction.

## Four levers that cut AI spend 30–50% without slowing engineers down

Blanket caps or forcing engineers onto weak models backfire immediately—people switch tools or waste hours fixing bad output. Sustainable AI FinOps attacks waste instead of capability:

- **Kill retry loops at the root:** An agent that fails `go test` or `npm run build` six times because it did not know a required local setup flag burns full context on every single retry.
- **Protect prompt cache hit rates:** Watching input vs. cached vs. output usage per run reveals when dynamic system prompts, oscillating tool definitions, or oversized rule files break cache reuse.
- **Right-size models by workload:** Compare completion rates and runtime across models on your actual repositories so top-tier reasoning models handle complex architecture while fast models handle mechanical edits.
- **Eliminate duplicate discovery:** Handing a recorded run over MCP stops the next agent from re-reading forty files to rediscover the exact same codebase context.

> **Compound savings — One AGENTS.md line can save hundreds of runs:** When an agent hits a missing database flag or non-standard lint command, documenting that exact command in AGENTS.md eliminates the retry loop for every engineer and every agent on the team permanently.

## Automated efficiency audits with Stride and Team analytics

Reading session timelines to hunt for wasted loops is valuable once—automating it is transformative. **Stride** analyzes completed 23step sessions to score execution efficiency from **0 to 100**, highlight exact command retries, repeated file edits, and dead-end searches, and compare what happened against the cleanest path to green.

Best of all, Stride drafts **copy-ready `AGENTS.md` rules** straight from observed stumbles. Pair Stride with the **23step Team plan** usage and cost dashboard—tracking model spend, cache hit ratios, runtime, and completion outcomes across organizations, teams, squads, and individuals with CSV export—and engineering leaders finally get FinOps visibility tied directly to real code.

**Example AGENTS.md rule drafted by Stride** (Generated automatically after 4 sessions tripped over local Postgres test setup)

```text
## Verification & Local Tests
- Run web-app tests with `TEST_DB=sqlite go test ./internal/...` when Docker is not running.
- Run `npm run check` inside `web/` before `npm test` to catch Astro type errors early without rebuilding dist/.
```

## Turn AI spend from a mystery line item into an engineering metric

Check the live [usage and cost dashboard overview](/#dashboard), enable [Stride](/marketplace/stride) for 1 AI credit per audit, and upgrade to the [Team plan](/pricing) ($80/mo for up to 8 seats, 15,000 runs, and 600 pooled AI credits) when you want org-wide spend, cache, and efficiency analytics with CSV export.

## Try Stride + Team Analytics on 23step

**Spot retry loops, boost cache hits, and turn recurring friction into AGENTS.md rules.**

Stride scores session efficiency 0–100 and generates copy-ready AGENTS.md rules from real build stumbles (1 AI credit / audit). Pair it with the 23step Team plan for org, team, and engineer usage, cache, and cost analytics with CSV export.

- 0–100 Execution Efficiency Score with retry-loop and file-churn diagnostics
- Copy-ready AGENTS.md rule generator grounded in real command failures
- Team plan ($80/mo): 15,000 pooled runs, 600 shared AI credits, 8 seats & CSV cost exports

*Stride is included on every plan (1 AI credit / audit). Full team usage, cache, and cost analytics with CSV export are included on Team ($80/mo) and Enterprise.*

- [Explore Stride](https://23step.com/marketplace/stride)
- [View Team plan pricing](https://23step.com/pricing)
