Notes on AI agents and MCP
Short, plain notes about building AI agents and MCP servers that work in real businesses: what works, what breaks, and why.

July 3, 2026
You can't unit-test a dice roll
Developers bolt an LLM into a system, write a normal pass/fail test around it, watch it flake, and then either delete the test or mock the model into meaninglessness. Both are wrong. A probabilistic component isn't broken when it varies — but 'it varies' is not permission to stop testing it. You just have to test the distribution instead of the sample: score a golden set with tolerance, gate on a pass rate, assert the invariants that must hold every time, and keep a hard line between the stochastic core and the deterministic shell around it.
- methodology
- eval

July 1, 2026
AI code debt doesn't get paid back. It compounds silently.
The cost of AI-generated code isn't the bug you catch in review — it's the flaw that survives, unowned, in a codebase nobody has a mental model of. A 2026 study of 300k+ AI-authored commits found that nearly a quarter of the issues AI introduced were still there at HEAD. Human debt gets paid down because someone remembers writing it. AI debt just accumulates, because no one did. The only real hedge isn't more test coverage. It's comprehension.
- architecture
- methodology

July 1, 2026
'RAG is dead' is a category error
Every time context windows get bigger, the headline returns: 'RAG is dead, just put everything in the prompt.' It's wrong every time, and it's wrong for an instructive reason — it confuses a technique with a problem. Retrieval didn't die; naive vector-database RAG did, and it's being replaced by smarter retrieval, not by no retrieval. 'X is dead' is almost always the sound of someone mistaking the current implementation for the permanent need underneath it.
- methodology
- architecture

July 1, 2026
The bottleneck moved. You're still optimizing the old one.
For thirty years the scarce resource in software was writing code, so we optimized everything around typing speed. AI made writing nearly free — and the constraint quietly relocated to verification: reading, trusting, and accepting output. Most teams never restructured. They're pouring more water into a funnel whose neck is now review, then wondering why 'faster' didn't feel faster. Velocity metrics lie because they measure the half that's no longer the bottleneck.
- methodology
- ai-native

July 1, 2026
'Workslop' isn't productivity. It's a tax.
AI was supposed to do the busywork. In a lot of teams it does the opposite: it generates plausible-looking output that a human downstream has to detect, decode, and redo. Researchers named it 'workslop,' and the numbers are ugly — 53% of desk workers say they've received it, each instance costs ~2 hours to fix, and it quietly poisons trust between coworkers. It's not a productivity gain. It's a productivity transfer — and someone downstream is paying the bill.
- business
- methodology

July 1, 2026
Your million-token context window is lying to you
Vendors sell context length like RAM: bigger is strictly better, just stuff everything in. But attention isn't uniform. Studies keep finding the same U-shape — a model reliably uses the start and end of its window and quietly ignores the middle, with accuracy dropping 30%+ once the important thing is buried in there, sometimes after just 10k tokens. Context isn't a bucket you fill. It's a scarce, positional resource you engineer. 'Put it all in the prompt' is the new premature optimization.
- architecture
- methodology