Contents15 of 15
Download the PDF (892 KB)Before You Blame the ModelThe pages to keep · screenshot these
Reference
The pages to keep
The flowchart, the spellbook, the glossary, and where every number comes from.
#Before you blame the model
Next time your agent does something dumb, work down this list in order. Any step that fails is a harness or eval problem, and the chapter beside it shows the fix.
#Twelve rules, and a bonus
- 01 · THE WIRE Measure at the wire. Every request you decline to send is an event with a name.
- 02 · THE BILL Price every stage by whether it ever changed the output. A stage that never changes anything is a tax.
- 03 · THE CACHE Treat your prompt's prefix as a contract. Keep it byte-stable, and put what changes at the end.
- 04 · FORGETTING Decide what your agent forgets, on purpose. Facts live in your records, and every drop announces itself.
- 05 · THE VOICE Before you rewrite an instruction, move it. Who says it and where it sits come first.
- 06 · GUARDS If it matters, make it a guard. If it's prose, assume it'll be ignored.
- 07 · DONE The model's "done" starts verification. Your code runs the checks, on tests the model can't touch.
- 08 · THE PIPE Audit delivery, not intent. If your code knows it, check that the request shows it.
- 09 · THE CRASH Save data, not the agent. Prove a resume by rebuilding the exact request you sent before.
- 10 · PLUGGED IN It isn't a feature until a receipt shows it reached the model. Print what actually ran.
- 11 · THE PLACEBO No fix counts until it beats a placebo of the same size, on a sample noise can't explain.
- 12 · THE CLOCK Time the model and your code separately, every turn. The harness is usually slow first.
- B · THE TEST Tune on one set, judge on one you never look at. A change that only helps where you looked is an answer key.
And the one that sits under all twelve: when an agent looks dumb, don't ask "do I need a bigger model?" Ask "what did I fail to give it?"
#Glossary
- Harness. Everything around the model in an agent: the code that builds requests, runs tools, keeps state, checks work and handles failure.
- Turn. One trip around the loop. The model picks an action, the harness runs it, and the result goes back in.
- Run. One start-to-finish attempt at a task.
- Context window. The most text, in tokens, a model can take in one request.
- Prefill. The work a model server does reading your prompt before it writes anything. On long prompts this is often most of the wait.
- Prefix cache. A server keeping the prefill work for the start of a previous prompt, so an identical start doesn't get processed again.
- KV cache. The memory where a server stores that processed prompt. Its size limits how many agents can share one GPU.
- Tool schema. The description of a tool (name, arguments) sent to the model so it knows what it can call.
- Mixture of experts (MoE). A model that only uses part of its parameters for each token, so a large model runs at close to a small one's speed. It still needs the memory to hold all of them.
- Placebo arm. An experiment condition that changes the same amount of the prompt as your fix, but with no useful content.
- Lab vs live. A lab result tests one moment in isolation. A live result is the whole agent, start to finish, on a real task.
- Fail closed. When unsure, stop and say why, instead of carrying on with something that might be wrong.
#Where the numbers come from
My numbers. Unless a caption says otherwise, they come from my own agents running Qwen3.6-35B-A3B (about 3B active parameters, 4-bit) on llama.cpp. The model ran on rented cloud GPUs, usually a single 48 GB card. The harness, sandboxes and tests ran on a laptop and later on two older rack servers. The page-building results (Chapters 1, 2 and 11) come from 16 written briefs. The coding results come from bug-fix and feature tasks in real repositories. Several results are small pilots (n = 4 to 40), and they're labelled that way where they appear. Results produced by arithmetic on recorded runs, rather than fresh live runs, are marked in their captions. These are field notes from real engineering work, not a peer-reviewed study. Where a number surprised me, I said so. Where I couldn't isolate a cause, I said that too.
Outside sources, each checked against the original:
- Yang et al., "SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering", 2024. arxiv.org/abs/2405.15793. File viewer and history ablations, GPT-4 Turbo on SWE-bench Lite.
- Lindenbauer et al., "The Complexity Trap: Simple Observation Masking Is as Efficient as LLM Summarization for Agent Context Management", 2025. arxiv.org/abs/2508.21433.
- Liu et al., "Lost in the Middle: How Language Models Use Long Contexts", 2023. arxiv.org/abs/2307.03172.
- Hong, Troynikov and Huber, "Context Rot", Chroma, July 2025. trychroma.com/research/context-rot.
- Anthropic, "Introducing advanced tool use", November 2025. anthropic.com/engineering/advanced-tool-use.
- Cursor, "Dynamic context discovery", January 2026. cursor.com/blog/dynamic-context-discovery.
- Can Bölük, "We improved 15 LLMs at coding in one afternoon. Only the harness changed.", February 2026.
- Anthropic, "Infrastructure noise", February 2026. anthropic.com/engineering/infrastructure-noise.
- Prompt caching prices: the Anthropic and OpenAI prompt caching docs, checked November 2026. Prices change, so check the current docs.
Found an error, or got a different number when you tried something here? Tell me. Corrections go into the next edition with credit.