fix(cli): add --dangerously-skip-permissions to ClaudeCliProvider#1239
Merged
Conversation
Evals using `provider: claude` were hitting permission prompts on every tool call because ClaudeCliProvider never passed permission bypass flags to the Claude CLI. ClaudeSdkProvider already sets `permissionMode: 'bypassPermissions'` unconditionally, so this aligns the two providers. - Add `bypassPermissions` option to `ClaudeResolvedConfig` (optional, defaults to true in buildArgs) - Append `--dangerously-skip-permissions` to CLI args when `bypassPermissions !== false` - Read `bypass_permissions` from target YAML in `resolveClaudeConfig` - Add `executable` to test mock config; add three new tests covering default, explicit-true, and explicit-false behavior Closes #1238 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Deploying agentv with
|
| Latest commit: |
58491d7
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://bc502c35.agentv.pages.dev |
| Branch Preview URL: | https://fix-1238-claude-cli-bypass-p.agentv.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ClaudeCliProviderwas missing permission bypass flags, causing permission prompts on every tool call during evalsbypassPermissionsoption toClaudeResolvedConfig(optional, defaults totrueinbuildArgs)bypassPermissions !== false, appends--dangerously-skip-permissionsto the Claude CLI args — matchingClaudeSdkProvider's unconditionalpermissionMode: 'bypassPermissions'bypass_permissionsYAML field support inresolveClaudeConfigRed/Green
Red (before):
ClaudeCliProvider.buildArgs()returned['-p', '--output-format', 'stream-json', '--include-partial-messages', '--verbose']— no permission bypass flags, causing interactive prompts in evals.Green (after):
buildArgs()now includes--dangerously-skip-permissionsby default. Settingbypass_permissions: falsein the target YAML omits it.Test plan
ClaudeCliProvider.buildArgs()includes--dangerously-skip-permissionsby defaultClaudeCliProvider.buildArgs()includes the flag whenbypassPermissions: trueClaudeCliProvider.buildArgs()omits the flag whenbypassPermissions: falseCloses #1238
🤖 Generated with Claude Code