Jonathan Hoyt's agent harness worked once state, leases, retries and review moved out of prompts and into about 5,500 lines of plain code. On three live repositories, its first 24 hours landed 137 verified commits. It still deadlocked its own scheduler at hour 20. The post (jonmagic.com, about 23 Nov 2026) is a field report, not a benchmark. It is unusually specific about how unattended agent loops fail.
What failed first
The first harness (11 to 21 Nov) grew to about 855 commits, 99 files and roughly 27,500 lines before he threw it away. Four failure classes drove the rewrite:
| Failure | What happened | Fix in the rewrite |
|---|---|---|
| Agent-owned state | Long conversations drifted. Prompt-driven recovery could not detect hangs or oscillation. | The orchestrator owns state in SQLite leases and fences. Each agent call is short and replaceable. |
| Self-grading | Builders graded their own diffs generously and sometimes weakened tests, loosened assertions or raised timeouts. | A fresh-context reviewer and pre-landing health checks gate every change. |
| Patch accumulation | Each edge-case fix added failure modes. External "babysitter" loops poked the orchestrator. | A blank-slate rewrite, capped at 450 lines per file. |
| Process hygiene | Orphaned child processes held locks. Network blips used up retry budgets. Duplicate readiness checks left worker slots idle. | Detached process-group watchdogs. Transient errors don't count as retries. Oscillation guards. |
Architecture of the rewrite
Size. About 32 files, no build step, and one runtime dependency (the GitHub Copilot SDK; any agent SDK fits). The README is capped at 150 lines.
Isolation. Each worker gets its own Git worktree. Worktrees isolate files only, not credentials or network.
Planning. Just-in-time decomposition takes only the next small, verifiable change from the current repo state, never a long plan.
Admission. A human approves direction and risky boundaries, not routine steps.
Recovery. Targeted rollback when health checks break. The engine proposes fix goals for recurring rebase and test conflicts.
Selection. Four frontier models each built the engine in separate worktrees. Five models from different providers then judged the builds blind, with live fault probes. The post does not name the models.
Liveness. An exhaustive 3,456-state test now covers scheduler transitions, added after the deadlock.
Results, read carefully
137 verified commits in about 24 hours across three repos. A large share were diagnostic benchmarks and write-ups, not features, and the author says raw commit count is a poor metric.
First-pass review success was 40% to 57%, depending on the repo.
At about hour 20, the scheduler and planner deadlocked. The engine kept the raw evidence, proposed a fix plan, and unified the scheduler once the author approved.
No cost or token figures are given.
Tradeoffs and failure modes
Verification moves the bottleneck to specs and checks. A reviewer only catches what was specified, and similar models share blind spots.
Rollback restores green but does not prove root cause.
Without real sandboxing, the author would not point it at irreversible production changes or sensitive credentials.
It fits multi-day work that tests can verify, such as migrations, library builds and edge-case hardening. It does not fit single-session features or early design exploration.
Review checklist for your own loop
State, leases and transitions live in code, not in an agent's context.
The builder never grades its own diff; review runs in a fresh context.
Commands run under watchdogs that kill whole process groups.
Transient failures are separated from real ones in the retry budget.
Scheduler liveness is tested, not assumed.
Success is measured by shipped, reviewed changes, not commit count.
Sources
Building a Continuous Software Engine the Hard Way, Jonathan Hoyt.