i-am-jacob:~$

~ / writing / agents-build-overnight

Agents That Build While You Sleep

autonomy · harnesses

The dream sold by every demo: hand an agent a big goal at bedtime, wake up to finished work. The reality after running overnight builds for real: most attempts die by hour three — context bloats, the model loses the plot, errors compound, and you wake up to confident garbage or a hung process. This is how the workshop's overnight build loop actually works, including the parts that exist specifically because things went wrong.

Principle one: compile the plan while someone smart is watching

The fatal move is giving a runner a goal and hoping. Instead, planning happens upfront, gated, before anything runs unattended: the epic gets decomposed into checkbox steps where every step names its files and its done-test — the exact command whose exit proves the step worked. Expansion itself goes through a gate: a step claiming to decompose work must produce leaves with proof commands and file assignments, or the whole expansion is rejected.

File ownership is exclusive per step. Two workers editing the same file overnight is how you get merge conflicts nobody resolves until morning. The planner assigns disjoint territories; violations are rejected structurally, not hoped away.

Principle two: fresh context every single call

Each worker invocation gets exactly one step plus its touched files — nothing else. No shared rolling conversation, no accreted history, no hour-six context soup. Context bloat isn't a gradual degradation; it's where hallucinated completed-work lives. Fresh context per call means hour six behaves like minute one, because for the model, it is.

Principle three: fail twice, revert, block, move on

  • Green = tick + commit. The done-test passes, the box gets checked, the work is committed. No batch commits at dawn.
  • Fail = one retry with the error in hand. Sometimes the fix is literally reading the stack trace.
  • Fail twice = revert, block the file, move on. A stuck worker doesn't get a third attempt to dig deeper; it loses the territory and the fleet keeps moving. Morning-you decides whether the blocked piece matters.
  • Budget caps everything. Token and clock ceilings mean the worst night costs a known quantity, not an open-ended burn.

Principle four: state lives on disk, not in the process

A kanban board and a journal live as files. Kill the runner mid-flight — crash, OOM, mistake — and restart resumes from the board. Nothing important exists only in RAM or only in the model's head. This sounds obvious and is skipped constantly, usually until the first kill -9.

Principle five: laws, not manuals

The runner's prompt carries about ten behavioral laws — verify before claiming done, never touch files outside ownership, escalate blockers instead of improvising around them. It does not carry a 400-step operations manual, because long instruction documents decay across a session: compliance erodes hour by hour until step 300 is being executed from memory of step 30. Laws survive; manuals rot. Every procedure that must happen belongs in the harness code, where decay is impossible, not in the prompt, where it's inevitable.

Morning report, not morning archaeology

The run ends with a report: boxes ticked, blocks raised, budget spent, journal excerpts. Watchdogs fire mid-run only for genuine anomalies — the difference between a watchdog and spam is that a watchdog has nothing to say most nights. And because every step committed independently, reviewing the night's work is reading diffs, not reconstructing events from logs.

hrsunattended runtime
2strikes then block
~10laws in prompt
100%steps w/ done-tests

// the honest summary

Unattended autonomy isn't a smarter model. It's boring infrastructure: exclusive territories, proof commands, disk-persisted state, and a revert muscle. The model does an hour of work at a time; the harness makes sixty of those hours add up to something.