Setting Up YOLO Mode for Headless Agents

YOLO mode lets Claude Code agents run without any confirmation prompts. Here's how to configure it safely.

What YOLO Mode Does

By default, Claude Code asks for confirmation before running potentially dangerous commands (deleting files, running shell scripts, making network requests). YOLO mode disables these confirmations — the agent runs autonomously without stopping to ask permission.

This is essential for overnight and long-running unattended agents. An agent that stops every 10 minutes waiting for your "yes" is not an unattended agent.

Enabling YOLO Mode in amux

Register your session with the --yolo flag:

amux register myagent --dir ~/myproject --yolo

This sets the --dangerously-skip-permissions flag in the underlying Claude Code invocation. You can verify it's active by checking the session config:

amux info myagent

Scoping YOLO Mode Safely

YOLO mode is powerful but requires deliberate scoping. Best practices:

Claude Code's Permission Model

Even in YOLO mode, Claude Code has a layered permission model:

YOLO Mode for Different Task Types

Task typeYOLO modeReason
Code generationYesLow risk, easy to review
Test runningYesTests are contained
Database migrationsDev DB onlyNever run against production
npm/pip installsYesReview package.json afterward
Deployment commandsStaging onlyManual review for production

Get started with amux

Run dozens of Claude Code agents in parallel. Python 3 + tmux. Open source.

git clone https://github.com/mixpeek/amux && cd amux && ./install.sh
amux register myproject --dir ~/Dev/myproject --yolo
amux start myproject
amux serve  # → https://localhost:8822
View on GitHub