Add engine.permission-mode as a first-class Claude engine config field#33658
Draft
Copilot wants to merge 3 commits into
Draft
Add engine.permission-mode as a first-class Claude engine config field#33658Copilot wants to merge 3 commits into
Copilot wants to merge 3 commits into
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…de engine - Add PermissionMode field to EngineConfig struct - Extract permission-mode from frontmatter in ExtractEngineConfig (both standard and inline-definition paths) - Add validateEnginePermissionMode that accepts: auto, acceptEdits, plan, bypassPermissions - Wire validation in compiler_orchestrator_workflow.go and compiler_string_api.go - Update GetExecutionSteps in claude_engine.go to honor explicit permission-mode before falling back to bash-wildcard logic - Add permission-mode to main_workflow_schema.json (engine_config oneOf variants 1 and 2) - Regenerate docs/public/editor/autocomplete-data.json - Add tests for extraction, validation, and Claude engine override behavior Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Decouple engine.permission-mode from bash-wildcard auto-selection
Add engine.permission-mode as a first-class Claude engine config field
May 21, 2026
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.
The network egress firewall injects
bash: ["*"], which triggered thehasBashWildcardInToolsheuristic and silently forced--permission-mode bypassPermissions, making--allowed-toolsenforcement ineffective. The only override was a fragileengine.argsworkaround relying on Claude CLI's last-flag-wins behavior.Changes
EngineConfigstruct — addsPermissionMode stringfield; extracted from frontmatterengine.permission-modein both standard and inline-definition code pathsvalidateEnginePermissionModerejects any value outside{auto, acceptEdits, plan, bypassPermissions}; wired into both compiler orchestrator pathsclaude_engine.go— explicitpermission-modetakes priority over the bash-wildcard auto-selection; fallback behavior is unchangedpermission-modeadded with anenumconstraint toengine_configvariants 1 and 2 inmain_workflow_schema.json;autocomplete-data.jsonregeneratedUsage
Setting
permission-mode: auto(oracceptEdits) with the firewall enabled now keeps--allowed-toolsenforcement active, decoupling tool-boundary policy from the firewall's bash wildcard injection.