arrow_back All posts
Tokens Explained: Why AI Coding Costs What It Costs
what are tokens llmtoken pricing explainedai coding costsdeveloper budgeting

Tokens Explained: Why AI Coding Costs What It Costs

Tokens are the unit behind every AI bill. Understanding how they're counted — and what consumes them invisibly — turns billing anxiety into control.

Marcus Webb · Developer Relations · September 14, 2026 · 4 min read

Every AI coding bill ultimately reduces to one unit: tokens. Plans cap them, usage bills multiply them, rate limits throttle them. Yet most people using these tools daily have never seen a token defined precisely — which is why invoices surprise them. The concept takes five minutes to learn and permanently changes how you read both pricing pages and your own sessions.

What a token actually is

Models don't read words; they read tokens — chunks of text a few characters long, produced by breaking language into statistically convenient pieces. English averages roughly four characters per token; code varies more because symbols and identifiers fragment differently. A typical paragraph runs a hundred-ish tokens; an entire source file might be thousands. Everything downstream — context windows, per-request costs, subscription allowances — is denominated in these units.

Tokens Explained: Why AI Coding Costs What It Costs

Connect the Claude or Codex you already pay for — the rest runs on workers that cost a fraction.

Download meshcode →

Why sessions cost more than they feel like they should

The non-obvious part: models have no memory between calls. Every request re-sends relevant history — instructions, conversation, previously read files — so a long session pays repeatedly for its own past. Late-session requests carry far larger inputs than early ones even when you type little, because accumulated context rides along each time. This compounding explains bills that feel disproportionate to visible activity. Hidden baseline overhead compounds it further; see token overhead before your first prompt.

Where coding work concentrates spend

Agentic sessions spend tokens in predictable places. Reading source files dominates exploration-heavy tasks. Re-reading unchanged files wastes spend that caching or discipline could save. Long outputs cost proportionally — generating boilerplate is expensive, editing precisely is cheap. And verification loops (run tests, read failures, retry) multiply everything by attempt count. None of these are reasons to avoid agents; they're levers for steering spend toward value.

Subscription versus metered, revisited with tokens in mind

Flat plans convert variable token consumption into predictable fees plus limits — good for budgeting, frustrating when heavy weeks hit caps. Metered billing passes raw consumption through — efficient for disciplined users, anxiety-inducing without visibility. Neither dominates; matching depends on how spiky your usage is and how much you trust your own scoping habits. Practical comparisons appear in guides to prepaid credits versus subscriptions.

Habits that measurably reduce spend

Scope tasks tightly so agents read less irrelevant code. Commit frequently so recovery restarts don't replay whole histories. Prefer targeted edits over wholesale regeneration. Start fresh sessions when conversations bloat rather than pushing through degradation. Match model weight to task difficulty — frontier models on trivia is burning money politely. Together these habits routinely cut effective spend substantially, which is why they recur throughout guides like reducing Claude Code token usage.

Reading pricing pages correctly

Armed with tokens, pricing pages decode cleanly: context window sizes tell you how much fits per request, input-versus-output rates reveal which behaviors dominate cost, cache discounts reward repetitive prefixes, and free tiers reveal their real size once you imagine your heaviest session measured in tokens. Vendors aren't hiding anything — the units were simply unfamiliar.

The meshcode angle

Token economics favor setups where you watch spend while working instead of discovering it at invoice time. meshcode runs your choice of models — including ones billed through subscriptions you already hold or metered pay-as-you-go credits — across parallel panes, so scoping decisions happen where their consequences are visible. Download and bring existing access to start.

👉 Download meshcode — Mac, Windows