Blog · April 15, 2026 · 4 min read

How to Track Claude Code Spend Per Developer

If you're running Claude Code across a team of 5+ developers and checking spend on invoice day, you're already losing money. Here's how to set up per-developer tracking in under 5 minutes.

1

Install Cohrint

Cohrint works as a transparent proxy layer — it intercepts Claude Code's Anthropic API calls, records cost metadata, and forwards the request without modifying it. Your developers notice nothing.

# Install the SDK
pip install cohrint

# Or with npm
npm install cohrint
2

Set your API key

Get your Cohrint API key from the dashboard after requesting access. Add it to your environment — either per-developer or as a shared team key distributed via your secrets manager.

# Add to .bashrc / .zshrc / shell profile
export COHRINT_API_KEY="coh_live_..."

# Or add to your repo's .env (and .gitignore it)
COHRINT_API_KEY=coh_live_...
3

Tag by developer (optional but recommended)

To get per-developer breakdowns, tag each environment with the developer's name or ID. This can be set in the environment or in a .cohrint.yaml config file at the repo root.

# Per-developer tagging via env var
export COHRINT_USER="[email protected]"

# Or in .cohrint.yaml at repo root
user: ${GIT_AUTHOR_EMAIL}
team: engineering
4

View your dashboard

After the first Claude Code session, costs appear in your Cohrint dashboard — broken down by developer, model (Opus / Sonnet / Haiku), tokens, and session duration. No batching, no 24-hour delay.

Setting Budget Alerts

Once tracking is live, set per-developer or per-team monthly budgets in the Cohrint dashboard. When spend hits 80% of budget, Cohrint sends a Slack alert. At 100%, it can optionally soft-block new sessions or just alert — your choice.

What Gets Tracked

Cohrint captures: model name, input tokens, output tokens, cost in USD, latency, session ID, and developer tag. Your prompts and code are never captured. Cohrint sees the envelope, not the letter.

Common Mistakes to Avoid

Not tagging by developer. Without developer tags, you get team-level spend but can't identify which individual is responsible for a spend spike. Takes 30 seconds to set up — do it from day one.

Reviewing spend monthly. Monthly reviews mean you're always a week behind the problem. Check weekly, or set daily alerts at 20% of monthly budget to catch anomalies early.

Defaulting everyone to Opus. Opus is the right choice for complex, long-context tasks. For routine refactoring, test generation, and documentation, Sonnet or Haiku produces equivalent output at 5–10× lower cost.

Ready to set this up?

Request access and be tracking Claude Code spend in under 5 minutes.

Request Access — Free →