Aditya Dutt Pandey

Building zerd · 2026

Published · 7 min read

zerd is a coding agent that checks its own work, then shows you the evidence.

What zerd is and what changed in the rewrite. The name, the Rust rewrite, one binary instead of a Python project, and the parts that moved into code: the pre-run backup swap that tells a pre-existing failure from one you caused, the signature guard, the citation check, and the model repair layer that lets a cheap model do real work. Plus the limits.

I built a coding agent called melon over three weeks in October and wrote about it here: the six-hour version, the failures, and the build log, 426 commits in ten days.

It's called zerd now. The code is at github.com/Adityaadpandey/zerd.si and it lives at www.zerd.si.

The idea didn't change. A coding agent that ends every run with a confident "done" is asking you to trust a sentence. zerd replaces that sentence with checks.

One binary

melon was a Python project. You needed Python, and a virtualenv, and the right versions of a dozen packages, next to whatever your own repo needed.

zerd is one native Rust binary. No Python, no Node, nothing to install next to it, whatever your repo is written in.

That sounds like packaging. It isn't. The rewrite was forced by something real: the checks zerd runs are your project's own checks, and the fastest way to run a Python project's pytest is from a process that already knows where everything is. The agent's own overhead had to get small enough that the check was the expensive part, not the harness.

curl -fsSL https://www.zerd.si/install.sh | sh

The first launch walks you through setup. You pick where models come from, paste a key, and it checks the key against the provider before you use it.

What a run looks like

You ask for a change. What you see is the harness working, not a model narrating.

> change unique_by() to take a key function and drop the seen= argument
  Routing to the strong model (read by the fast model): claude-opus-5-5
  Verifying: python3 -m pytest -q -x tests/test_unique.py
  Verification failed (python3 -m pytest ...); repair attempt 1/2
  The change breaks 1 public signature(s) (utils.py: unique_by() no longer accepts `seen`); asking to keep old calls working
  Independent review of the diff...
  Reviewer found issues; sending them back for a fix
  status: verified
  checks: 1 passed
  review: clean
  citations: 4 checked, 0 unverified

Every line there is a decision made by code: which checks to run, whether a failure is the agent's or was already there, whether a public signature broke, whether the review has to go again.

The final status is always one of verified, unverified, verification_failed, failed or done_no_changes. There is no bare "done".

An unverified result says which kind it is. No check covers these files. Checks still running in the background. A check was already failing before you started. Only docs changed.

It knows whose failure it is

This is the part I'd keep if I had to keep one.

After edits, zerd picks checks for the changed files only, never a whole build. pytest for the tests that import the changed module, found through an import graph. go vet, cargo check, eslint, tsc --noEmit for the package a changed TypeScript file lives in, promtool, docker compose config for infra YAML, plus your own verify_commands.

Then the part that matters. When a check fails, zerd swaps in the pre-run copy of your files, runs the same check again, and puts the agent's files back.

If the same errors appear on the clean tree, they were already there. zerd says "was already failing before your change; leaving it alone" and the agent is never sent to fix what it didn't break. The run ends unverified, not verified.

If the errors are gone on the clean tree, the run broke it. That goes back to the model as a repair request, with the real output, up to two rounds. Then it escalates to the strong model.

You don't need to have been broken before to benefit. You need to know which of the two you're looking at.

Checks that don't hold your prompt

A slow typecheck shouldn't cost you your attention. After verify_wait_sec, 30 seconds when you're at the prompt, the check carries on in the background. It prints ✓ background checks passed or the failure when it lands, and a failure reaches the model with your next message.

When no check covers the files at all, a .sql migration or a TypeScript file in a project with no tsc installed, zerd asks the model once to run something that proves the change. A passing python3 client.py or curl after the last edit counts.

The signature guard

Checks prove the code runs. They can't see the caller in another repo.

The signature guard compares each changed Python and JS/TS file with HEAD and flags a dropped parameter, a newly required one, reordered positionals, a removed *args or **kwargs, or a function that is no longer exported. The agent is sent back once to keep old calls working.

It exists because of a miss in my head-to-head with Claude Code. I asked for a dedupe change, unique_by lost its seen= parameter, the tests passed, and the run said verified, because no test covered the old call. For a tool built on proof, that's the worst kind of failure.

A cheap model can do real work

Open models are good at the hard 80% and sloppy at the mechanics: a wrong tool name, a stringified argument, a reply that ends mid-sentence. A frontier model barely notices. A cheap one burns rounds on it.

zerd absorbs those in code, so they don't depend on how good the model is that day.

What the model does What zerd does
Calls Read, bash, str_replace Maps it to read_file, shell, edit
Sends old_str, file_path, newString Renames to the real parameters
Sends a list of edits as a JSON string Parses it
Writes a tool call into its answer Says "text is not run" and re-asks, twice at most
Is cut off by the output limit Continues where it stopped. A cut tool call is never run
Hits "prompt too long" in any of 20+ wordings Compacts and retries once

Routing is by role: default, fast, strong, summarize, review, advisor, challenge. Each is a fallback chain. A request is classified without a model call, small work goes cheap, debugging and concurrency go strong, and a failed repair or a detected loop escalates.

When a provider's quota runs out, zerd fails over to another provider and tells you.

The rules are code

"Please don't touch my SSH keys" in a prompt is a request, and a model can forget a request. So the rules sit in the tool registry that every call passes through, for the main agent, sub-agents and parallel workers alike.

File tools resolve the path first, so .. and symlinks that lead out of the workspace are refused. Shell commands are scanned for paths in your home, /etc, other users' folders or .. escapes, and history-destroying git commands are blocked. On macOS an OS sandbox sits under both, so a command can't write outside the workspace or read ~/.ssh, ~/.aws, ~/.gnupg, keychains, or the workspace's own .env.

A cloned repo can't turn on code execution. Its .zerd/config.toml cannot enable hooks, MCP servers, verify commands or approval until you trust that exact file, and editing the file revokes the trust.

Every path and path:line in the final answer is looked up in the real tree. An invented file or a line past the end of one goes back for one correction. Whatever's left is shown as a warning.

What it can't do yet

The OS sandbox is macOS only. On Linux and Windows you get the confined file tools and the shell path scan, not the kernel layer. On Windows, that scan looks for Unix-style paths, so a command naming a C:\... path outside the project isn't caught the way /etc/passwd is.

There's no image input, so you can't paste a screenshot, and no IDE extension. Signature checks cover Python and JS/TS, and Python outlines use an indentation-based reader rather than a real parser. Diagnostics come from tsserver for TypeScript and quick checkers elsewhere, not a general language server.

Token counts are estimated from bytes, not counted exactly.

One more thing about "one binary". zerd brings nothing to install next to it, but your repo still needs its own toolchain. If it's a Python project, you need Python and pytest for the checks to run. The binary is the agent, not your project's dependencies.

What's next

The rewrite is the newest chapter, not the last one. What I'd like to see next is a head-to-head where both sides run against the same real infrastructure, since the two I ran didn't have that.

If you want to try it: www.zerd.si.

By , CTO of tunyt

← All writing