[BUG] --dangerously-skip-permissions cannot be used with root/sudo privileges for security reasons

Resolved 💬 15 comments Opened Oct 8, 2025 by omayhemo Closed Mar 9, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When I try to run --dangerously-skip-permissions I get the error cannot be used with root/sudo privileges for security reasons

What Should Happen?

Claude Code should run as I choose it to run. If I choose to sandbox I'm taking my own safety into my own hands.

Error Messages/Logs

--dangerously-skip-permissions cannot be used with root/sudo privileges for security reasons

Steps to Reproduce

  1. Install Claude Code
  2. Run claude --dangerously-skip-permissions with a root account
  3. enjoy Claude being obtuse and refusing to start.

This is an ignorant change. Revert this or allow us a parameter to override. I run CC sandboxed, my risk is my business. This is the last straw before I permanently move the team to Codex.

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.0.10

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Warp

Additional Information

_No response_

View original on GitHub ↗

This issue has 15 comments on GitHub. Read the full discussion on GitHub ↗