YOLO Mode
Configure Claude Code to run tools automatically without constant prompting.
Fastest Way (Full Bypass)
Add this to your project's local settings to allow ALL tools to run automatically.
<project>/.claude/settings.local.json (project-local) {
"permissions": {
"defaultMode": "bypassPermissions"
}
} This gives the AI full autonomy. In rare cases, it could theoretically run destructive commands like rm -rf ... if it hallucinates or misinterprets a task. Only use this in isolated environments or if you have good backups (git).
Recommended Configuration (Safer Approach)
Allow all commands by default, but block dangerous operations that could cause irreversible damage.
<project>/.claude/settings.local.json (project-local) {
"permissions": {
"allow": [],
"deny": [
"Bash(rm ~/)",
"Bash(rm /)",
"Bash(prisma db push)",
"Bash(npx prisma db push)",
"Bash(npm run db:push)",
"Bash(bun run db:push)",
"Bash(pnpm run db:push)",
"Bash(rm -rf /:*)",
"Bash(rm -rf ~:*)",
"Bash(sudo rm -rf :*::*)",
"Bash(dd if=/dev/zero of=/dev/sd*:*)",
"Bash(mkfs.:*::*)",
"Bash(fdisk:*)",
"Bash(parted:*)",
"Bash(chown -R /:*)",
"Bash(chmod -R 0 /:*)",
"Bash(shutdown:*)",
"Bash(reboot:*)",
"Bash(systemctl poweroff:*)",
"Bash(git reset --hard:*)",
"Bash(git clean -fdx:*)",
"Bash(git push --force:*)",
"Bash(docker system prune -af:*)",
"Bash(docker volume rm -f :*::*)",
"Bash(prisma migrate reset:*)"
]
}
} This configuration uses wildcards to allow all Bash, Read, and Write operations, while the deny list blocks destructive commands like database drops, force pushes, and system modifications.
Reference: Additional Commands List
For comprehensive documentation on permission scopes and syntax, visit the Official Claude Code Documentation