Skip to content

fix: pass --permission-mode bypassPermissions to claude -p in executor#37

Merged
Protocol-zero-0 merged 1 commit into
mainfrom
fix/executor-claude-permission-mode
May 26, 2026
Merged

fix: pass --permission-mode bypassPermissions to claude -p in executor#37
Protocol-zero-0 merged 1 commit into
mainfrom
fix/executor-claude-permission-mode

Conversation

@Protocol-zero-0

Copy link
Copy Markdown
Owner

Summary

  • The bundled roles/executor.sh claude-code branch invoked claude -p without 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.
  • 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 claude -p session 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

  • manual: claude -p "..." --permission-mode bypassPermissions actually writes files in the worktree
  • CI green on this PR
  • (post-merge) cut v1.1.1 tag + GitHub Release + twine upload

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.
Copilot AI review requested due to automatic review settings May 26, 2026 08:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 -p session.
  • Invoke claude -p with --permission-mode bypassPermissions for the claude-code executor branch.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Protocol-zero-0 Protocol-zero-0 merged commit 849e3a6 into main May 26, 2026
8 checks passed
@Protocol-zero-0 Protocol-zero-0 deleted the fix/executor-claude-permission-mode branch May 26, 2026 09:06
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.
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.

2 participants