Where AI spend leaks, and how engineering leaders keep it under control.

What published analyses and our conversations with enterprise engineering teams show about governing AI at scale: where the waste hides, why one-off fixes fade, and what the teams getting it right do differently.

For VPs of engineering, platform and AI platform leads

·

4 min read

·

Published Nov 3, 2026 · XTrace research team

Research brief

From one team’s fix to every team’s policy.

In short

  1. Waste is quiet.

    Agents rarely fail loudly. They retry and work around errors, and it looks like normal usage growth.

  2. Small bugs, big bills.

    A handful of ordinary tool bugs can add up to seven figures a year at enterprise scale. Clearer errors cut the cost of each one.

  3. Audits fade.

    A one-time cleanup finds today’s problems. New ones ship with the next tool release.

  4. Caps backfire.

    Hard usage limits make people wait instead of work. Routing and waste removal stretch budgets further.

Quiet waste

A day of traces can surface seven figures of yearly waste.

In a published analysis, Databricks reviewed a single 24-hour window of tool-call traces from its own AI gateway. It found seven ordinary bugs in internal tool servers causing about 1,400 errors a day. Its estimate of the yearly cost: about $499K in wasted tokens and roughly 12,000 hours of agent wait time, around $1.2M in lost productivity in total.

The agents didn’t crash. They retried, guessed and finished the task anyway, so on a cost dashboard the waste looked like growth.

From a handful of bugs to a seven-figure estimate

Databricks’ own figures, not XTrace results

Redrawn by XTrace. Wait time is the remainder of Databricks’ ~$1.2M total. Annual figures are Databricks’ estimates, extrapolated from one day of traces.

Error quality

Clear error messages cut recovery cost by more than half.

In the same analysis, agents needed about 13 turns on average to recover from a misleading error, and under 5 when the error explained what went wrong. The quality of the tools your teams build is a cost lever, not just a developer-experience detail.

Average turns for an agent to recover from an error

Each square is one turn

The fifth square is outlined: Databricks reports “under 5”. Redrawn by XTrace.

SOURCE Databricks (as above).

Why audits fade

One-time audits find today’s problems. New ones arrive next week.

Every new tool, model and team adds fresh failure modes, so a one-time cleanup starts to decay as soon as it ends. In our conversations with enterprise teams, the hard part is not finding a problem once. It’s making sure a fix found by one team reaches every other team using the same tool.

Waste over time: a one-time audit vs. continuous monitoring

Schematic, not measured data

Illustrates the pattern described above; the shape is not drawn from data. Databricks’ authors also recommend repeating their audit regularly for this reason.

Caps vs. routing

Caps slow work down. Routing and attribution stretch the budget.

  • Hard caps backfire

    A per-person token limit doesn’t make work cheaper. It makes people stop and wait for tomorrow’s allowance, with the work half done.

  • Cost per token is not enough

    A token price says nothing about whether the spend was worth it. Trace it from tokens to tasks to the workflow outcome, and it becomes something you can defend.

  • Upgrades matter

    Models and inference software improve quickly. Staying on last year’s setup quietly leaves performance and savings on the table.

Common approaches

Three ways companies govern AI today, and the gap they share.

Limits and alerts

Budgets and caps with notifications after usage. Good for visibility; reacts after the money is spent.

Per-repo recommendations

Reviews of how agents are set up in each codebase. Useful fixes, but they stay with one team.

Access gateways

Control which models and tools each team can call. Strong at the front door; little learning from what happens after.

The gap: few approaches close the loop, from what happened in a session back into policy for every team.

Based on a review of public product pages, November 2026.

What this means for you

Four questions to ask about your own AI spend.

Do routine tasks default to an efficient model?

If nobody set a default, your premium model is doing boilerplate.

Can you see repeat errors by tool?

Quiet retry loops only show up if you trace every call.

Does a fix in one team reach the others?

If not, every team pays to discover the same problem.

Can you name the workflow behind your top spend?

Spend without a workflow can’t be defended or improved.

How XTrace approaches it

The AI gateway runs the routing, caps and tool access you’ve set, and recommends changes based on what it sees in traffic. Your platform team reviews and approves them in XTrace. Repeat failures are different: XTrace keeps finding them and fixes them on its own, and the XTrace plugin enforces each fix inside every team’s AI tools. Review is optional, for teams that want to see each fix first. XTrace reports cost per outcome and budget vs. actual.

Sources

For anyone checking our work.

  1. Databricks, Sept 2026

    “How we eliminated $1 million a year of wasted AI agent spend in one hour”