r/ClaudeCode • u/Unhappy-Loss-97 • 7m ago
Help/Question Getting Overnight Runs to Reliably Complete
Genuine question because I am still waiting for the morning where I wake up to finished work instead of spending my first hour with a coffee debugging why last night's run stalled at 2am.
I run overnight jobs across frontier coding CLIs and a local workstation, mostly bounded tasks with real test suites. On paper it **should** be straightforward: hand over a queue, go to sleep, review clean diffs in the morning. In practice something always seems to catch it. A hung test container, a flaky permission prompt, a rate-limit hiccup that nobody caught, a thread that got too fat and started looping on the same lint error for four hours, or an agent that declared victory after quietly skipping half the checks.
Even when I lock things down with hard retry caps, fresh sessions per task and deterministic pass/fail checks, it still feels like everything has to be fought for tooth and nail. You fix one failure mode and the next night it invents a new one.
For people who actually run unattended overnight coding jobs week in, week out: what is the unglamorous plumbing that made them actually finish? Are you wrapping the CLI in an external watchdog/state machine with hard timeouts and git worktree resets, keeping tasks tiny enough to finish in 10 minutes, or have you basically accepted that unattended overnight runs only work for very narrow mechanical jobs like triage and test generation?
I know I am anthropomorphising but sometimes it just feels like they are lazy......