Podcast about DevSecOps

#104 - When AI Coding Gets 10x More Expensive

Copilot’s token billing turns everyday coding habits into budget decisions.

15 min read

Is flat-rate AI coding coming to an end? Mattias, Paulina, and Andrey discuss Copilot’s token billing, runaway API costs, and why an expensive model can sometimes be the cheaper choice.

Discuss the episode or ask us anything on LinkedIn


Your tooling budget just became a meter

The budget line called developer tooling used to behave like rent. A seat cost what a seat cost, and your heaviest user cost the same as the person who opens the editor twice a week. Across most of the market that line now sits on a meter, and what you pay at the end of the month depends on how people worked during it. The other AI line item, the product that calls a model in the background, has always run on a meter with no seat price to anchor it. If you haven’t configured a spending limit there, a runaway program can keep adding charges.

Price an ordinary day against the new meters and the shift shows up fast. Our estimate put comparable work near $20, versus $2 to $3 under the old pricing, for the same way of working. Nobody has to change a habit to get there.

We read the flat rate as a subsidy more than a price, and we expect those subsidies to keep draining out. Cursor repriced in June 2025, Anthropic rations subscriptions with a five-hour window and a weekly cap, AWS Kiro hands out a monthly credit allowance that doesn’t roll over, and Copilot has now followed. The unit is moving from the request to the token, which prices a long agent run as the expensive thing it is. Plan as though your own included allowance is temporary. The useful question is not whether AI coding earns its keep. It is which of the tokens you buy you were ever going to use.

What token billing does to a Copilot bill

Start with the mechanics, because a lot of the panic in teams is being argued without them.

What replaced Copilot’s premium requests?

GitHub AI Credits, which drain according to the tokens you send and receive.

On 1 June, Copilot stopped charging for requests and started charging for tokens. GitHub’s announcement says credits are consumed from input, output and cached tokens “according to the published API rates for each model”. Seat prices didn’t move.

The included allowance did, and on the individual plans it now has two parts. Base credits match the subscription price one for one and don’t change. A flex allotment sits on top, and GitHub says that part will vary over time. A second post on 12 May set the figures that took effect on 1 June: Pro at $10 plus $5 of flex, $15 in all; Pro+ at $39 plus $31, $70; and a new Max plan at $100 plus $100, $200. Business and Enterprise sit outside that post, with credits matching the seat price, $19 per user and $39. Annual plans stay on request-based pricing until they expire, and existing Business and Enterprise customers got promotional credits for June, July and August.

The allowance also differs by who bought the seat, and that’s what changes behavior. On Business and Enterprise, credits pool across the organization instead of sitting in each seat, so whoever runs agents overnight draws on the same pool as the person who asks two questions a day. What happens when that pool empties is an admin’s decision: allow further usage at published rates, or cap spend there. Pro, Pro+ and Max have neither the pool nor the admin. Your credits are yours, and you buy more when they run out.

What nobody gets any more is the soft landing. Under premium requests, exhausting your allowance dropped you to a lower-cost model and you carried on. The announcement ends that: “Fallback experiences will no longer be available”. Credit-consuming features now wait for more credits or the next monthly allotment, while code completions and Next Edit suggestions consume none and keep running on all plans.

GitHub’s stated reason is hard to argue with: “Today, a quick chat question and a multi-hour autonomous coding session can cost the user the same amount.” What neither post settles is the per-model rate, so you can’t price your own month from them. You have to measure it.

The second budget, the one with no ceiling

A coding seat at least starts from a seat price. The other AI line item has no anchor.

Why does a runaway program cost so much before anyone notices?

Because API access bills purely on consumption: no subscription, no window, no natural stopping point.

AWS Budgets refreshes up to three times a day on billing data that already lags the spend, which makes a budget action a backstop, not a brake: the loop runs between refreshes and nothing fires.

Faster enforcement lands in IAM, but IAM notices nothing: permissions decide whether a principal may call Bedrock, not how much it spends, so something outside has to count and rewrite the policy. FivexL published a worked version in May 2026. Give the workload its own application inference profile, so its InputTokenCount and OutputTokenCount arrive in the AWS/Bedrock CloudWatch namespace on their own, and force the role through it with a bedrock:InferenceProfileArn condition on the statement that allows bedrock:InvokeModel*, as AWS documents. Without it the role calls the model directly and the metrics miss it. Price those two metrics with metric math against the AWS Price List, then alarm on the result: a warning at 3 percent of the monthly limit in a day, a block at 9 percent in a day or 45 percent in seven. The alarm invokes a Lambda that attaches an explicit deny to the role, lifted by hand afterwards. Name the right actions in it. The Converse API operations are gated by bedrock:InvokeModel and bedrock:InvokeModelWithResponseStream, so a deny naming bedrock:Converse denies nothing.

The alarm reads estimated spend, not billed spend, which is why the post’s own verdict is that “CloudWatch is not a hard limit”. It is not a monthly one either: 6 percent of the limit a day never blocks, and you end the month at roughly 180 percent of budget. Treat it as a spike-triggered stop, with a monthly budget behind it for the overrun that never spikes, and keep a loop guard in the program: none of this stops a call in flight. Anthropic caps monthly spend per workspace in the Console, with alert thresholds below the cap.

The same account is where a coding agent can run. Point Claude Code or OpenCode at Bedrock and you trade the subscription subsidy for list API rates, with the calls running as a role in your account, under your conditions, your logs and the cap above. An agent installed into a GitHub Actions runner reviews code under that same identity.

Context is a budget you spend before you type

Capping the account is the outer loop. The inner one is how much context each turn carries, which under per-token billing is the same question as what each turn costs.

Does a million-token context window mean you can stop managing context?

No. Quality falls off well before the limit, and you pay to resend the whole thing every turn.

Chroma’s Context Rot report tested 18 models across eight input lengths and found they don’t use context uniformly: performance grows less reliable as input grows, even with the task held constant. Our working rule, as far as we can tell from using them daily: you’re at your best under 100k tokens, still fine up to 200k, and clearly degrading past that. Beyond it you’re either compacting constantly or paying to resend a very large prompt every turn.

Much of that budget is spent before you type anything. The system prompt, your AGENTS.md and the tool definitions from every connected MCP server load at session start, in a client that loads all of them upfront. Not every client does any more. Anthropic’s advanced tool use work puts a tool search tool in front of the catalogue, so a tool or a whole MCP server marked defer_loading: true is discovered on demand. Check what your own client loads before you blame the servers.

Teams build the same shape by hand: namespaces or toolboxes arranged as a tree, so a request to change something in Jira resolves to Jira first and then to one of its ten tools, instead of putting all ten in front of the model.

The cheap model is not always the cheap option

Once you know what a turn costs, the obvious move is to buy cheaper turns. That’s half right, and the other half is where the money is.

When is the expensive model the cheaper choice?

When it reaches a result you would ship in fewer passes than the cheap one needs.

The uncontroversial half first: a two-line change doesn’t need the biggest model on the list, and plenty of people reach for it anyway because it’s the one they’ve heard of. For simpler implementation tasks a smaller model can reduce cost, and whether it does depends on the task, so compare completed results and retries before you switch.

Then the part we disagreed about. Mattias wants tiers: run the first pass with a cheaper model to catch the obvious problems, escalate only when it falls short. Andrey warns that a weaker first pass can require enough retries to cost more. Both describe the same arithmetic from opposite ends. When you’re debugging something live, the round trips also cost you time you don’t have.

The routing is yours to set at both ends. Claude Code’s opusplan plans on Opus and implements on Sonnet, and has stayed configurable in settings.json since 2025. The background traffic is configurable too, and that’s the end people forget. Side queries such as titling a session go to a Haiku-class model, and ANTHROPIC_SMALL_FAST_MODEL sets which model that is. Against Bedrock, Vertex, Foundry or a gateway, that Haiku model ID may not be available. Leave the variable unset there and the side queries land on your main-loop model instead. The v2.1.141 release notes from 13 May describe that fallback. That is your most expensive model writing session titles, so set the override and recheck it after a backend change.

Running the model on your own hardware is the other way to change the rate, and for agentic coding it isn’t the exit yet. A Mac mini runs a personal assistant well, and Mac minis sold out across Denmark, which tells you how many people are trying it. A coding agent asks for a well-specified laptop with a lot of memory, and memory is what’s repricing: TrendForce projected conventional DRAM contract prices rising 58 to 63 percent quarter over quarter in the second quarter of 2026. That covers DRAM contracts rather than finished machines, so benchmark tokens per second on the job you repeat first.

Measure before you cut

All of the above assumes you know where your tokens go, and most teams don’t.

Is a provider dashboard enough to manage this?

Not for this question. The admin view in Claude reports adoption rather than cost: lines of code accepted, suggestion accept rate and usage patterns. None of those numbers tells you what one task cost or which model spent it, which is what a routing decision turns on.

More detail is there if you go and get it, and the route depends on how your developers sign in. Anthropic’s Claude Code Analytics API breaks usage down by model, with input, output and cache tokens and an estimated cost in cents, but only for Claude Code authenticated against your Claude Console organization. Sign in with a Pro, Max, Team or Enterprise subscription instead and that usage sits in your claude.ai organization, which the same page says this API doesn’t return. For those seats Anthropic points at OpenTelemetry export, which it says works on any plan: set CLAUDE_CODE_ENABLE_TELEMETRY=1, point the exporter at your collector, and claude_code.token.usage and claude_code.cost.usage land beside your other metrics.

Attribution on your own backend takes the same kind of work. “Bedrock doesn’t offer per-key or per-user cost attribution”, as AWS Solutions Architect Guy Menahem wrote in February 2026, so you get it by giving a workload its own inference profile and tagging it, or by running a gateway in front that issues a key per developer and holds the budget.

The levers worth pulling, in rough order of effort:

  • Don’t run an automated review on all ten commits when the last one, or three of them, tells you the same thing.
  • Prefer five small pull requests to one carrying five user stories, because the review context is smaller each time.
  • Strip command output before it reaches the model. RTK, a single-binary CLI proxy, filters the output of common dev commands on the way in. It claims 60 to 90 percent savings; in our own use it’s closer to 50 to 60, and the free version is enough.
  • Go lower with hooks: measure each tool output and strip or reject the large ones. The risk is cutting the part you asked for.

One lever depends on who pays: handing commits and pushes to the agent spends tokens on work you could do yourself, which is a fine trade on an employer-paid plan nobody is close to exhausting, and the first thing to take back on your own.

What this means for teams

The posture your company takes decides most of this before any engineer opens an editor. Some have made AI usage a performance metric, which is a reliable way to make the bill go up. Others cap hard enough that people burn the month’s allowance in two weeks and then sit on their hands. The middle ground is where the actual work is: let people use the tools, and teach cost-effectiveness the way you taught it for cloud. Something new is turning up on the other side of that conversation, in hiring: alongside the laptop and the conference budget, a candidate might ask what their token budget would be.

Four things worth doing this week:

  • Price one real day. Take a normal day’s work and compare what it bills under your old plan and your new one. The number is more persuasive than any forecast.
  • Bound every API path a program can reach, twice over. A monthly spend cap on the provider workspace, and on Bedrock an alarm on the workload’s own token metrics that attaches a deny to the role. The alarm catches spikes, so put a monthly budget behind it and keep a guard in the program.
  • Count what loads at session start. List your connected MCP servers, check which of them your client loads upfront, and drop the ones you pay for on every turn without using.
  • Price a finished task, not a token. Pick one job you repeat, run it on the cheap model and the expensive one, and compare the billed cost of each run that reached something you would ship.

Common questions, answered

How do I stop a runaway AI agent from running up a $5,000 AWS bill?

Meter the tokens in CloudWatch and let an alarm attach the deny. AWS Budgets refreshes a few times a day on data that already lags, so it is a backstop, not a brake. Give the workload its own Bedrock inference profile and force its role through it with the bedrock:InferenceProfileArn condition, or the call skips the metrics. Price those metrics with metric math and alarm on the result. That catches a spike, not a slow overrun, so keep a monthly budget behind it and a guard in the program.

Why did my Copilot bill go up when the subscription price stayed the same?

Because the price now buys a credit allowance that drains with your tokens instead of a quota of requests. Since 1 June, Copilot draws GitHub AI Credits at each model’s published rates. On the individual plans the allowance is base credits matching your seat price plus a variable flex allotment: $15 a month on Pro, $70 on Pro+, and $200 on the new $100 Max plan. Business and Enterprise get credits matching the seat price, $19 per user and $39, pooled across the organization, so heavy sessions drain a shared allowance early. The old soft landing is gone too: an empty allowance no longer drops you to a cheaper model, it stops credit-consuming features until the month resets or you buy more.

Should I stop letting my coding agent commit and push to save tokens?

On an employer-paid plan you’re nowhere near exhausting, no: the tokens buy an afternoon you enjoy more, on somebody else’s budget. On your own subscription, or under a cap you hit before the period resets, routine git work is the first thing to take back, easy to do yourself and dull work to pay a frontier model for.

Resources

Since we recorded

GitHub’s promotional credits for existing Business and Enterprise customers covered June, July and August only, per the original announcement, so since 1 September those organizations have worked from the standard allowance of $19 and $39 per user. We came back to the per-token question in Episode 113, Books, Juniors and Mattias’s Dark Factories, where an unattended pipeline bills per token by choice and routes each task to a different model, and the cheap tier has become cheap enough to change which model gets which job. The advice here held through that: price the finished task, not the token, and recheck the routing when the rates move again.