Safe Unattended Agent Automation with Five Laws
Описание и применение
Автор описывает систему безопасной автоматизации с помощью агентов, работающих ночью. Ключевые принципы: бегун управляет блокировками, агенты работают в изолированных ветках, никогда не затрагивая main, и генерируется обязательный отчет даже при отсутствии работы. Это предотвращает хаос и обеспечивает прозрачность.
Задача
Unattended agents with write access pose a high risk of causing system instability or data corruption if they run without strict governance, leading to 'waking up to a mess'.
Результат
The implementation of five strict laws allows for safe, unattended automation. The system successfully processes nightly queues without interfering with daytime work, ensuring that every morning produces a clear report of activities, skips, and required human interventions.
Рабочий процесс
- Schedule a nightly job to read a queue of pending work.
- For each target, the runner takes a claim (lock) on the target.
- The runner spawns a headless child agent in its own worktree.
- The runner refreshes the heartbeat on a timer while the child runs.
- The child performs work, commits to its own tree, or exits.
- The runner releases the claim always (on exit, crash, or kill).
- The runner pushes work to an isolated per-night branch (if enabled) and restores the previous branch.
- The runner generates an unconditional report detailing what happened, what was skipped, and what needs human attention.
- The developer reviews the report in the morning.
Доказательства
Five nightly reports in, the streak is young but every morning has had one waiting, and that is the property I refuse to lose.
Automation you have to check up on is just unfinished automation.
- Дата записи: 2026-09-06T06:22:13.303Z