Learn / AI FinOps for coding agents
AI FinOps for coding agents: where a pre-action gate helps with spend
5 min read · For teams running Claude Code and other coding agents with real credentials
TL;DR: Managing AI spend is now standard FinOps work. Most of the tooling reports spend after it happens. Coding agents add a different cost: an action that spends money on its own, such as a purchase, a paid API call or an ad change, or a costly call the agent repeats. A pre-action gate sees each tool call before it runs. ThumbGate denies purchase and payment calls unless a person approved them, and turns a thumbs-down on a costly call into a rule. It does not cap tokens or dollars, so keep your provider's spend limits on.
What the 2026 numbers say
- AI spend is now a FinOps job. In the FinOps Foundation's State of FinOps 2026 survey, 98% of 1,192 respondents manage AI spend, up from 31% two years earlier. These respondents are FinOps practitioners, not a sample of all companies.
- Overruns are common. McKinsey reported in July 2026 that 93% of the respondents in its survey exceeded their AI budgets. In a WitnessAI survey of 300 executives, reported by CFO Dive, 68% said at least some AI initiatives ran over budget.
- Pricing has moved ahead of cost tracking. In CloudZero and Benchmarkit's 2026 survey, 84% of companies price AI into their products, but only 43% track AI costs by customer.
- The billing data standard is catching up. FOCUS 1.4, the FinOps Foundation's open billing data specification, was ratified in June 2026. Native fields for AI model identity and token consumption are planned for the next version, 1.5, which is still in progress.
A figure you will often see quoted is "73% of organizations exceeded their AI budgets." We could not trace it to a primary source, so it is not used here.
Two kinds of agent cost
FinOps tools are built for the first kind. Coding agents add the second.
- Consumption cost: tokens, GPU hours and cloud resources. These are metered by the provider and show up on a bill. Dashboards, tags, budgets and provider spend limits are the right tools.
- Action cost: what the agent does with the credentials it holds. Examples include buying a plan, raising an ad budget, creating a payment, starting a paid job, or running the same expensive command again after it already failed. These look like ordinary tool calls until the invoice arrives.
A budget alert tells you about action cost after it has happened. The only point where you can stop it is before the tool call runs.
What ThumbGate does before the call runs
- Purchase and payment calls need a person's approval. A tool call that looks like spending money is denied unless a person approved a purchase request first. That covers Stripe, PayPal and Square payment APIs, cloud billing consoles, ad managers, and commands to buy, subscribe or confirm a checkout. This check stays a hard deny even in warn-by-default mode, and the attack matrix in the public test suite covers it.
- A costly call becomes a rule. When an agent burns money on something, give that call a thumbs-down, for example a full test suite run in a loop, a paid API call made without need, or a deploy that triggers a rebuild. ThumbGate turns it into a prevention rule that matches on the tool and its arguments. The next matching call is flagged, or blocked in strict mode, before it runs.
- Approvals leave a record. An approved purchase is written to a hash-chained ledger, so deleted or reordered entries are detectable, and you can see afterwards why a spend call was allowed.
What it does not do
- It does not cap tokens, model spend or a monthly dollar amount. Set those with your model provider's and host's spend limits and alerts.
- It does not detect a loop by counting calls. It stops calls that match a rule. A brand-new mistake runs once before a thumbs-down can turn it into a rule.
- It does not replace cost allocation. Tagging, showback and the FOCUS data still belong in your FinOps tooling.
A short checklist for agent spend
- Turn on provider limits. Use spend limits or usage alerts on the model provider and on the host your agent can deploy to.
- Give agents the narrowest billing access. An agent that never needs to buy anything should not hold a payment key.
- Gate the actions that spend. Install a pre-action gate so purchase and payment calls need a person's approval.
- Turn every expensive surprise into a rule. After an overrun, find the tool call that caused it and give it a thumbs-down, so it cannot repeat unnoticed.
- Measure cost per successful outcome, not just cost per token. A cheap run that has to be redone is not cheap.
Sources
ThumbGate is not affiliated with the FinOps Foundation, McKinsey, WitnessAI, CloudZero or Benchmarkit.
Gate the actions that spend
Start with one call your agent should never make without asking you.
npx thumbgate init