Skip to content

fix(claude-code): don't pass --dangerously-skip-permissions in auto mode#846

Open
bdevore17 wants to merge 1 commit intocoder:mainfrom
bdevore17:fix/claude-code-no-bypass-in-auto-mode
Open

fix(claude-code): don't pass --dangerously-skip-permissions in auto mode#846
bdevore17 wants to merge 1 commit intocoder:mainfrom
bdevore17:fix/claude-code-no-bypass-in-auto-mode

Conversation

@bdevore17
Copy link
Copy Markdown

Summary

  • The task reporting code path in start.sh unconditionally adds --dangerously-skip-permissions regardless of the configured permission_mode
  • Workspaces using permission_mode = "auto" get both --permission-mode auto and --dangerously-skip-permissions, which defeats the purpose of auto mode
  • Only add --dangerously-skip-permissions when no explicit permission mode is set (backward compat) or when bypassPermissions is chosen

Test plan

  • Added claude-continue-resume-task-session-auto-mode test verifying --dangerously-skip-permissions is NOT passed when permission_mode=auto
  • Updated claude-auto-permission-mode test to assert --dangerously-skip-permissions is absent
  • Existing claude-continue-resume-task-session test still verifies default (no permission_mode) includes --dangerously-skip-permissions

The task reporting code path unconditionally added
--dangerously-skip-permissions regardless of the configured
permission_mode. This meant workspaces using permission_mode="auto"
got both --permission-mode auto AND --dangerously-skip-permissions,
defeating the purpose of auto mode.

Now only adds --dangerously-skip-permissions when no explicit
permission mode is set (backward compat) or when bypassPermissions
is the chosen mode.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant