fix: pass --permission-mode bypassPermissions to claude -p in executor#37
Merged
Merged
Conversation
The claude-code executor branch invoked `claude -p` without a permission mode, so the inner Claude session would refuse to edit files in non-interactive mode and the run would silently produce no patch. Governor already isolates each attempt in a temporary git worktree, and scope.py rejects any change outside allowed_paths — the kernel is the trust boundary, the inner session does not need its own permission prompts. examples/oss_fix_demo/ was working around this with a custom executor; with this fix the bundled executor.sh works out of the box.
There was a problem hiding this comment.
Pull request overview
This PR fixes the bundled roles/executor.sh “claude-code” execution path so that claude -p runs with an explicit permission mode in non-interactive runs, allowing Claude to actually apply edits in the worktree (with the kernel remaining the enforcement boundary via worktree isolation and allowed_paths scope checks).
Changes:
- Add explanatory comments documenting why permission prompts are bypassed in the inner
claude -psession. - Invoke
claude -pwith--permission-mode bypassPermissionsfor theclaude-codeexecutor branch.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Protocol-zero-0
added a commit
that referenced
this pull request
May 26, 2026
Patch release shipping the executor.sh permission-mode fix (PR #37). Status badge stays at v1.1 — covers the whole v1.1.x line.
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
roles/executor.shclaude-codebranch invokedclaude -pwithout a permission mode. In Claude's non-interactive mode that means the inner session refuses to edit files, so the kernel run silently produced no patch and every attempt got rejected.scope.pyrejects any change outsideallowed_paths— the kernel is the trust boundary. The innerclaude -psession does not need its own permission prompts.examples/oss_fix_demo/shipped its own executor as a workaround. With this fix the bundled executor.sh works out of the box.This is the v1.1 follow-up item that has been on the docket since v1.1.0 ship. Targets a v1.1.1 patch release after merge.
Test plan
claude -p "..." --permission-mode bypassPermissionsactually writes files in the worktreetwine upload