Claimed result
- Author: 0xjmori (an X account focused on AI agents, automation and production systems; Substack "lunarresearcher").
- No financial result: it's a design framework for making agents reliable, built around one idea: "a better prompt improves one response, a better harness improves every run".
- The article was bookmarked by more than 1,450 people out of ~827,000 views (a bookmark-to-like ratio of about 3:1, a sign of "keep this" content).
- Several blocks of the original (the sample task contract, the tool contract, the four memory categories, the permission ladder, the failure classification, the receipt and the final checklist) were images missing from the downloaded text: here they are reconstructed from the author's own description in the text, without inventing fields he doesn't name.
Proof: framework. No before/after metrics or company case; the author cites "the source material" on the topic (progressive disclosure, independent verification) without naming it. The principles match those of other sources in this theme that carry more proof.
The key idea
The model is only the reasoning engine; the agent is the model plus everything that lets it find the right context, use tools, preserve state, respect permissions, verify its own work and recover when the environment behaves unexpectedly. Put the same model in a chat box and it answers questions; put it inside a repository with terminal access, tests, browser tools, project memory, controlled permissions and a review loop and it completes real work. The model didn't change: the harness did.
Three levels of question: - prompt engineering: what should I tell the model? - context engineering: what should the model know right now? - harness engineering: what system lets the model act, verify its work, recover from failure and operate safely?
Models will keep changing; the durable advantage lives around them.
Step-by-step playbook
1. Stop fixing at the wrong layer
The typical loop: the agent fails → rewrite the prompt → it fails again → add instructions, switch models, widen the context window, connect another tool → the same problems come back. The recurring symptoms the author lists: - it forgets an important decision; - it uses the wrong tool; - it loses track of what happened three steps earlier; - it claims the task is finished without checking the result; - it retries the same failed action until the budget is gone. These are almost always defects of the environment, not the model.
2. Turn every request into a contract
Natural language is flexible; autonomous execution should not be. "Improve the onboarding flow" is fine with a human sitting next to the model, but terrible as a production instruction. Before the agent acts, the request becomes a bounded task contract (goal, scope, constraints, and above all a done_when field).
- Without done_when, the agent can solve a slightly easier version of the problem and still confidently call it complete.
- With done_when, completion becomes measurable.
- The agent's question changes from "what should I do next?" to "what action moves the current environment closer to the contracted outcome?": a much stronger loop.
3. Give a map, not a giant context window
The common reaction to mistakes is to give more context (documentation, history, files, tool output) until the agent receives everything and understands less. - Context is not storage, it's an attention budget. - Instead of dumping the whole project into every run, give a small map of where useful information lives and expand only when needed (progressive disclosure: load more because the task needs it, not because the information exists). - The goal is not maximum context but maximum useful signal.
4. Put a gateway between the model and its tools
A model with twenty tools isn't twenty times more capable: it may have twenty more ways to fail. - Every tool has a contract (what it does, arguments, effects, permissions). - Execution path: the model decides the action it wants → the harness decides whether it's valid, permitted and safe → the tool executes. - The distinction becomes critical when tools can send messages, modify production, spend money or delete data. - A good gateway also adds timeouts, argument validation, file-path restrictions, error normalization and safe retries. "Good tools reduce the number of things the model has to guess."
5. Move memory outside the conversation
The conversation should not be the system of record: long-running agents eventually hit context limits, crash, restart or hand work to another session. If important decisions exist only in the transcript, the workflow is fragile. - Durable state is stored separately, split into four memory categories (an image in the original). - The next session should inherit the state of the work, not "a compressed story about the previous conversation".
6. Evidence is the completion gate
An agent saying "done" is not proof: it's another model output. - The harness needs observable evidence; deterministic checks first. - Don't ask another model something a compiler, test, schema or database query can prove. - Rule: models for judgment, deterministic systems for facts. The model creates the artifact, the environment creates evidence about the artifact, the harness decides whether the evidence is sufficient.
7. Separate the builder from the verifier
The agent that created the mistake often carries the same assumptions into the review. - A stronger architecture: separate worker and verifier, with their own rejection criteria and enough independence to challenge the assumptions behind the first result. - The verifier doesn't ask "does this look good?" but "what would make this unacceptable?": review shifts from confirmation to attempted disproof.
8. Move permissions outside the model
Some rules must never depend on the model remembering them: they aren't prompt suggestions, they're policy. - Permission ladder: the stronger the consequence, the stronger the control (from free reads up to irreversible actions that need approval). - The model recommends the action, the harness authorizes it, the tool executes it. - "Autonomy is not the absence of control: it's freedom inside an enforced boundary."
9. Stop retrying blindly
The worst recovery policy: "something failed, try again". If nothing changes, the system is paying to reproduce the same failure. - First classify the failure (a table by error type in the original), then pick the response. - Every loop has limits on attempts, time, spend and destructive scope. - A reliable agent must know how to continue and also when another attempt is no longer worth it.
10. Turn repeated instructions into infrastructure
- "Always run the formatter" is stronger if the formatter runs automatically.
- "UI code may not directly access the database" is stronger as an architecture test that fails when the rule is broken.
- Progression (the original's ladder): instruction in the prompt → written rule → automatic check → constraint of the environment. The prompt explains judgment, the harness enforces invariants. Every recurring mistake moves one rung down, until the model no longer needs to remember the lesson: the environment remembers it.
11. Record the run
A perfect final artifact can hide a terrible execution path: the wrong source, an ignored failed command, an external action repeated twice, ten times the expected budget, the right answer for the wrong reason. - Useful traces: context sources, tool calls, state changes, verification results, retry reasons, approval decisions, cost and latency. - The point is to make failure local: if step 18 breaks, you repair step 18 without replaying the whole run.
12. Give every run a receipt
Don't force the human to review a forty-message transcript: compile the result into a small receipt. It's not a summary of what the model claims happened, but of what the harness can prove happened. It's useful for reviews, handoffs and future sessions.
13. Make every failure improve the harness
Most teams fix the failed output; it's better to fix the system that allowed the failure. One repaired output helps one run; one repaired harness improves every run after it. The best systems get more reliable because mistakes leave infrastructure behind.
14. Start with the smallest useful harness
You don't need a huge orchestration platform. Build in layers: - a short research task may only need a prompt and one review; - a six-hour coding task with file, network and deployment access needs much more. - Add complexity when the failure surface earns it, not because the architecture looks cool.
Checklist before granting autonomy (reconstructed from the sections)
Before giving an agent meaningful autonomy, check whether you have: a contract with done_when; a context map with on-demand expansion; tool contracts and a gateway; durable state outside the chat; deterministic evidence of completion; an independent verifier; permissions enforced outside the model; failure classification and limits on attempts/time/spend; traces; a final receipt. If several answers are "no", a stronger model won't make the agent reliable: it will make the failure faster and more expensive.
Tools and costs
- No specific tool or cost: the principles hold on any stack (coding agents, computer-use agents, custom pipelines).
- Typical components mentioned: a repository with terminal access, tests, browser tools, project memory, controlled permissions, a review loop, a formatter and architecture tests in CI, a tracing system (cost and latency per run).
- Implicit cost: engineering time for contracts, gateways and verifiers; implicit savings on blind retries and repeated runs (not quantified by the author).
Limitations
- No quantitative proof: no before/after, no measured error rate; it's a set of good engineering practices.
- Many concrete examples in the original (the contract, the tool contract, the four memory categories, the permission ladder, the failure table, the receipt, the checklist) were unavailable images: anyone who wants the exact fields should read the original.
- The author promotes his own newsletter; the text cites "the source material" without naming it.
- Building a full harness has an engineering cost that may not pay off for small agents: the author himself advises starting from the minimum.