Writing · Topic

Building the harness

How the kernel is built: schemas as contracts, guards, coordination state, and what breaks when an agent runs unattended.

9 pieces

Common questions

Where should an agent's coordination state live?
In the database. If a run can suspend for three days waiting on a client, every piece of state that resumes it has to survive a deploy, a crash and a second replica — which rules out memory, however convenient it is.
Why should an agent's output have a schema?
Because a schema is a completion contract, not after-the-fact validation. Treat it as the definition of done — the run ends the moment a valid result is written — and several unrelated failure modes disappear at once.
Why do ordinary concurrency guards fail for client work?
They are all vertical. A row lock stops one job running twice; nothing in a typical system counts how many times one human hears from you. Three correct schedules and three correct runs still produce three emails to the same client.
What should an agent do when it cannot finish?
Ask, or hold. A finished run has three honest fates — deliver, ask, or hold — and the fourth, shipping whatever came out, is the one that puts a serialised object in front of a paying customer.