Yuval Avidani
Author
Uber burned through its entire 2026 AI budget in four months, then slapped a $1,500-per-month-per-employee cap on every coding tool. This isn't a story about one company that went overboard. It's a story about every dev team that let coding agents like Claude Code and Codex run free, and found out at the end of the month that the bill arrived before the payoff did.
In this guide we're taking one team, walking through it from start to finish, and building three things together: a copy-paste token policy, routing between models through a single gateway, and cheap models for subagents. Let's break it down.
The Bill That Arrives After the Excitement
The example we'll carry through this whole piece: the Payments team, 20 developers, all working with Claude Code, all left the most powerful model as default "because it's the best." A month later, an email from Finance arrives with one question: why did the bill triple?
Turns out that's exactly what happened at Uber. According to Bloomberg, the company burned through its entire year's AI budget in the first four months, then set a $1,500-per-month cap per employee for every agentic coding tool (an agent that writes and runs code on its own), like Cursor and Claude Code. Each tool has its own budget, every employee gets a dashboard showing their usage, and there's a formal process to request an exception. Worth noting: these details come from journalistic reporting (Bloomberg and secondary press), not an official Uber announcement.
The more interesting part is what Uber's COO, Andrew Macdonald, said in an interview with Fortune: the link between growing Claude Code usage and features actually reaching customers "isn't there yet." In other words, consumption was measured beautifully — the outcome wasn't.
And it's not just Uber. Stack Overflow's 2026 Developer Survey, published October 6th with over 30,000 respondents, shows organizations are already starting to manage this:
According to the survey, 38% reported their organization has placed usage limits on AI, and 27% already use different models for different jobs. Another 28% review spending data, and 25% restrict who even gets access. Meanwhile, 75% say they prefer quality over price when choosing a model. That's the whole tension, right there in two numbers.
Why It's Hard to Set a Cap Without Choking the Team
The problem is we've got three different kinds of "cap," and they don't talk to each other.
The first is the subscription limit. Claude's Pro and Max plans have a five-hour session limit (a rolling window starting from your first message) plus a weekly limit, shared between chat and Claude Code. So a developer who burns through the quota on a big refactor in the morning can find themselves stuck by noon. Think of it like a data plan: it doesn't run out of money, it runs out of time, at the worst possible moment.
The second is a change in the vendor's terms. According to OpenAI's DevDay announcement, as reported by The New Stack and TNW, starting October 30th the quota for Codex and ChatGPT Work on the $200 Pro plan drops from 20x the Plus plan down to 10x. Existing subscribers keep the old quota until October 29th. If you planned your quarter around the old numbers, time to recalculate.
The third is pay-per-token (the units of text the model reads and writes, roughly three-quarters of an English word). Here there's no natural ceiling at all. Every file the agent reads, every test output, every subagent it spins up — it all goes on the bill.
And wrapped inside all of this is what DORA's ROI report (Google Cloud's research team) calls the "J-curve": a temporary productivity dip before the climb, caused by the learning curve and the "verification tax" of reviewing AI-written code. In the report's example, a 500-engineer org invests $8.4 million and gets a 39% return in year one, with payback in about eight months. DORA's conclusion is that the big payoff comes from the quality of your organizational systems, not the tools themselves. If we choke the team halfway up the curve, we simply never reach the part where it pays off.
A Token Policy for Your Team: A Template You Can Copy
Back to our Payments team. The goal isn't to "save money" — it's to know exactly where every dollar is going and route it to wherever it pays off most. Here's a template I recommend, built on Anthropic's official cost-management guidance:
In short, for those reading without the widget: start with a two-week pilot on a small group and establish a baseline using the /usage command and spend reports. According to Anthropic, in enterprise deployments the average is about $13 per developer per active workday, $150–250 per developer per month, and 90% of users stay under $30/day. Next, set up two tiers: a default budget per developer, and a "heavy users" tier with a higher ceiling and a formal exception process — exactly like Uber did. Third, set a default model by type of work. Fourth, require a hard cap on every automated CI run. Fifth, review the data weekly and shift budget to wherever it's actually paying off.
The cool part is most of the tooling already exists. Claude for Teams and Enterprise have spend limits at the organization, group, and individual-employee level. The Console has spend limits per Workspace. And in any setup you can export metrics through OpenTelemetry (an open standard for sending metrics to your monitoring system) and see cost per developer nearly in real time.
Cheap Models for Subagents: The Highest-ROI Move You Can Make
A Subagent is a small helper that Claude Code sends off to handle a side task, like searching the codebase or running tests, and it only reports back a summary. Think of it like an intern you send to the archives: they read hundreds of pages and come back with a one-page summary. There's no reason that intern needs to be the most senior, most expensive partner in the firm.
Turns out that's exactly what happens by default on a lot of teams. According to the official docs, the built-in Explore subagent runs on Opus when working against Anthropic's API, and other subagents inherit the model from the main conversation. So if the Payments team is working on Opus, every file search is also running on Opus.
Let's do the math using the official API pricing. A typical search-agent run reads, say, 80,000 tokens and writes 5,000. On Opus 5.5 ($4 per million input tokens, $20 per million output tokens) that's about 42 cents. On Haiku 5.5, which costs $0.10 per million input and $0.50 per million output as long as the prompt is under 100,000 tokens, the same run costs less than a penny. The difference is roughly 40x, and that's exactly where most of your tokens are going up in smoke. Rough math, no cache discount: 15 such runs a day, 21 workdays, 20 developers — the monthly gap is roughly $2,650 versus $66.
One catch worth flagging: on Haiku 5.5, a request whose prompt crosses 100,000 tokens pays a 5x higher price. So give your search agents focused, narrow tasks. And one more thing: we're not downgrading the main model. Anthropic itself recommends Sonnet for most coding tasks and Opus for architecture decisions, and that's exactly the structure here: expensive brain at the center, cheap hands in the field.
Here's what it looks like in practice. One file in the repo that swaps in a Haiku-powered version of the built-in Explore agent, and one CI command with a hard cap per run:
If you want to roll this out to the whole team at once, there's also an official environment variable, CLAUDE_CODE_SUBAGENT_MODEL, that sets a default model for all subagents, and you can deploy it through your organization's managed settings.
Routing with magpie: One Gateway, Many Models
The next step is Routing: instead of every developer manually deciding which model and which account they're working against, a single gateway decides for them. magpie is a local, open-source gateway that runs coding agents like Claude Code, Codex, and Gemini CLI against any model you choose, built for teams working with more than one agent, provider, or account. As of today it has around 16,500 stars on GitHub and an MIT license.
Think of it like a switchboard: every agent dials one number on your machine (127.0.0.1:3425), and the switchboard routes each conversation to the right provider. It speaks OpenAI's, Anthropic's, and Gemini's protocols and translates between them, including tool calls.
The part that matters for budget is Routing groups: several models or accounts that the agent sees as a single model. When one account's quota runs out, the gateway just moves to the next one in line, and the agent doesn't even see an error. There are a few modes: in smart mode, it uses whichever subscription refreshes soonest first, so less quota gets wasted on reset. In order mode, it cycles through a fixed sequence. In pace mode, it picks whichever account has the most weekly quota left relative to time elapsed. There's also intent-based routing, where a small model reads every request and sends heavy tasks to the strong model and short questions to the cheap one. And for a team, you can share the gateway over your local network and give every client its own token cap and daily, weekly, or monthly cost ceiling.
I think it's important to flag the caveats too. This is a third-party tool that reads your agents' login credentials off your machine (you can turn that off in settings), and it sends basic telemetry once a day, which you can opt out of. Before you route a Claude or ChatGPT subscription through another tool, check the provider's terms of service. And a cheap model isn't always an equivalent substitute — you need to measure it against your own tasks before routing real work to it. And yes, there are plenty of other "gateways" out there on the market promising a free model. Those, I'd recommend skipping.
My Take: A Budget Isn't a Brake, It's a Steering Wheel
Bottom line: our Payments team doesn't need to work less with agents. It needs to work smarter — Sonnet as the default model, Opus when you genuinely need it, Haiku for all the grunt work of subagents, a hard cap on every automated run, and a gateway that shifts work between accounts instead of making a developer sit and wait five hours.
The lesson from Uber isn't that coding agents are too expensive — it's that they measured usage instead of measuring outcome. A leaderboard that rewards token consumption creates exactly what it measures: token consumption. My recommendation is to measure dollars per pull request merged, per bug closed, per feature that actually reached a customer.
And it's only fair to be upfront about the limits here. Prices and quotas shift every month, so every number in this piece is accurate as of October 19, 2026. Our math ignores caching and extended thinking, both of which can swing the bill in either direction. And the Uber numbers come from press reporting, not from the company itself.
So here's the question I'll leave you with: if you had to justify every token dollar to your CFO tomorrow, what outcome metric would you put right next to it?
Want to Go Further With This?
Everything we covered here — subagents, models, Hooks, team settings, and context management — I break down in depth in my Claude Code Mastery course, in English.
If you prefer Hebrew and want to build agents, Skills, and automations with Claude, check out Practical AI with Claude.
I post these demos, configs, and benchmarks on YouTube and LinkedIn, with regular updates on X, Instagram, and TikTok. My code lives on GitHub.
