Clawgate Clawgate
Cost control

How to Control Claude Code Costs Across Your Team

To control Claude Code costs you need three things: visibility into who spends what, hard budget limits that actually stop spend, and control over which model runs each task. Get those three in place and the bill stops surprising you. Clawgate does all three from one dashboard, and it also cuts the tokens Claude Code resends every turn and flags abuse, so you leave with more than a meter.

This guide walks through each lever in order, from tracking spend to setting caps to picking cheaper models to compressing context. You can use any of them on their own. Together they are how teams reduce Claude Code costs without slowing anyone down.

Why Claude Code costs climb fast

Claude Code isn't expensive because someone is careless. It's expensive because agentic coding burns tokens by design, and three things make it worse:

  • It picks its own model. Left alone, a coding agent will reach for a top-tier model even for small edits, and the priciest model can cost many times more than a capable cheaper one for the same task.
  • It resends large context every turn. Long sessions and big codebases mean the same background is pushed to the model again and again, and you pay for those tokens each time.
  • You can't see the spend until the bill arrives. There is no live per-person view in the tool itself, so the total shows up at the end of the month as a mystery you can't break down.

Anthropic's own documentation puts the average at roughly $13 per developer per active day, or about $150 to $250 per developer per month, with the heaviest users well above that. Multiply that across a team and add Codex for the developers who prefer it, and the cost becomes a spreadsheet you can't read. The fix isn't to ration AI. It's to put a control layer between your team and the providers so the productivity stays and the surprises stop.

Lever 1: Track spend by user and project

You can't control what you can't see, so start here. The goal is to know, at any moment, which developer and which project is driving the bill, without asking anyone to tag their requests by hand.

A gateway makes this automatic. With Clawgate every key is tied to one person and one project, so per-user and per-project cost is tracked live and historically the moment a request goes through. You can sort by who spent the most this week, watch a single project's burn rate, or bill a project's cost straight back to the right client or team. There is no metadata discipline to enforce, because attribution is a property of the key itself.

For a deeper walkthrough of the reporting side, see how to track Claude Code usage across a team.

Lever 2: Set hard caps in dollars, tokens, or sessions

Visibility tells you what happened. A hard cap decides what can happen next. This is the difference between an alert that arrives after the money is gone and a limit that blocks the request at the line you drew.

Clawgate budgets are hard stops. You set daily and weekly caps in dollars, tokens, or sessions, per developer and per project, from the dashboard. When a limit is reached the request is blocked and the developer sees why. It returns a 403 rather than a 429, which matters because coding agents silently retry a 429 and never surface the limit message. Project budgets add an all-time spend cap that is checked before user quotas, so a runaway project can't quietly drain a shared pool.

Because a hard stop can feel abrupt, you also set an alert threshold (default 80%). You get an email while there is still room to act, so you can top up, switch to a cheaper model, or pause before the cap hits. If you want the full setup, read how to set a Claude Code budget.

Cap type What it limits Good for
Dollar budget Spend per day or week, per user or project Predictable monthly cost
Token cap Total tokens per day or week Reining in heavy context
Session cap Number of sessions per day or week Curbing runaway agent loops
Project budget All-time spend for a project Fixed-scope or client work

Lever 3: Route simple work to cheaper models

This is the lever that usually saves the most, and it's the one Claude Code won't pull on its own. The same task can cost wildly different amounts depending on the model. In one experiment we ran the same prompt across six models: the cheapest finished at $0.2576 and the priciest at $3.1230, roughly a 12 times spread for the same job.

You don't need the most expensive model for a rename, a small refactor, or a routine test. With Clawgate a policy decides which models a key can use, you can force a specific model for a project, and you switch models from the dashboard without touching anyone's local setup. That means a small edit doesn't quietly run on a flagship model just because it was the default. You can also turn on smart model routing and let Clawgate pick the cheapest capable model for each request automatically.

For which models give the best value, see the cheapest models for Claude Code.

Lever 4: Compress the context you resend

Even on the right model, Claude Code pays to resend the same background context every turn. Prompt compression cuts that waste. It's an opt-in toggle in Clawgate that can strip up to 92% of the tokens agents resend on heavy workloads, while accuracy holds.

It's careful about what it touches. Old repeated context gets compressed, but the recent turns, the system prompt, your tools, and thinking blocks are left exactly as they were. The savings show up in dollars on the dashboard, so you can see the lever working. There is more detail in our write-up on prompt compression for coding agents.

Two of these levers, cheaper models and compression, are worth calling out because the AI providers won't build them. Tokens are their revenue. They offer prompt caching, but nothing that actively compresses your context or routes your work to a cheaper model. That gap is exactly why no single existing tool did all three jobs a team needs, which is why we built Clawgate: it monitors and hard-stops spend, it cuts token usage, and it catches abuse and impersonation with content-fingerprint detection that flags leaked or shared keys and requests whose content doesn't match the project they claim.

The real story: we cut our own bill 70%

Clawgate started as an internal tool at Virstack, before it was a product. Our own Claude Code and Codex spend was climbing and we couldn't tell where it went. The single biggest win, once we could see the spend by person and project, was steering work to the right model instead of running everything on a flagship. That one change, plus hard caps and compression, cut our own AI bill by 70%. The team didn't slow down. If anything the guardrails let people use AI more freely, because nobody was scared of an invisible bill.

We've written up the full breakdown in how we cut 70% of our AI costs.

Set this up in minutes

Controlling costs shouldn't take a migration. With Clawgate you point Claude Code (or Codex, opencode, or Cursor) at the gateway with one vsk_… API key. Every request is then authenticated, checked against your budgets and quotas, tied to a user and a project, and forwarded to the model. There are no local config files to juggle and no separate provider keys to manage.

From there you set budgets, pick which models each key can use, and turn on compression, all from the dashboard. It's free to start, and because budgets are hard stops there are no surprise bills. AI usage is billed at provider cost plus one clear platform fee, and Enterprise can self-host with no per-token markup.

Frequently asked questions

How much does Claude Code cost per developer?

Anthropic's own documentation puts the average at roughly $13 per developer per active day, or about $150 to $250 per developer per month, with the heaviest users well above that. Multiply that across a team and it becomes real money fast, which is why teams put budgets and cost tracking in place.

Can I set a spending limit on Claude Code?

Yes. With a gateway like Clawgate you set daily and weekly caps in dollars, tokens, or sessions, per developer and per project, and they are hard stops. When a limit is reached the request is blocked, and the developer sees a clear message instead of a silent retry. Project budgets add an all-time spend cap checked before user quotas. You can also set an alert (default 80%) so you get a heads-up before the hard cap hits.

How do I see which developer or project is spending the most?

Tie every key to a person and a project so cost is attributed automatically. In Clawgate each key belongs to one developer and one project, so per-user and per-project spend is tracked live and historically with no manual tagging. You can sort by who spent the most this week, or bill a project's cost back to the right client or team.

Does controlling costs slow the team down?

No, when it's done at the gateway rather than by rationing access. Developers keep working normally with the same tool. Budgets only stop runaway spend at the cap you set, cheaper models handle simple work just as well, and prompt compression cuts resent tokens without changing what the model sees for the current turn. We cut our own team's AI bill by 70% mostly by steering work to the right model, and speed went up, not down.

Written by Chathuranga K, an engineer at Virstack.

Take control of your Claude Code costs

See who spends what, set hard caps per developer and per project, route work to cheaper models, and compress the tokens you resend. All from one dashboard, set up in minutes.