A couple of weeks ago I wrote about what I called tail rent: the compounding cost of resending a growing conversation on every turn of a long agent session. That piece was mostly about memory, about what survives compaction and what gets sanded away. I kept the money side vague because, honestly, I had not followed it all the way down. I had a feeling about where my Claude Code bill was going. I did not have a ledger.
Then Itai Spector published a piece whose headline finding stopped me: in one real, measured session, the overwhelming majority of the spend was the agent rereading its own context, and only a small slice was the model actually thinking. If that holds even roughly, a lot of the cost advice floating around this month is aimed at the wrong line item.
So this article does two things. First, it lays out what other people have reported, with every secondhand number labeled as secondhand. Second, it gives you the small C# harness I put together to measure my own sessions, including a local run with Ollama for the cheap tier, so you can check the claims against your own bill instead of trusting mine or anyone else’s.
What Spector reported
Spector’s article is member-only on Medium, and I want to be upfront about what I could and could not check. The public preview states the headline: about 82% of a real session went to rereading context. The rest of the numbers below come from the full article as it was summarized in my notes and in the newsletters that picked it up. I am treating all of them as author-run measurements, not verified figures.
The setup, as reported: one real Claude Code session, about 92 minutes long, on Opus 5.5. The split looked like this.
SPEND BY CATEGORY, ONE 92-MINUTE OPUS 5.5 SESSION
(author-run numbers reported by Itai Spector, not verified by me)
Category Share of spend Notes
---------------------------- --------------- ----------------------------------
Context rereading ~82% history resent on every turn
Thinking ~9.5% reasoning tokens
Everything else ~8.5% remainder; not broken down in
what I could see
---------------------------- --------------- ----------------------------------
Total 100%
And the comparison that gives the article its title:
ROUTER VS EFFORT, SAME KIND OF SESSION
(author-run numbers reported by Itai Spector, not verified by me)
Setup Reported session cost
---------------------------------- ---------------------
Jev router choosing model per turn $1.70
No router, effort simply set high $1.94
---------------------------------- ---------------------
Difference $0.24 (about 12%)
A router that picks a smaller model for easy turns saved about 24 cents over just leaving the big model on high effort. That is not nothing. It is also not the “cut your bill in half” story that the router demos imply.
My first reaction was suspicion, and I think it should be yours too. One session. One author. A comparison where the router and the high-effort run were presumably not the exact same sequence of turns, because an agent never takes the same path twice. I would not quote 12% as a law of nature.
But the 82% figure did not surprise me at all, and I think the mechanism behind it is solid enough to reason about even if the exact percentage moves around.
Why rereading eats the bill
Every turn of an agent session sends the whole conversation again: system prompt, tool definitions, every earlier message, every tool result. The model has no memory between calls. The harness does the remembering by resending.
Prompt caching makes that resend cheaper, not free. The way I understand Anthropic’s caching (and you should check the current pricing page, because multipliers change):
- Writing a prefix into the cache costs a bit more than normal input.
- Reading a cached prefix costs a small fraction of normal input.
- The default cache lives for about five minutes, with a longer option you pay more for.
So in a healthy, busy session, most of your input is billed at the cheap cache-read rate. The trouble is that “a small fraction” multiplied by a 150K-token prefix multiplied by a hundred turns is still the biggest number on the invoice. Thinking happens once per turn on new tokens. Rereading happens every turn on everything.
Then there is the cold turn. You step away to read a pull request, come back after seven minutes, type one line, and the cache has expired. That one line drags the entire prefix back in at the write rate. In my tail rent piece I called this the expensive part of resuming a session. It is also invisible unless you log usage per turn, because the UI does not shout “this turn cost you twelve times the last one.”
This is the problem the prompt-cache-control mod for Claude Code was going after, according to The Code newsletter’s coverage between 7 and 10 October. As described there, the idea is to manage the cache deliberately, for example keeping it warm or choosing the longer TTL when you know you will pause, instead of letting expiry happen to you. I have not installed or tested that mod, so I am not going to tell you it works. I am telling you the problem it targets is real, and you can see it in your own logs with the harness below.
Effort: build low, verify high
Anthropic’s own advice on effort levels, as it was summarized in the sources I worked from, comes down to two points. Use lower effort for building and higher effort for verifying. And the highest effort setting costs roughly three times the tokens per attempt compared to the low end.
I like this advice, but the Spector numbers put it in an interesting light. Effort mostly moves the thinking slice. If thinking is under 10% of spend, then even tripling it on every turn is not what blows up a bill. What blows up a bill is the number of turns, because every extra turn pays the reread again.
That changes how I think about “low effort to save money.” If low effort means the agent takes three attempts where high effort would have taken one, you saved on thinking and paid for two extra full rereads of the context. On a long session with a fat prefix, that trade can easily go the wrong way. I suspect this is part of why “just set high effort” landed so close to the router in Spector’s comparison: fewer wasted turns can be worth more than cheaper tokens per turn.
So my working rule is: build low when the task is mechanical and the agent is unlikely to need retries. Verify high, because a verification that misses something costs you a whole extra cycle later.
Routing, the cheap tier and the advisor idea
The Haiku 5.5 pricing in the digest I worked from was $0.10 per million input tokens and $0.50 per million output tokens, for prompts up to 100K tokens. Treat that as reported, check the pricing page before you build a budget on it, and note the 100K boundary: long agent contexts can cross it, and my harness below does not model tiered pricing.
At those prices it is very tempting to route everything easy to Haiku. Here is the catch that I think routers underplay: the cache belongs to a model. When a router flips a turn from Opus to Haiku, Haiku does not get to read Opus’s cached prefix. If the router flips back and forth, each switch can mean a cold prefix on the model you switched to. In a session where 82% of the spend is rereading, a router that keeps breaking cache continuity is fighting the biggest cost with the smallest lever.
The advisorModel idea, which The Code covered as a Claude Code hack in the same 7 to 10 October window, flips the structure around. Instead of one model per turn, a cheap model does the work and an expensive model is consulted occasionally as an advisor. I have not confirmed the exact setting name or behavior in Claude Code, so I am describing the pattern, not the feature. What makes the pattern attractive on paper is not that the advisor is cheap. It is that the advisor sees a short context: the task and the proposed change, not the whole 92-minute history. You pay Opus prices on a few thousand tokens instead of Opus cache rent on the full transcript.
Simon Willison’s notes on budget caps, which The Code also pointed to on 9 October, pushed me in the same direction from the other side: decide what a session is allowed to spend before it starts, and make the harness enforce it.
That is the pattern I wanted to test.
Measuring my own sessions
I reused an idea from a Ranknod article on C# Corner about token budgets in .NET. Their ledger reserves an allowance before each model call, settles it with the real usage afterward, and does one thing I found genuinely useful: if a call may have happened but no usage report comes back, the ledger keeps the reservation held and halts further admissions. Not knowing what you spent is treated as a reason to stop, not as zero.
I carried that philosophy one step further. In my harness, a model with no known price also halts the cost report. I would rather get an error than a confident total that silently priced half the turns at zero.
The harness has four modes:
- transcript: read a Claude Code session log and break spend down per turn, with cache-warm and cache-cold turns separated.
- probe-api: send the same long prefix three times to the Anthropic API (cold, warm, then after waiting past the TTL) and print what each call cost.
- probe-ollama: the same probe against a local Ollama model, for the cheap tier.
- advisor: run one task two ways. Opus does it alone with full context, or a cheap executor (Haiku or a local Ollama model) does it and Opus reviews only the task and the result.
Setup
dotnet new console -n TokenRent -f net8.0
cd TokenRent
# replace Program.cs with the file below, then:
dotnet build
No NuGet packages. Everything is in the base class library.
For the local tier, either install Ollama directly:
ollama pull qwen2.5-coder:7b
ollama serve
or run it in Docker:
docker run -d --name ollama -p 11434:11434 -v ollama:/root/.ollama ollama/ollama
docker exec -it ollama ollama pull qwen2.5-coder:7b
Create a prices.json next to the project. The Haiku line uses the reported numbers above. Add the Opus line yourself from the current pricing page; the harness refuses to run on a model it has no price for, which is the point.
{
"claude-haiku-5-5": { "InputPerM": 0.10, "OutputPerM": 0.50 },
"qwen2.5-coder:7b": { "InputPerM": 0.00, "OutputPerM": 0.00 }
}
The cache multipliers default to 1.25x for writes and 0.10x for reads. Those are the values I have been working with; verify them against the current documentation and override per model in prices.json if they differ ("CacheWriteMultiplier", "CacheReadMultiplier").
The harness
// Program.cs
// TokenRent: follow the money in a long agent session.
// Modes:
// transcript <session.jsonl> <prices.json>
// probe-api <prefix-file> <prices.json> [waitMinutes]
// probe-ollama <prefix-file> [model]
// advisor <haiku|ollama> <task-file> <context-file> <prices.json>
using System.Diagnostics;
using System.Net.Http.Json;
using System.Text.Json;
using System.Text.Json.Nodes;
namespace TokenRent;
public sealed record Usage(long Input, long CacheWrite, long CacheRead, long Output)
{
public long Total => Input + CacheWrite + CacheRead + Output;
}
public sealed record Price(decimal InputPerM, decimal OutputPerM,
decimal CacheWriteMultiplier = 1.25m, decimal CacheReadMultiplier = 0.10m);
public sealed record CostSplit(decimal Fresh, decimal CacheWrite, decimal CacheRead, decimal Output)
{
public decimal Total => Fresh + CacheWrite + CacheRead + Output;
public static readonly CostSplit Zero = new(0, 0, 0, 0);
public static CostSplit From(Usage u, Price p) => new(
u.Input * p.InputPerM / 1_000_000m,
u.CacheWrite * p.InputPerM * p.CacheWriteMultiplier / 1_000_000m,
u.CacheRead * p.InputPerM * p.CacheReadMultiplier / 1_000_000m,
u.Output * p.OutputPerM / 1_000_000m);
public CostSplit Add(CostSplit o) =>
new(Fresh + o.Fresh, CacheWrite + o.CacheWrite, CacheRead + o.CacheRead, Output + o.Output);
}
public sealed class PriceBook
{
private readonly Dictionary<string, Price> _prices;
private PriceBook(Dictionary<string, Price> prices) => _prices = prices;
public static PriceBook Load(string path) =>
new(JsonSerializer.Deserialize<Dictionary<string, Price>>(File.ReadAllText(path))
?? throw new InvalidOperationException("prices.json is empty."));
// Unknown price halts the report. A total that silently priced turns at zero is worse than no total.
public Price For(string model) =>
_prices.TryGetValue(model, out var p) ? p
: _prices.FirstOrDefault(kv => model.StartsWith(kv.Key, StringComparison.OrdinalIgnoreCase)).Value
?? throw new InvalidOperationException($"No price for model '{model}'. Add it to prices.json.");
}
// Reservation ledger, after the Ranknod TokenBudget idea:
// reserve before the call, settle after, and a missing usage report halts admission.
public sealed class TokenBudget
{
private readonly object _gate = new();
private readonly Dictionary<Guid, long> _held = new();
private readonly long _limit;
private long _reported;
public TokenBudget(long limit) => _limit = limit;
public bool Halted { get; private set; }
public Guid? TryReserve(long tokens)
{
if (tokens <= 0) throw new ArgumentOutOfRangeException(nameof(tokens));
lock (_gate)
{
if (Halted) return null;
var available = _limit - _reported - _held.Values.Sum();
if (tokens > available) return null;
var id = Guid.NewGuid();
_held[id] = tokens;
return id;
}
}
public void Settle(Guid id, Usage? usage)
{
lock (_gate)
{
if (!_held.TryGetValue(id, out var reserved))
throw new InvalidOperationException("Unknown or already settled reservation.");
if (usage is null) { Halted = true; return; } // keep the hold: we do not know what was spent
_held.Remove(id);
_reported += usage.Total;
if (usage.Total > reserved) Halted = true;
}
}
public override string ToString()
{
lock (_gate)
return $"reported={_reported} held={_held.Values.Sum()} limit={_limit} halted={Halted}";
}
}
public sealed record TurnRecord(DateTimeOffset? At, string Model, Usage Usage);
public static class TranscriptReader
{
// Claude Code session logs are JSONL. The format is not a documented contract, so check yours.
// Streaming can log several lines for one API message; keep the last line per message id.
public static List<TurnRecord> Read(string path)
{
var byId = new Dictionary<string, int>();
var turns = new List<TurnRecord>();
foreach (var line in File.ReadLines(path))
{
if (string.IsNullOrWhiteSpace(line)) continue;
JsonNode? node;
try { node = JsonNode.Parse(line); } catch (JsonException) { continue; }
var msg = node?["message"];
var u = msg?["usage"];
if (msg is null || u is null) continue;
var usage = new Usage(L(u, "input_tokens"), L(u, "cache_creation_input_tokens"),
L(u, "cache_read_input_tokens"), L(u, "output_tokens"));
var at = DateTimeOffset.TryParse((string?)node?["timestamp"], out var t) ? t : (DateTimeOffset?)null;
var record = new TurnRecord(at, (string?)msg["model"] ?? "unknown", usage);
var id = (string?)msg["id"];
if (id is not null && byId.TryGetValue(id, out var idx)) { turns[idx] = record; continue; }
if (id is not null) byId[id] = turns.Count;
turns.Add(record);
}
return turns;
}
private static long L(JsonNode n, string key) => n[key] is JsonValue v ? v.GetValue<long>() : 0;
}
public interface IChat
{
string Model { get; }
Task<(string Text, Usage? Usage)> SendAsync(string system, string user, int maxTokens);
}
public sealed class AnthropicChat(HttpClient http, string model) : IChat
{
public string Model => model;
public async Task<(string, Usage?)> SendAsync(string system, string user, int maxTokens)
{
var body = new
{
model,
max_tokens = maxTokens,
system = new[] { new { type = "text", text = system, cache_control = new { type = "ephemeral" } } },
messages = new[] { new { role = "user", content = user } }
};
using var res = await http.PostAsJsonAsync("v1/messages", body);
var json = JsonNode.Parse(await res.Content.ReadAsStringAsync());
if (!res.IsSuccessStatusCode) throw new HttpRequestException($"{(int)res.StatusCode}: {json}");
var text = string.Concat(json?["content"]?.AsArray()
.Where(c => (string?)c?["type"] == "text").Select(c => (string?)c?["text"]) ?? []);
var u = json?["usage"];
Usage? usage = u is null ? null : new Usage(
(long?)u["input_tokens"] ?? 0, (long?)u["cache_creation_input_tokens"] ?? 0,
(long?)u["cache_read_input_tokens"] ?? 0, (long?)u["output_tokens"] ?? 0);
return (text, usage);
}
public static HttpClient CreateHttp()
{
var key = Environment.GetEnvironmentVariable("ANTHROPIC_API_KEY")
?? throw new InvalidOperationException("Set ANTHROPIC_API_KEY.");
var http = new HttpClient { BaseAddress = new Uri("https://api.anthropic.com/") };
http.DefaultRequestHeaders.Add("x-api-key", key);
http.DefaultRequestHeaders.Add("anthropic-version", "2023-06-01");
return http;
}
}
public sealed class OllamaChat(string model, string baseUrl = "http://localhost:11434") : IChat
{
private readonly HttpClient _http = new() { BaseAddress = new Uri(baseUrl), Timeout = TimeSpan.FromMinutes(10) };
public string Model => model;
public async Task<(string, Usage?)> SendAsync(string system, string user, int maxTokens)
{
var body = new
{
model,
stream = false,
options = new { num_ctx = 32768, num_predict = maxTokens },
messages = new[] { new { role = "system", content = system }, new { role = "user", content = user } }
};
using var res = await _http.PostAsJsonAsync("api/chat", body);
res.EnsureSuccessStatusCode();
var json = JsonNode.Parse(await res.Content.ReadAsStringAsync());
var text = (string?)json?["message"]?["content"] ?? "";
// Ollama reports prompt_eval_count and eval_count. There is no cache split and no bill.
Usage? usage = json?["prompt_eval_count"] is null ? null
: new Usage((long?)json["prompt_eval_count"] ?? 0, 0, 0, (long?)json["eval_count"] ?? 0);
return (text, usage);
}
}
public static class Program
{
private static readonly TokenBudget Budget = new(limit: 2_000_000);
public static async Task<int> Main(string[] args)
{
try
{
return args.FirstOrDefault() switch
{
"transcript" => Transcript(args[1], PriceBook.Load(args[2])),
"probe-api" => await Probe(new AnthropicChat(AnthropicChat.CreateHttp(), "claude-opus-5-5"),
args[1], PriceBook.Load(args[2]), args.Length > 3 ? int.Parse(args[3]) : 6),
"probe-ollama" => await Probe(new OllamaChat(args.Length > 2 ? args[2] : "qwen2.5-coder:7b"),
args[1], prices: null, waitMinutes: 0),
"advisor" => await Advisor(args[1], File.ReadAllText(args[2]), File.ReadAllText(args[3]),
PriceBook.Load(args[4])),
_ => Usage()
};
}
catch (Exception ex) { Console.Error.WriteLine($"Stopped: {ex.Message}"); return 1; }
}
private static int Usage()
{
Console.WriteLine("modes: transcript | probe-api | probe-ollama | advisor (see header comment)");
return 2;
}
// Mode 1: per-turn spend from a Claude Code session log, cache-warm vs cache-cold.
private static int Transcript(string path, PriceBook prices)
{
var turns = TranscriptReader.Read(path);
var warm = CostSplit.Zero; var cold = CostSplit.Zero;
int warmCount = 0, coldCount = 0;
DateTimeOffset? previous = null;
foreach (var t in turns)
{
var cost = CostSplit.From(t.Usage, prices.For(t.Model));
var gap = t.At is { } at && previous is { } p ? at - p : TimeSpan.Zero;
// Cold: nothing read from cache but a prefix was written, or a pause longer than the default TTL.
var isCold = (t.Usage.CacheRead == 0 && t.Usage.CacheWrite > 0) || gap > TimeSpan.FromMinutes(5);
if (isCold) { cold = cold.Add(cost); coldCount++; } else { warm = warm.Add(cost); warmCount++; }
previous = t.At ?? previous;
}
var all = warm.Add(cold);
Console.WriteLine($"{turns.Count} API calls, {warmCount} warm, {coldCount} cold\n");
Console.WriteLine("Category Cost (USD) Share");
Console.WriteLine("----------------------- ----------- ------");
Row("Cache read (reread)", all.CacheRead, all.Total);
Row("Cache write (rewrite)", all.CacheWrite, all.Total);
Row("Fresh input", all.Fresh, all.Total);
Row("Output incl. thinking", all.Output, all.Total);
Console.WriteLine("----------------------- ----------- ------");
Row("Total", all.Total, all.Total);
Console.WriteLine();
Console.WriteLine($"Avg warm call: {(warmCount == 0 ? 0 : warm.Total / warmCount):F4} USD");
Console.WriteLine($"Avg cold call: {(coldCount == 0 ? 0 : cold.Total / coldCount):F4} USD");
return 0;
}
private static void Row(string name, decimal value, decimal total) =>
Console.WriteLine($"{name,-23} {value,11:F4} {(total == 0 ? 0 : value / total),6:P1}");
// Modes 2 and 3: same long prefix three times. Cold, warm, then warm or cold after a pause.
private static async Task<int> Probe(IChat chat, string prefixFile, PriceBook? prices, int waitMinutes)
{
var prefix = File.ReadAllText(prefixFile);
for (var i = 1; i <= 3; i++)
{
if (i == 3 && waitMinutes > 0)
{
Console.WriteLine($"waiting {waitMinutes} min to let the cache expire...");
await Task.Delay(TimeSpan.FromMinutes(waitMinutes));
}
var (_, usage, ms) = await Call(chat, prefix, $"Probe {i}: reply with the single word OK.", 16);
var cost = prices is null ? 0m : CostSplit.From(usage, prices.For(chat.Model)).Total;
Console.WriteLine($"call {i}: in={usage.Input} write={usage.CacheWrite} read={usage.CacheRead} " +
$"out={usage.Output} cost={cost:F4} USD time={ms} ms");
}
Console.WriteLine(Budget);
return 0;
}
// Mode 4: Opus alone with full context vs cheap executor plus Opus advisor on a short context.
private static async Task<int> Advisor(string executorKind, string task, string context, PriceBook prices)
{
var http = AnthropicChat.CreateHttp();
var opus = new AnthropicChat(http, "claude-opus-5-5");
IChat executor = executorKind == "ollama" ? new OllamaChat("qwen2.5-coder:7b")
: new AnthropicChat(http, "claude-haiku-5-5");
var (_, opusUsage, _) = await Call(opus, context, task, 4000);
var opusOnly = CostSplit.From(opusUsage, prices.For(opus.Model));
var (draft, execUsage, _) = await Call(executor, context, task, 4000);
const string reviewSystem = "You are a reviewer. Check the proposed change against the task. " +
"Reply APPROVE, or list concrete problems.";
var (verdict, advUsage, _) = await Call(opus, reviewSystem, $"TASK:\n{task}\n\nPROPOSED CHANGE:\n{draft}", 1500);
var pair = CostSplit.From(execUsage, prices.For(executor.Model))
.Add(CostSplit.From(advUsage, prices.For(opus.Model)));
Console.WriteLine("Setup Cost (USD)");
Console.WriteLine("----------------------------- ----------");
Console.WriteLine($"{"Opus alone, full context",-29} {opusOnly.Total,10:F4}");
Console.WriteLine($"{executor.Model + " + Opus advisor",-29} {pair.Total,10:F4}");
Console.WriteLine($"\nAdvisor verdict:\n{verdict}");
Console.WriteLine(Budget);
return 0;
}
private static async Task<(string Text, Usage Usage, long Ms)> Call(IChat chat, string system, string user, int maxTokens)
{
var estimate = (system.Length + user.Length) / 4 + maxTokens; // rough; use a real tokenizer for production
var id = Budget.TryReserve(estimate)
?? throw new InvalidOperationException($"Budget refused admission. {Budget}");
var sw = Stopwatch.StartNew();
string text; Usage? usage;
try { (text, usage) = await chat.SendAsync(system, user, maxTokens); }
catch { Budget.Settle(id, null); throw; } // the call may have been billed; we cannot know
Budget.Settle(id, usage);
if (usage is null) throw new InvalidOperationException("No usage report. Ledger halted.");
return (text, usage, sw.ElapsedMilliseconds);
}
}
Running it
# 1. Break down a real Claude Code session.
# On my machine the logs live under ~/.claude/projects/<project>/<session-id>.jsonl
dotnet run -- transcript ~/.claude/projects/my-repo/SESSION_ID.jsonl prices.json
# 2. Cache-warm vs cache-cold on the API. The prefix must be long enough to be cacheable,
# so feed it a big file, for example a concatenation of your source tree.
find ./src -name "*.cs" -exec cat {} + > prefix.txt
export ANTHROPIC_API_KEY=sk-...
dotnet run -- probe-api prefix.txt prices.json 6
# 3. Same probe against the local cheap tier.
dotnet run -- probe-ollama prefix.txt qwen2.5-coder:7b
# 4. One task, two setups.
dotnet run -- advisor ollama task.md context.md prices.json
dotnet run -- advisor haiku task.md context.md prices.json
A few design choices worth defending, because I went back and forth on them.
The ledger counts raw tokens, not dollars. That is deliberately crude, and it is wrong in an instructive way: a cache-read token and an output token count the same toward the budget even though their prices differ by a large multiple. In a reread-heavy session, a raw-token budget will trip much earlier than a dollar budget would. I kept it because the halting behavior was the part I wanted, and I would rather a budget be too strict than too loose. If you adapt this, budget in cost-weighted tokens.
The cold-turn rule is a heuristic. “Nothing read from cache and something written” catches most expiry, and the five-minute gap rule catches the rest. It will misclassify the very first call of a session and any turn where Claude Code restructured the prompt for its own reasons. I report cold turns as a count and an average for that reason, not as a precise figure.
Thinking is not separated. The usage block gives you output tokens, and reasoning tokens are part of them. So my “output incl. thinking” line is an upper bound on thinking, not a measurement of it. Spector’s 9.5% figure presumably came from a finer split than mine, and I cannot reproduce it with this harness.
What these numbers do and do not show
I want to be careful here, because cost articles have a way of turning one run into a rule.
What a run like this can show: the shape of your own bill. Whether rereading dominates in your sessions the way it did in Spector’s. Whether your cold turns are rare and cheap or frequent and brutal. How much a single expired cache costs you in your actual codebase with your actual prefix size. Those are things you can act on tomorrow.
What it cannot show:
- That routing does or does not save money in general. The advisor test is one task, run once. Agents are not deterministic; run it ten times and the spread will be wide.
- That the cheap executor’s work was as good. The advisor’s verdict is a proxy, and an Opus reviewer that only sees the diff can approve a change that breaks something outside the diff. I counted cost; I did not run a quality eval.
- Anything about Spector’s exact percentages. My category split is coarser than his, and my thinking line is an upper bound.
- How the prompt-cache-control mod or the advisorModel setting behave inside Claude Code. I described both from newsletter coverage and tested the patterns with my own harness, not the features themselves.
- The local run’s real cost. Ollama shows up as zero dollars, which is a lie of omission: my laptop’s time, power and the quality gap of a 7B model are real costs that this ledger does not see.
What I am changing
Three things, all small.
I stopped thinking of effort as the main cost dial. It is a quality dial that happens to move the smallest slice of the bill. I now use low effort only for work where I am confident the agent will not need a retry, and high effort for anything that verifies or decides.
I pay attention to pauses. If I am about to step away for more than a few minutes in the middle of a large session, I either finish the thought first or accept that the next turn will be expensive. Seeing the cold-turn average next to the warm-turn average in my own logs made this concrete in a way no explanation did.
And I am treating routers with suspicion until someone shows me a measured session where the router did not keep breaking cache continuity. The advisor pattern, where the expensive model sees a small context occasionally, is the version I find more convincing on paper. Whether it holds up across more than one task is the next thing I want to measure, and I would genuinely like to see other people’s transcript breakdowns, especially ones that disagree with the 82% figure.
Sources: Itai Spector, “Jev Router for Claude Code Saves Less Than You Think” (Medium, member-only; author-run measurements). Ranknod, “Set and Track a Token Budget for an AI Workflow in .NET” (C# Corner). My own “Tail Rent” (Towards AI). The Code newsletter, coverage of Claude Code mods and the advisor hack (7 to 10 October 2026) and of Simon Willison’s notes on budget caps (9 October 2026). Anthropic’s effort-level guidance and Haiku 5.5 pricing as summarized in those sources; check the official pages before budgeting on them.
Tags: claude-code, llm-cost, prompt-caching, ai-agents, dotnet, ollama, token-budget, model-routing
Top comments (0)