Blog
Missing Token Counts on Streamed LLM Calls (and Why Your Spend Total Reads Low)
A streamed response reports its token usage in one final payload. When that payload never arrives, the call is recorded with no tokens and prices at zero, so it drops out of every spend total while still counting as a call.
-
AI Commit Attribution: How Accurate Is the Cost on a Pull Request?
Any tool can print a dollar figure against a PR. The number can rest on the agent's own git commit call or on a same-day guess, and most dashboards render both identically. How to tell which you have.
-
Cursor OpenTelemetry Export: What Ships Today, and What You Get Without Enterprise
Cursor now streams OTLP metrics and logs to a collector you run. The exact wire, the six things it will not send, and what the other plans can actually export.
-
Agent Session Cost: What the Sessions That Left No Commit Cost You
Cost per merged PR divides agent spend by the work that landed, so the sessions that landed nothing vanish into the average. How to measure that spend, and why it is not a saving.
-
AI Cost Estimate vs Actual: Is That a Bill, or a List Price?
Most AI cost dashboards price your tokens at a published rate card, including for people on flat-fee seats. Here is why that number cannot be reconciled against an invoice, and what to check on your own bill.
-
Why the Cheapest LLM Can Cost You the Most
A lower cost per token does not mean a lower bill. Here is how a cheaper model runs up more spend through retries, verbose output, and reasoning tokens, and how to compare LLM cost by the finished task instead of the token.
-
AI Budget Overruns: Why Agentic Spend Is So Hard to Forecast
Most agentic AI projects overshoot their budget. Here is why agent spend resists forecasting, and what honest AI cost forecasting looks like when the agent decides how many tokens to use.
-
Measuring AI Agent ROI: You Need the Cost Side First
ROI is value over cost, and most teams can only guess the cost. Here is why agent ROI is hard to prove, and what connecting token spend to business outcomes actually requires.
-
Why AI Bills Keep Rising While Token Prices Fall
Token prices drop about 10x a year, yet AI spending is forecast to hit $2.59 trillion in 2026. This is the Jevons paradox for AI, and the fix is measuring your own consumption.
-
AI Pricing Models: Why Token Cost Breaks Usage-Based and Subscription SaaS
When the unit of work is a metered token with a variable, often invisible cost, flat subscriptions and usage tiers stop mapping to value. The case for outcome-based pricing, and why it needs token-cost measurement first.
-
Model Downsizing: How to Run Cheap Agent Work on Cheap Models
Model downsizing runs mechanical agent turns on a cheaper model. How to spot downsizing candidates in your own usage and cut agent cost without guessing.
-
Prompt Caching Read vs Write: When Caching Costs More Than It Saves
A cache read is cheap, a cache write costs a premium. The break-even math, the net-negative case, and the write:read ratio that tells you which one you're in.
-
Evals vs Benchmarks vs Certification: What Each One Actually Proves
An eval scores your own cases. A benchmark ranks options under one protocol. Neither tells you whether a specific model swap is safe, and that gap is still open.
-
Some of Your Agent's Tasks Don't Need an Agent
Parts of your agent run the same deterministic tool-call sequence on every run, and you pay model tokens each time to reproduce what a plain script would do for free.
-
Stop Paying to Re-Plan Work Your Agent Already Solved
Agents re-derive the same plan skeleton on every run. TokenJam clusters your runs by plan shape, isolates the planning tokens, and exports the repeated plans as templates you can feed back in.
-
Stop Paying Frontier-Model Prices for Work a Cheaper Model Handles
Find the agent calls where a cheaper model would likely hold, priced in dollars against your own trace history, so you stop paying frontier rates for mechanical work.
-
Instrument Your AI Agent, Then Find Where the Money Goes
Patch your provider client in one line so the TokenJam SDK captures every LLM call to a local, on-disk trace, then run local analyzers that turn those traces into priced savings across your self-built agent.
-
CLAUDE.md Best Practices: What a Good One Actually Looks Like
A good CLAUDE.md gives Claude Code the architecture, the critical rules, and the worktree discipline it needs to work in a multi-agent repo. Here's the anatomy, with real examples.
-
Did That Session Even Need Opus?
Many Opus sessions are Sonnet-shaped. Here is how to spot Opus quota you could reclaim, and why any such call is a candidate to review, never a guaranteed-safe downgrade.
-
From Tokenmaxxing to Tokenminimizing
The culture is shifting from throwing tokens at every problem to seeing and cutting the waste, and for Claude Code subscribers that changes what a quota tool is even for.
-
Half Your System Prompt Isn't Doing Any Work
System prompts quietly accumulate dead-weight tokens you re-pay on every call, and TokenJam's Trim lever scores which tokens carry little significance so you can see what to cut.
-
The Prompt-Caching Discount Most Agents Leave on the Table
Prompt caching gives roughly 30-60% off the repeated prefix tokens your agent re-sends every call, and TokenJam measures your current cache usage and recommends where to place cache_control.
-
Why Model Autorouting Savings Need a Proof Step
Model autorouting to a cheaper, smaller, or open-source model shows a big savings number before any work is redone. That figure is a prediction of your AI spend, not a result. Here's why LLM cost savings from an autorouted swap stay a hypothesis until you replay it on your own tasks and measure whether quality holds or regresses.
-
What Actually Costs Money in an Agent Loop
A mechanism-level breakdown of where tokens get spent every turn an agent runs: input, output, cache reads vs cache writes, context bloat, tool overhead, fan-out, and retries.
-
Why Your Claude Code 5-Hour Window Vanishes in Minutes
The real causes of premature Claude Code rate-limit exhaustion (invisible burn rate, per-turn context re-reads, subagent fan-out) and how to diagnose them locally.
-
Why Subagent Token Counts Are Wrong (and How to Fix Them)
Popular usage tools miscount subagent tokens by replaying the parent thread for each one, and here is how to reconstruct accurate per-subagent attribution from the raw JSONL.
-
Quota, Not Cost: Why /cost Is the Wrong Number on Claude Max
Claude Pro and Max subscribers should track quota, their usage against the plan window, not dollar cost, and /cost misleads them because it prices tokens against an API rate card they never pay.
-
Where Does Your Claude Code Quota Actually Go?
TokenJam is a local-first tool that reads your on-disk Claude Code transcripts and shows where a Pro or Max subscription's quota is spent per turn: re-reading context versus doing real work.
-
Introducing TokenJam Bench: Benchmarks & Evaluations for Agents and LLMs
TokenJam Bench is an open-source tool to benchmark and evaluate LLMs and agents. Run a candidate model against an original on real, executable task suites and get a measured pass-rate, confidence intervals, and a holds-or-regressed verdict. Local, no signup.
-
How to leverage GitHub Actions to showcase growth of your open-source-first product
GitHub's Traffic API forgets your clones and views after 14 days. A 50-line GitHub Action archives them to your repo so you keep the longitudinal growth record you'll need later.
-
What is AI model autorouting?
AI model autorouting picks a different model per request to cut cost without losing quality. How it works, what the research shows, and why measurement comes first.
-
The problem with TokenMaxxing
TokenMaxxing is fun because someone else pays for it. Here's why the subsidy is ending, what Fable 5 just signaled, and how to find your own multiple.
-
What is an agent loop?
Agent loops: the program that prompts your agent for you, checks its own work, and decides when to stop. The lineage from ReAct to orchestration, and why the loop is now the expensive part.
-
Reddit is 40% of your agent's retrieval surface
What 150K LLM citations tell builders about prompt-time grounding, eval coverage, and the source biases their agents inherit by default.
-
Cost dashboards tell you the bill. They don't tell you what to change.
The gap between reporting agent cost and recommending what to do about it. Why an honest recommendation needs to be validated against the user's own data, and the recent research that makes that validation cheap.
-
Where Your AI Agent Bill Goes: 5 Token Waste Patterns
Model overspending, context bloat, redundant calls, runaway loops, and poor caching. What each one does to the bill, and the published technique that cuts it.
-
AI Agent Costs Are Real Now: What the 2026 Numbers Show
Uber burned a year of AI budget in four months. The sourced 2026 agent-spend figures, what the $1.3M bill is at standard pricing, and the June billing changes.
-
Claude Code OTel: What the Wire Emits and What /cost Hides
Claude Code emits OTel metrics and events; traces are still beta behind their own flag. What the wire carries per call, and the failure shapes /cost hides.
-
The 9-layer agent ecosystem map
A unified map of the agent operations ecosystem: nine layers from observability to token economics, the tools at each, where they are converging, and where the gaps remain.
-
What is AI Agent Token Economics?
Agent token economics: understanding where tokens are spent, why agent costs spike unpredictably, and the optimization patterns (model cascading, prompt compression, semantic caching) for reducing spend without losing quality.
-
LangSmith Cost in 2026: Real TCO vs Self-Hosted Alternatives
LangSmith's $39/seat sticker runs ~10.7x that in real TCO. A sourced teardown vs Langfuse self-host and a local-first DuckDB alternative, with real numbers and config.
-
What is an agent control plane?
Agent control planes: the runtime layer that governs AI agent behavior across a fleet. Policy enforcement, budget caps, audit trails, and how it differs from observability and guardrails.
-
What is human-in-the-loop for AI agents?
HITL for AI agents: when and how to insert human approval, the patterns (pre/post/exception), the tools that exist, and the async-execution problem.
-
What are AI guardrails?
Runtime constraints on what LLMs say and do: input filtering, output filtering, behavioral checks, and structured output enforcement.
-
Agent Environments and Sandboxes: Where an AI Agent Runs
The four kinds of isolated runtime an AI agent can act in, what each one trades away in speed or safety, and why the sandbox you pick also decides how you evaluate.
-
The taxonomy of agent failure: 13 named alerts beat 'anomaly detected' at 2am
Every AI observability vendor ships 'anomaly detected.' That's the wrong abstraction for autonomous agents. Here's the typed vocabulary we ship instead. 13 named failure modes, each with its own trigger, payload, and prescribed response.
-
How to Monitor Claude Code with OTel (Before a $1,700 Bill)
Monitor Claude Code on your laptop in 5 steps: enable Anthropic's OTel telemetry, store spans locally, and alert on retry loops while the agent still runs.
-
AI Agent Drift Detection: How to Spot It in Your Own Sessions
Catch agent drift with no embedding model and no labelled dataset. What to measure over your own session history, and which signals are worth alerting on.
-
What is Agent Memory and why does it matter?
How AI agents persist state across sessions, why memory is different from RAG, and the open-source projects building this layer.
-
What is agent evaluation?
Agent evaluation: measuring multi-step trajectories, tool use, and open-ended outputs. Why benchmarks alone don't tell you whether an agent works in production.
-
LLM Gateway Costs: What a Gateway Tracks and When You Need One
A gateway can log cost, tokens and latency on every provider call, and some enforce budget caps. What it covers, routing vs measurement, and when to skip one.
-
What is OpenTelemetry, and why does it matter for AI agents?
OpenTelemetry, OTLP, and the GenAI semantic conventions: how the CNCF observability standard is becoming the lingua franca for AI agent telemetry.
-
What is agent observability?
How AI agent observability works: capturing tool calls, token costs, traces, and behavioral patterns at production scale.
-
Agents 101: Reasoning, Actions & Autonomy
A foundational definition: what AI agents are, how they differ from chatbots and workflows, and the components that make them work.