Skip to content

Loomwork · № 007

Picking Sonnet vs Haiku for each agent role (the cost math)

·4 min·Loomwork

Cover art for “Picking Sonnet vs Haiku for each agent role (the cost math)”

Vamshi Krishna V.

Patient work, woven in public.

This is Thread 07 of Loomwork. New here? Thread 01 explains why this newsletter exists — 2 minutes.

Every agent in Foundry calls Anthropic. The right question isn't which model is best. It's which model is right for this job, at this moment, at this cost.

Here's the breakdown. Then the math. Then the rule that catches the system if both are wrong.

The model selection matrix.

GitHub specialist — claude-haiku-4-5 Pattern recognition over a known schema. PR titles, diff structure, issue labels. Cheap inference, high volume. 1 run/day · 4,336 in / 860 out tokens · $0.0069/run

Vercel specialist — claude-haiku-4-5 Log scanning + deploy-status diffing. Bounded vocabulary, fast turnaround. No reasoning needed. 1 run/day · 5,614 in / 682 out tokens · $0.0072/run

Master agent — claude-sonnet-4-6 Synthesis across heterogeneous specialist findings. Holds context, names priorities, writes the brief in the operator's voice. 1 run/day · 3,152 in / 740 out tokens · $0.0206/run

Real numbers queried from Supabase, Jun 6 2026. GitHub: 10 runs, Vercel: 4 runs (went live later — directionally correct, will normalize), Master: 10 runs.

Notice what's not on this table: anything reaching for Opus. Opus is the right call for a different kind of work — a multi-step planning agent, a hard creative draft, anything where I'd rather pay more than re-prompt. The first-agent platform doesn't have a job for Opus today. When it does, it gets one row in this matrix and its own cost cell. Not before.

The cost math — real numbers, week one.

Per-day at current scale (two specialists + master, one run each at 9 AM ET):

One dollar and five cents a month to run the full pipeline. That number surprised me — in a good way. The Haiku calls are so cheap they barely register. The Sonnet call (master synthesis) costs three times more per run, but it runs once. The design holds: cheap models for cheap work, one premium call for the output that actually matters.

At projected steady state — five specialists running, higher daily GitHub volume — the math scales to roughly $8–14/month. Still inside the $80 ceiling with headroom for two more agents. The model split is what keeps it there: every new specialist defaults to Haiku unless there's a specific reason to argue for Sonnet.

The annual budget I locked at the start was $1,000 for everything — build time, run time, tooling. At $1.05/month for agent runs, year-1 run costs land under $15. Comfortable.

Match the model to the job, not the other way around.

The rule that catches the system if both are wrong.

If model selection is off, costs creep. If load assumptions are off, costs jump. Either way the system has to stop spending before it surprises me. The rule:

$80/month hard ceiling, enforced in the model client.

The flow:

Every Anthropic call passes through one client wrapper that checks a running monthly tally first. At $64/month (80% of ceiling), the system enters essentials-only mode. Only the master agent runs. Specialists skip their next scheduled run silently. The morning briefing carries a small "specialists paused — under cost ceiling" note so I see why coverage thinned. At $80/month, every agent shuts down. Master included. The briefing surface shows "agents disabled — budget exceeded." No prompt fires until the next billing month or until I raise the ceiling explicitly.

The ceiling is enforced where the spending happens — in the client — not in middleware, not in a billing alert, not in a dashboard. That matters because middleware can be bypassed and dashboards can be ignored. The client wrapper is the only path to Anthropic the agents have, and it will refuse before it spends.

What this is not — and why that's deliberate.

It's not auto-scaling. The model assignments are static. If GitHub specialist's job changes — say, it starts needing to read entire PR conversations to classify duplicates correctly — I'll change its model row in the matrix, run the new cost math, and re-deploy. That's a deliberate decision, made by me, with the math in front of me. It is not the system shifting models on its own to chase a quality target.

It's not a routing layer. There is no LLM-as-router picking which model gets which call. Routing layers are a real pattern but they make cost prediction harder, not easier — exactly the opposite of what I want at this stage. When the system is big enough that fixed assignment leaves real value on the table, I'll consider it. Until then, the static matrix is the disciplined choice.

Next Sunday: The classifier prompt I rewrote four times — and why. Four prompt versions side by side, with the eval data behind each iteration.

See you then.

— Vamshi

Loomwork is by Vamshi Krishna Veggalam. Building Foundry at mindloomhq.com. Find me on LinkedIn.

P.S. — Foundry now has a dark mode. If you've opened it, your system preference should have picked it up. There's a toggle too — sun, moon, or match-system. Small thing. Couldn't help it.

This thread first ran on LinkedIn on June 7, 2026 — the conversation is over there. Read it on LinkedIn and join the thread