#optimization
14 posts
-
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.
-
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.
-
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.
-
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.
-
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
Where your AI agent bill actually goes: the 5 token-waste patterns (context bloat, runaway loops, model overspend, and more) and the research that fixes each.
-
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.