Leaving Agents Running Overnight: A Sober Setup

A red, amber and green stack of domed lenses defines the black Status Light. It could summarize an overnight run only if both the event source and the light's unconfirmed control interface are made dependable.

What actually happens to an unattended overnight run?

The host may sleep, lose power or disconnect; a tool may wait for input; tests may hang; credentials may expire; and the agent may finish a response long before the requested outcome is verified. A terminal multiplexer preserves a process only while its host and multiplexer server remain running.

Current Claude Code documentation provides permission modes with different oversight levels. Looser modes reduce prompts but do not remove risk, and bypassing permissions is intended only for isolated environments. Use the narrowest mode and scope appropriate to the task.

How do you set up logs you can trust in the morning?

Run in an isolated worktree, record the starting revision and route command output to timestamped files that cannot expose secrets to other users. Keep agent transcripts, test logs and Git changes as separate evidence. Commit or checkpoint only reviewed boundaries.

Limit file size, preserve exit statuses and mark interruptions explicitly. A log ending mid-line is not success, and a final assistant message is not proof that checks passed.

How should the morning status greet you?

Show unknown until fresh state is read. Then present task, worktree, last event, update time and whether the expected verification command completed. Red can mean a confirmed failure, amber a waiting decision and green only the exact success condition written before leaving.

Open the full terminal and Git diff before clearing the signal. An ambient summary should lead to evidence, not replace it.

What should never run unattended?

Do not leave irreversible production changes, broad credential use, destructive migrations, financial actions or open-ended commands without an appropriate reviewed control boundary. Avoid tasks that can interpret untrusted external content while holding powerful permissions.

The Status Light provides a possible morning display, not safety or a confirmed integration. Prove the workflow on a disposable repository, test power loss and stale records and keep Shopify or any production publishing outside unattended agent runs. Set a time or work boundary and a safe stopping condition before leaving. A watcher can terminate a hung disposable test process, but it should not guess how to recover a deployment or database operation. Keep enough disk space for expected logs and make notifications quiet during sleep unless the event genuinely requires an immediate human response. Review usage and cost limits as part of the same preflight.

Back to blog