SUSTAIN · AGENT OPERATIONS

How to Reduce Claude Code Costs: A Token Strategy for Engineering Teams

The short answer: Claude Code costs grow with how much text the model has to read on every turn, not with how much you type. Keep each session small and focused, match the model to the job, and give the team spend limits, a dashboard and a weekly review. Most savings come from habits, not from using the tool less.

AI coding assistants have moved from experiment to daily tool, and finance teams have noticed the bill. Anthropic’s own cost guide for Claude Code reports that across enterprise deployments the average is around $13 per developer per active day, or $150–250 per developer per month, with 90% of users staying under $30 a day. The spread between a careful developer and a careless one is large, and most of it is avoidable.

How Claude Code spends tokens

A token is a small chunk of text, about three-quarters of a word. You pay for tokens the model reads (input) and writes (output). The key fact most people miss: the model remembers nothing between messages. Each time you send a message, Claude Code sends the whole conversation again: its instructions, your project’s CLAUDE.md file, the tool list, every file it has read, every test log, and every earlier reply.

Claude Code softens this with prompt caching: unchanged parts of the conversation are re-read at a much lower price. But the cache expires after a period of inactivity, so the first message after a long break pays to reprocess everything.

Every message re-sends the whole conversation, so long sessions get expensive
Context growth: five turns, then /clear

Each turn adds to the pile the model must read next time. By turn five, the new message is a small slice of a large bill. A /clear before the next unrelated task drops the history, and the cost falls back to the setup alone.

The other big spenders are thinking tokens (the model’s internal reasoning, billed as output), large tool outputs such as a 10,000-line log, and extra agents: each sub-agent or agent teammate runs with its own context, so costs rise with every one you start.

Twelve habits for every developer

Keep context small

  1. Clear between tasks. Run /clear when you switch to unrelated work. Use /rename first if you may want to /resume that session later.
  2. Compact with a focus. In a long task, /compact Focus on the API changes and failing tests keeps what matters. Note that compacting a huge session is itself a large request, so don’t wait until the very end.
  3. Clear or compact before a long break, so you don’t return to a cold cache and a full-price reread.
  4. Check what’s in context. /context shows what is taking space; /usage shows what the session has spent.

Ask precisely

  1. Name the file and the function. “Add input validation to the login function in auth.ts” costs far less than “improve the login code”, which triggers a broad scan.
  2. Use plan mode for big changes. Press Shift+Tab to have Claude propose an approach before it writes code. Re-work is the most expensive thing you can buy.
  3. Stop wrong turns early. Press Escape as soon as it heads the wrong way, and use /rewind to go back to a checkpoint.
  4. Give it a way to check itself: a test, an expected output or a screenshot. It catches its own mistakes before you pay for another round.

Match the model and effort to the job

  1. Default to Sonnet. Anthropic’s guidance is that Sonnet handles most coding tasks well at a lower price than Opus. Switch with /model for genuinely hard architecture or multi-step reasoning, then switch back.
  2. Lower the effort for simple work. /effort reduces how much the model thinks on routine edits.

Trim the fixed setup

  1. Keep CLAUDE.md lean. It is loaded at the start of every session. Anthropic suggests under 200 lines. Move step-by-step workflows (release steps, migration checklists) into skills, which load only when needed.
  2. Switch off unused tools. Disable MCP servers you aren’t using with /mcp, and prefer command-line tools like gh or aws where they do the job.

Five controls for engineering leaders

Habits fade without a system. Put these in place once, then review them every sprint.

  1. Start with a pilot. Give 5–10 developers access, measure for two to four weeks, and set budgets from your own baseline rather than a vendor average.
  2. Set limits where your billing lives. On the Claude API, use workspace spend limits and a workspace rate limit, so Claude Code can’t starve production systems. On Team and Enterprise plans, each seat has a usage allowance; set spend limits on extra usage at organisation, group or member level. On Amazon Bedrock, Google Cloud or Microsoft Foundry, use your cloud budgets.
  3. Get per-developer visibility. Claude Code can export token and cost metrics through OpenTelemetry to your own monitoring tools. On cloud providers, an LLM gateway can also track spend per user.
  4. Share a good setup in the repository. A lean, reviewed CLAUDE.md, shared skills for common workflows, and hooks that shrink noisy output. One hook that shows only failing tests can turn tens of thousands of tokens into a few hundred.
  5. Watch agent teams closely. Anthropic notes agent teams can use about seven times more tokens than a standard session when teammates run in plan mode. Keep teams small, use Sonnet for teammates, and shut them down when done.
Token costs stay in control when the team measures and adjusts every sprint
The team cost-control loop in five steps

The loop matters more than any single setting. Each weekly review finds a few outliers, usually a session left open all day or the most expensive model set as a default, and the fix goes into the shared setup for everyone.

Measure value, not just spend

A token budget that pushes developers back to slow manual work is a false saving. Track cost per merged pull request or per completed story alongside total spend. If cost per PR falls while output rises, the strategy is working, even if the total bill grows.

Common mistakes

  • One all-day session for every task.
  • Opus as everyone’s default.
  • A 1,000-line CLAUDE.md that loads on every request.
  • Pasting full logs instead of filtering them.
  • No per-user visibility until the invoice arrives.

How SHVX can help

Our Agent Operations team sets up token budgets, dashboards and shared repository setups for engineering teams using AI coding assistants, and reviews them with you each month.

Commands and figures checked against Anthropic’s documentation in October 2026. Claude Code changes often, so check the official cost guide before you set budgets.

FAQ

Why is my Claude Code bill so high?

Usually long sessions that are never cleared, a powerful model left as the default, large files or logs read into context, or many agents running at once.

Does /compact save money?

Yes, over the rest of a long task, because later turns carry a shorter history. The compact step itself reads the whole conversation, so for unrelated work /clear is cheaper.

How much should we budget per developer?

Run a pilot and use your own numbers. Anthropic’s published enterprise average is a reasonable starting point, but your codebase and habits will move it a lot.

Can we cap spending per developer?

Yes. The options depend on how you buy Claude Code: plan spend limits, Console workspace limits, cloud budgets, or a gateway with per-user caps.