Telling Technology · Learning in public
All episodes
EP.138 — SKIP THE MODEL
A Claude Code workflow · scheduled agents, one gate before the model

9.9 million tokens to re-read tabs nobody had touched

Every 15 minutes a scheduled Claude run read all my open Claude Code tabs and wrote each one a next step. Most of those tabs had not moved since the last run. It judged them again anyway, from scratch, on my top model. In one week that was 374 runs and 9.9 million output tokens, and my weekly Fable limit was gone two weeks in a row. The fix was not a smarter model. It was a question asked before the model: did anything change?

A large wall clock whose ticks drop glowing token coins down a chute into a roaring furnace, with a single brass gate valve on the chute being turned shut
⌁ AIOS babe2eb8 · 374 runs · 9.9M output tokens · 1 week · +196 / −31
first: what the conductor actually does
01 The setup

An AI that checks on my other AIs, every 15 minutes

I run a lot of Claude Code tabs at once. Most of them are waiting: on me, on a build, on nothing. In EP.110 I built the conductor to tell me which ones need me. A Windows task, AIOS-Conductor, fires Invoke-Conductor.ps1 every 15 minutes. Stage 1 is plain Python: it reads every open tab, its last prompt, its last reply and its tickets, and applies the cheap rules. Whatever the rules cannot settle goes to a headless claude -p --model fable run, which reads each tab and writes it one proposed next step. Every tab, every run, whether it had moved or not.

claude code — desktop
> walk me through one scheduled conductor run
Every 15 min: Invoke-Conductor.ps1 takes the lock, then starts claude -p --model fable with the run prompt. The run calls conductor_propose.py --stage1, judges every row in pending.json, writes one item per tab and merges them into proposals.json. There was no step that asked whether a tab had changed since the last run.
A vertical timeline of 15-minute ticks from 21:30 to 23:15, each tick sending the same six session tabs into a Fable run, five of the tabs greyed out as idle
before · Oct 2026
every tick, every tab (mockup)
02 The bill

374 runs, 9.9 million tokens, and nothing had changed

The week before the fix the conductor made 374 runs and 9.9 million Fable output tokens. That is about 26,000 output tokens per run, spent mostly on writing the same verdicts again. My weekly Fable limit ran out two weeks running, and the work I actually wanted Fable for queued behind a supervisor. The cause was boring. Most tabs were idle. Their last prompt, last reply and tickets were identical to 15 minutes earlier. The run had no memory of having judged them, so it judged them again, in full, up to 96 times a day.

claude code — desktop
> why did the conductor eat the whole weekly limit?
Because it paid full price for no news. Most rows in pending.json were the same as in the last run, apart from fields like idleSec that tick up on their own. The run re-judged all of them from scratch every 15 minutes. The model was the expensive part, and there was no gate in front of it.
Two horizontal bars: before, 374 runs and 374 model calls in coral with 9.9M output tokens; after, the same scheduled runs with a short teal bar for model calls, marked only when a tab changed
1 week · numbers from the commit
runs vs model calls (mockup)
03 The fix

Fingerprint every tab. Exit 10 if one changed.

Two small parts. One: conductor_propose.py --prep runs stage 1, then takes a SHA-256 fingerprint of each tab’s row: session id, title, last prompt, last reply, whether it ends with a question, its tickets, its hint. When every fingerprint matches the cache in llm-cache.json, prep reuses the cached items, writes the proposals itself and exits 0. When any tab is new or changed, it exits 10. Two: the launcher only starts claude on 10. On 0 it sends the notification and stops: zero LLM calls. And the default model dropped from Fable to Sonnet, because judging a tab’s next step never needed my top model in the first place.

claude code — desktop
> make the scheduled run skip the model when no tab changed
Done in babe2eb8. --prep exits 0 when every row’s fingerprint hits the cache, 10 when one is new or changed. Invoke-Conductor.ps1 runs prep first and only starts claude on 10; any other prep failure falls back to the old claude run. $Model default is now sonnet. 59 lines of tests in test_conductor_propose.py.
A dark PowerShell editor showing the LLM gate: prep runs, its exit code is read, exit 0 sends the notification and logs LLM skipped, and only exit 10 continues to the claude run
Invoke-Conductor.ps1 · +23 lines
the gate, from the commit
⚠️

A naive fingerprint would never match (and two limits I kept)

If the fingerprint covered the whole row, it would change every run, because idleSec grows on its own. So the hash leaves out the volatile fields (idleSec, ctx, state, pid) and keeps only what would change the verdict. Two limits I have not fixed. The gate is all or nothing: one changed tab re-judges every tab in the batch. And the gate fails open: if prep crashes, the run falls back to calling claude, so a bug costs tokens rather than proposals. I have no post-fix numbers yet. The first gated week is the real test.

04 How the gate decides

Nine fields, three exit codes, one model switch

The whole fix is 196 lines added across six files, most of them in conductor_propose.py and its tests. The pictures below are mockups of the real pieces: which fields go into the fingerprint, what each exit code does, the model default, and the commit that explains it. Tap any image to enlarge it and read the exact prompt that drew it.

THE LESSON I PAID 9.9M TOKENS FOR

The cheapest model call is the one you skip

When a scheduled agent costs too much, the first instinct is a cheaper model or a shorter prompt. Both help. But my conductor’s real problem was that it called the model when it had nothing new to say. A scheduler needs a “did anything change?” gate before it needs a smarter model. The clock still ticks every 15 minutes. Now a tick with no news ends in Python.

The clock and furnace from the hero, later: the brass gate valve is shut, the token coins pile up harmlessly in front of it, the furnace has cooled to a dull glow, and the clock keeps ticking
AIOS babe2eb8 · Invoke-Conductor.ps1 + conductor_propose.py · first gated week still to measure
06 Steal this

Steal the change gate

The pattern fits any scheduled agent: fingerprint the input that matters, cache the model’s answer against it, and let a cheap script decide with an exit code whether the model runs at all. Leave the volatile fields out of the hash, and decide up front whether a failed check should fall back to the model or skip it. Everything in this episode is free and open — clone it, run it, make it yours.

skill conductor_propose.py --prep (gate half) cmd the exit-0 / exit-10 launcher block template FP_KEYS: what to hash, what to leave out assets clock, furnace and valve stills
run it # repo soon. The shape: scheduler fires → cheap prep script builds the rows → sha256 of the fields that matter per row → all hit the cache? write cached answers, exit 0, no model → any miss? exit 10 → launcher starts claude -p --model sonnet only on 10 → merge caches each new answer against its row’s fingerprint

No GitHub? Comment GATE on the post and the bot DMs you the link.

Next episode

Never half-write a config file

The same week another of my tools learned to edit my shell config the careful way: keep a .bak, write the new file in full, then swap it in one move. Next: why a script that edits ~/.zshrc should never leave it half-written.

A dark terminal window holding a config file mid-swap, a ghosted .bak copy behind it and a single atomic arrow replacing the old file with the new one
next in the chain · follow so you don’t miss it