Skip to content
← All guides
Guide

Running Coding Agents Unattended Overnight Without Babysitting

September 21, 2026

You scoped a big refactor, kicked off Claude Code before bed, and expected to wake up to finished work. Instead the agent has been idle since 1:14 a.m., parked on a single question it wouldn't answer alone — should I delete the old migration files? — while seven hours of unattended runtime went nowhere. Or the version that's worse: it did decide on its own, guessed wrong, and you wake up to a change you'd never have approved.

Running a coding agent unattended — overnight, or just while you're away from the keyboard — is worth doing, and it's where the quiet failures live. To run Claude Code unattended (or Codex, or any MCP agent that allows long-running tools) and trust the result, you need three things: fewer needless stalls, hard gates on what can hurt you, and a way to be reached for the decisions that genuinely need a human.

The two ways an unattended run goes wrong

Leave an agent alone long enough and it fails in one of two directions:

  • It stalls. The agent hits a decision it won't make on its own and waits — silently, in a terminal nobody's watching. Every idle minute is runtime you paid for and didn't get.
  • It overreaches. With nothing gating it, the agent guesses on an irreversible call — a dropped table, a force-push, a rm -rf — and does the thing you'd have stopped.

The mistake is treating these as one knob: how much do I let it decide alone. They're two problems. The fix is to make the safe work run without you and the risky work reach you.

Cut the number of decisions before you walk away

Most overnight stalls are avoidable. The agent asks because the task left it guessing. Before you step away:

  • Write a spec, not a sentence. State the branch, the constraints, the files that are off-limits, and — most important — what done looks like. Ambiguity at midnight becomes a blocked run at 1 a.m.
  • Hand it the verification. Give the test or build command up front so the agent checks its own work instead of stopping to ask whether it worked.
  • Pre-answer the predictable calls. "Prefer the existing pattern," "don't add dependencies," "skip anything needing a prod credential." Each one is a stall retired in advance.

A tightly scoped task is the biggest lever on how far a run gets before it needs you.

Let the reversible stuff run; gate the irreversible

The second lever is permissions. Both Claude Code and Codex can run without prompting on every step — but how you configure that is the whole game:

  • Don't skip all permissions. Running fully unattended with every guardrail off is exactly how the "it overreached" failure happens.
  • Allowlist the safe, reversible actions — reading files, editing within the working tree, running the test suite — so a routine edit at 2 a.m. doesn't halt the run waiting for a click.
  • Keep the irreversible actions gated — deletions, migrations, pushes, anything touching production or money. These are precisely the calls a human should make.

Done right, "unattended" stops meaning "approves everything" and starts meaning "runs the safe path alone, stops only for what matters."

For the decisions that are left, be reachable

Here's the catch that sinks most overnight runs: once you've correctly gated the irreversible stuff, those gates have to open somehow. If the only way to answer is typing into a terminal, then "gated" just means "stalled until you wake up" — you've traded the overreach failure for the stall failure.

So the last piece is a channel that reaches you where you actually are — asleep, or away — and carries your answer back into the run. Not a louder alert. A two-way one.

AgentCall: a phone that rings only when it matters

That's the job AgentCall does. It's a pure-MCP voice bridge: when your agent hits a gated decision, an approval, or the finish line, your phone rings. You pick up, the agent explains what it's stuck on in its own words, you talk it through, and it resumes — the words you speak become the answer it was blocked on, with no getting up to type anything.

For unattended runs specifically, a few properties earn their keep:

  • You define what's worth a ring. Standing rules in plain language decide which events warrant waking you — irreversible actions, explicit approvals, failures, completion. A 3 a.m. ring is only ever a real one.
  • Miss it and nothing breaks. Don't answer within a few minutes and the agent is told the call went unanswered, then proceeds on its best judgment; the missed call sits in your History, and with voicemail on the agent can leave a short message. Being asleep doesn't hang the run forever.
  • Mishearing can't cause damage. Because transcription is untrusted, the agent confirms destructive instructions out loud before acting — a misheard "drop the table" doesn't become a dropped table.
  • No AI in the middle. There's no chatbot between you and your agent; your speech becomes text for the agent, its text becomes speech for you. It never invents words your agent didn't say.
  • Your code stays put. AgentCall never sees your repo, terminal, or files — only the words your agent chooses to speak aloud, and only to your signed-in devices.

Connecting is one command:

bash
claude mcp add --transport http --scope user agentcall https://agentcall.io/api/mcp

Sign in with Google, add AgentCall to your phone's home screen so it can ring you, and place a test call from the Quickstart before you rely on it overnight. It's free while in beta, speech minutes included — no card, no trial clock. Claude Code is the tested client; Codex CLI works in beta; other MCP clients that allow long-running tool calls should work but are untested.

Name check: this is AgentCall.io, voice escalation for coding agents. It's not agentcall.co, an unrelated programmable SMS/voice API for building telephony into your own app. Different product, different job.

A pre-flight checklist for an overnight run

Before you close the laptop:

  1. Spec it tight — branch, constraints, definition of done, pre-answered decisions.
  2. Allowlist the reversible, gate the irreversible — never skip permissions wholesale.
  3. Set standing rules for what's worth a call, so the ring is signal, not noise.
  4. Place one test call and turn voicemail on, so a missed ring still leaves a record.

Do that and the safe path runs while you sleep, and the two or three calls that genuinely need you find your phone instead of a dark terminal.

Next: Connect AgentCall in one command → · Get notified when Claude Code finishes or gets stuck →