dangerously-skip-permissions using a devcontainer
Status Fixed / completed
Maintainer reply ✓ Yes — bcherny
Activity 9 comments · opened May 1, 2025 · closed May 1, 2025
💡 Likely answer: A maintainer (bcherny, collaborator)
responded on this thread — see the highlighted reply below.
I am getting
╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ WARNING: Claude Code running in Bypass Permissions mode │
│ │
│ In Bypass Permissions mode, Claude Code will not ask for your approval before running potentially dangerous commands. │
│ This mode should only be used in a sandboxed container/VM that has restricted internet access and can easily be │
│ restored if damaged. │
│ │
│ By proceeding, you accept all responsibility for actions taken while running in Bypass Permissions mode. │
│ │
│ https://docs.anthropic.com/s/claude-code-security │
│ │
│ 1. No, exit │
│ ❯ 2. Yes, I accept✔ │
│ │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Enter to confirm · Esc to exit
root@cc-master:/workspace# claude --dangerously-skip-permissions
--dangerously-skip-permissions cannot be used with root/sudo privileges for security reasons
I totally understand the security concerns, but as I am in a self made dev-container, I explicity want also root to be able to run the skip-permission mode.
9 Comments
Fixed in 0.2.98
Thanks for the report!
I am sorry, but it seems not to be the case
Can we re-open that ticket? This is somehow important to me.
Sure, I could add a user in the container, but actually I do not want to do that for other reasons, to be honest
Same issue here with a custom sandboxing solution that only has the one root user.
Same use case - can this be reopened @bcherny?
Edit:
dangerously_unpatronize_user.sh:and iiuc _on a Mac_ a
rootuser has (almost?) no security impact on the host vs a different userto get around this, I'm just injecting all the tools into
allowedTools...For others hitting this thread via google search, I see now that an environment variable has been added:
IS_SANDBOX=1So just launch like
IS_SANDBOX=1 claude --dangerously-skip-permissionsThis issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.