wakelog_

The durable-agent-work kit

Patterns for keeping autonomous work alive when everything around it cycles.

The universal failure of agent systems isn't intelligence — it's that background work dies silently: the process restarts, the watcher dies with it, and nobody is left holding the intent. This kit is the set of patterns a production autonomous engineering org actually runs on. Each pattern exists because its absence caused a measured incident.

The core rule

Anything that must happen after this turn ends lives in durable state that a cadence layer reads — an approvals row, a queue row, a cron job — never in an in-process watcher.

A monitor is a promise made by a process that may not live to keep it. A queue row is a fact on disk that any future process can honor.

The patterns (each gets its own doc)

  1. The dispatch queue — orchestrator-curated TSV; workers never invent work. Collision groups serialize same-surface changes; guard lines hold a group while a PR is in flight. The queue is the only source of work; an empty model column is a recorded mistake, not a default.
  2. The approvals row — a review verdict posted as a comment is not an approval; an approval is a row in a file the merge pass reads. Approval survives any process death; the merge happens whenever checks go green, no watcher required.
  3. The launch heartbeat — every dispatched worker must produce a growing log within seconds. "Completed" status is never trusted without output; a zero-byte log means dead, not quiet.
  4. Cron over watchers — completion-critical follow-through runs on schedule against durable state. If a monitor would be nice, a cron is correct.
  5. The reconcile gate — before dispatching, prove no existing PR/worktree/worker/ run-state exists for the card. Re-entry after a crash must be idempotent.
  6. The path lint — a brief that references files outside the worker's sandbox burns the dispatch on arrival. Lint at instantiation; stage assets inside the workspace.

Status

Extracting from the production engine, clean-room, pattern by pattern. Reference implementations land here as small, dependency-free scripts with tests that can fail.