The nightly editor

July 30, 2026by rob

Our mechanics — the agents that fix broken nodes — cannot learn. Every run starts from nothing: a model, a shared operating manual, and a per-model hints file, injected as the prompt. Whatever a mechanic figured out at 3 a.m. is gone by 3:05. The fleet's only memory is the documents. So if the fleet is going to get better, something has to edit the documents.

Meme illustration for: The nightly editor

We built an editor that runs every night. This is how it works, and why the part we trust most is how often it does nothing.

Where the signal is

The first design question was what to read. A clean idle transcript is about 5 events. A routine fix is 30 to 60. The teaching signal lives in the long runs — the 285-event, 10-million-token runaway where a model polled the same status command in a loop for an hour. Those runs are where the wasted turns, the re-derivations, and the dead ends actually are.

So the editor doesn't run on a schedule, exactly. It runs nightly but acts on a grind gate: a single runaway (170+ events, or five million tokens burned in one run) makes that model's hints file due immediately. Moderately long runs need four before anything happens. And a quiet stretch triggers nothing at all, even after three weeks — if nothing ground, there is nothing to learn.

When a model is due, a grader model reads that model's worst transcripts, heaviest first, pre-distilled into cheap timelines. It also reads the other models' traces, because the best hint for a struggling model is often another model's clean path through the same problem. That has paid off literally: one engine solved a source build that another had escalated as "no source exists." The working path became a hint in the loser's file.

The rules for writing

The editor writes under constraints that are stricter than the ones we give the mechanics themselves:
  • Quorum. A pattern gets codified only if it recurs in at least three
independent runs. One dramatic run is not a trend. Thinner observations go on a named watch list at the bottom of the file, with citations, so the next pass can promote them if they recur.
  • Evidence lives in the changelog, not the manual. Hints stay short
imperatives. The reasoning and run citations go in an append-only changelog. The manual is injected into every run, so every line costs tokens fleet-wide — if the editor adds, it is expected to consider what to retire.
  • No direct write to the shared manual. A per-model pass that finds a
universal lesson can only emit a suggestion line. A second pass folds those into the shared manual, and only when corroborated across at least two independent models. One model's habit is not a fleet rule.
  • The safety section is frozen. The editor may only touch content above the
"Hard safety rails" heading. After every pass a wrapper compares that region byte for byte and rolls back the entire edit if a single byte moved. Safety changes route to the human operator, always.
  • Mangled output never ships. A crashed pass, an empty file, a lost header
— restore from backup, don't mark the pass done, retry another night.
  • Notify only on change. A pass that changes nothing sends nothing.
Silence is correct.

The refusals

What convinced us the loop was safe wasn't a great edit. It was a streak of non-edits.

At some point we reshuffled which models drive which workers, and the gate's attribution table went stale. Nightly passes kept being handed heavy runs labeled with a model that hadn't run in weeks. Codifying those patterns would have written one model's bad habits into another model's manual. Five consecutive passes read the evidence, concluded the file was dormant, refused to edit it, documented the attribution bug in the changelog with the exact two-line fix, alerted the operator once — and then declined to alert again, on the grounds that duplicate alerts are an anti-pattern its own hints file warns against.

One of those passes also caught something we hadn't: its file had changed between two nightly backups with no changelog entry. The edit itself looked fine. It flagged the provenance gap to the operator anyway, instead of assuming its own history was clean.

The lesson

In an agent-operated company, the process documents are the software, and a loop that edits them is a loop that modifies the running system. What makes that safe is not a smarter editor. It is a narrow write path: evidence thresholds, quorums, append-only changelogs, frozen regions with byte-level rollback — and a definition of success that includes doing nothing. The nightly editor's most common output is no output. That is exactly what lets us trust the nights when it writes.