Skip to content
All tags

#cost

4 posts

Managing Claude Code Costs: Token Tracking, Model Choice, Effort, and Team Analytics

Claude Code costs accumulate with context size: enterprise deployments average ~$13 per developer per active day and $150–250 per month. This post covers /usage and /insights tracking, six token-saving tactics, and a systematic answer to 'which model should I use': provider-dependent model aliases, effort levels, fast mode ($10/$50 per MTok for Opus 5/4.8), and the advisor tool.

How prompt caching shapes Claude Code's speed and bill: prefix matching, invalidation triggers, and hit rate

Claude Code's prompt caching works by exact prefix matching: a cache read bills at roughly 10% of the standard input rate, but switching models, changing effort, enabling fast mode, toggling MCP servers, or denying an entire tool forces the next turn to reprocess everything. The TTL defaults to five minutes; the main conversation and a few helper requests on a subscription get one hour.

Modal: The Layer Your Inference Engine Runs On — and When the Premium Isn't Worth It

Modal is a per-second-billed serverless GPU platform that also treats agent sandboxes as a first-class primitive (company-reported: over 1 billion sandboxes launched, more than a third of revenue). The selection question isn't how convenient it is — it's your GPU utilization. Verified 2026-08-21: Modal's A100 80GB works out to $2.50/hr against RunPod's $1.59/hr for the same card, so above 64% utilization renting your own is cheaper. But on the same day, H100 SXM is $3.95/hr on Modal against $3.99 on Lambda — on that card the premium is gone.

vLLM: The Default Choice for Self-Hosted Inference — and When It's Over-Engineering

vLLM is the de facto standard for self-hosted LLM inference (89,470 GitHub stars, verified 2026-08-21), built on managing the KV cache the way an OS manages paged memory. But the selection question isn't how fast it is — it's your GPU utilization. Using Red Hat's measured 793 output tokens/second, a fully saturated A100 costs roughly $0.70 per million output tokens; at 10% utilization that becomes $7, more than most cloud APIs.