[BUG] Extension crashes (exit code 1) when allowDangerouslySkipPermissions is set and running as root

Resolved 💬 4 comments Opened Mar 19, 2026 by GrazianoGuiducci Closed May 18, 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?

Claude Code Extension v2.1.79 crashes immediately with exit code 1 when running inside code-server (v4.109.2) as root user with claudeCode.allowDangerouslySkipPermissions: true.

What Should Happen?

Log shows:

--dangerously-skip-permissions cannot be used with root/sudo privileges for security reasons
Error: Claude Code process exited with code 1
Expected: fall back to normal permission mode with a warning, not crash. The security check is correct, but the failure mode is wrong — users see only "process exited with code 1" with no indication of the cause.

Workaround: remove claudeCode.allowDangerouslySkipPermissions from settings. Extension starts normally using ~/.claude/settings.json permissions.

Environment: code-server v4.109.2, Ubuntu VPS, root user.

Note: same error appears in logs from February 2026 with earlier extension versions — not new to 2.1.79.

Error Messages/Logs

2026-03-19T07:36:14.084Z [info] --dangerously-skip-permissions cannot be used with root/sudo privileges for security reasons
2026-03-19 07:36:14.111 [info] Closing Claude on channel: ouo2szotol
2026-03-19 07:36:14.112 [error] Error from Claude (on channel ouo2szotol): Error: Claude Code process exited with code 1

Steps to Reproduce

Steps to Reproduce:

Install code-server v4.109.2 on Linux as root user
Install Claude Code extension v2.1.79
Set "claudeCode.allowDangerouslySkipPermissions": true in VSCode settings
Open any project
Extension crashes immediately with exit code 1
Claude Model: None (crashes before reaching model selection)

Is this a regression: Yes, this worked in a previous version

Last Working Version: 2.1.78

Claude Code Version: 2.1.79

Platform: Anthropic API

Operating System: Linux

Terminal/Shell: code-server (browser)

Additional Information:

Workaround: remove claudeCode.allowDangerouslySkipPermissions from settings. The security check blocking --dangerously-skip-permissions for root is correct, but the extension should fall back to normal permission mode with a warning instead of crashing. Same error appears in logs from February 2026 with earlier versions.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

v2.1.79

Platform

Other

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

_No response_

View original on GitHub ↗

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