Leave Claude Running Overnight.
How do I leave Claude Code running overnight without it freezing?
Pin the model with `/model claude-fable-5-1` (full name, not the `fable` alias). For headless runs use `claude -p` with `--permission-mode auto` and `--permission-prompts none` so unanswered prompts are denied and the job keeps going. Cowork has no exact flag equivalent — use Automatically approve and know Dispatch auto-denies after ten minutes.
What Actually Changes?
You kicked off an overnight job, went to bed, and woke up to Claude frozen on a permission prompt at 3am. Hours wasted, nothing finished.
Same job, right flags. Morning coffee, finished task. The overnight run completed because prompts were auto-denied instead of hanging forever.
How Do You Set It Up?
Watch the walkthrough, then read the steps below.
Understand What Goes Wrong.
Two failure modes kill overnight jobs. First: the run freezes on a permission prompt nobody is awake to answer. Second: you typed `/model fable` and the alias resolved to a different model than you expected. Both are silent failures — you only find out when you check in the morning.
The freezing problem is specific to headless CLI runs. Interactive sessions stay open waiting for you; headless runs just hang until something kills them.
Pin The Model By Full Name.
Use `/model claude-fable-5-1`, not `/model fable`. The alias `fable` (or `best`) can resolve to different models as Anthropic updates the gateway — fine for interactive work, not fine when you need reproducible overnight results. The full model name pins to exactly what you tested.
Check Anthropic's pinning guidance and the Claude Code v2.1.257 release notes. The gateway alias `fable` still resolves to Fable 5, but that can change without notice.
Stop The 3am Freeze.
Add `--permission-prompts none` (available since v2.1.259). Critical facts: this flag only applies with `--print` / `-p` (headless mode). Values are `host` (default) or `none`. It does NOT auto-approve — unanswered prompts are denied, and the run continues. Pair it with `--permission-mode auto` so most safe operations proceed without asking. This is not the same as `bypassPermissions`, and there is no `settings.json` key for it.
Think of it as "fail closed and keep going" instead of "approve everything" — safer for unattended runs.
Assemble The Full Command.
Put it together: `claude -p "your task here" --model claude-fable-5-1 --permission-mode auto --permission-prompts none`. This runs headless, pins the model, auto-approves safe operations, and denies anything that would otherwise freeze the run waiting for input.
Test the command once interactively during the day before trusting it overnight. Verify the model loads and the task starts correctly.
What Should You Use It For?
Kick off a refactoring job at 11pm and wake up to a finished PR, not a frozen terminal.
Run large analysis or migration scripts overnight without babysitting permission prompts.
Schedule Claude tasks in cron or CI pipelines knowing they will complete or fail cleanly, never hang.
When Should You Skip It?
- •The task needs human judgment mid-run. Denying unknown prompts means some operations will be skipped — only use this for tasks you trust to run unattended.
- •You want everything approved automatically. This setup denies uncertain prompts; it does not bypass them. If you need dangerous operations approved, you need a human present.
- •You are running interactively. These flags are for headless `-p` mode; in a normal session they do nothing useful.
What Does This Replace?
The habit of leaving a terminal open overnight and hoping for the best. It does not replace testing your task first — it just makes unattended runs predictable instead of fragile.
Where Next?
* Tool outputs shown in video walkthroughs are representative. Results vary by account, setup, and configuration.
Verification
- Last verified:
- September 4, 2026
- Platform tested:
- Claude Code CLI (terminal)
- Plan tested:
- Max (API access required for headless runs)
- Model shown:
- Fable 5.1
- Official source:
- Anthropic: Claude Fable and Mythos 5.1
- Screenshots updated:
- September 4, 2026