Mercury CLI

Notes

2027 will be the year of the harness

· by @dubsthedev

2026 was the year of agents. 2027 will be the year of the harness.

A coding agent isn’t just a chat window with bash bolted onto the side. Yet most of the tools people spent this year arguing over were built as if the model were the whole product. That held up while every quarter brought a huge jump in raw capability. Now frontier models drop every few weeks, and the comfortable assumption doing the rounds is that once you put a human developer in the loop to review the diff, the risk is handled. It is not.

A language model is engineered to produce code that SOUNDS right, which is a wholly different thing from code that is right. It writes a broken patch in the same confident tone as a working one, and you cannot meaningfully supervise a black box that gives you a different answer each time you ask.

That drops every developer into an ugly operational bind. Verify every line an agent writes by hand, and the speed you bought is gone. Skim the diff because the formatting looks tidy and you are tired at 6pm, and the human in the loop stops being a check and becomes a rubber stamp for the machine.

Software has one huge advantage over a legal data room, though. In code, you do not have to check everything with your own eyes. The machine can check. And the place where checking is made cheap is the program sitting around the model: the harness.

That is the whole bet behind Mercury CLI, which I have been building and using as my daily driver for the last seven months. Keep the workflow as the main loop, let the model slot in as the engine underneath, and build verification into the tools themselves instead of praying the model got lucky.

Start with how an agent reads and edits code. In Mercury, reading a text file mints a content anchor, so an edit aimed at a file that changed under you fails before anything is written. Multi-file edits go through ChangeSet, which previews the plan without touching disk, checks every file’s digest before applying, rereads each target afterwards, and rolls back if anything drifted. Refactoring runs through language servers (LspRead, LspRename, diagnostics) and tree-sitter structural search and rewrite across 57 languages (AstSearch and AstEdit, pure WASM) rather than brittle regex over raw text.

Next, stop letting agents guess at bugs from print statements. Mercury ships a built-in DAP debugger: the agent can set breakpoints, step through a live process, inspect the stack, scopes and live variables, and evaluate expressions directly (Python’s debugpy and JS/TS’s js-debug ship bundled; Go, Rust and others hook into external adapters when installed). The Test tool covers seven frameworks, reruns only failing tests, and launches named tests straight into the debugger.

Finally, stop letting one model mark its own homework. Because the transcript lives in the harness, /model lets you switch engines mid-session with the whole history and tool results intact, or hand the finished work to a separate crewmate via /verify with an adversarial brief that has to end in VERDICT: PASS, FAIL or PARTIAL. When you want to run local weights or rented GPUs instead of one cloud lab, /localsetup and /llmhost run under the exact same tools and checks.

A concession is due, and it should be made plainly. A harness does not turn a vague spec into good software, and piling gimmicks onto a CLI just creates a fresh kind of clutter. That is why 1.1.0 replaced Mercury’s turn loop with Pi’s core for simplicity, while cutting Continue Last Session on my Windows test machine from 17.3 s to 10.3 s. Even our own 250-session handoff-note study showed the tradeoff cleanly: 95% to 100% recall of prior decisions against 0% cold, at the cost of the note intruding on an unrelated question in 90% to 95% of sessions for two of the three model families.

Models will keep getting swapped out every few months. The harness is not an add-on around them. It is the only place where checking gets cheap enough to keep the speed without turning the developer into a rubber stamp.

Mercury CLI is open source (Apache 2.0). Pull it down, try to break it, and tell me what is still missing: github.com/Whq02/MercuryCLI