Skip to content

fix(task): preserve subagent self permissions#27201

Merged
kitlangton merged 1 commit into
anomalyco:devfrom
kitlangton:opencode/subagent-permission-hotfix
May 13, 2026
Merged

fix(task): preserve subagent self permissions#27201
kitlangton merged 1 commit into
anomalyco:devfrom
kitlangton:opencode/subagent-permission-hotfix

Conversation

@kitlangton
Copy link
Copy Markdown
Contributor

Summary

  • Preserve Plan Mode's inherited edit restriction for subagents.
  • Stop inheriting unrelated parent-agent self-denies like read, bash, and task into delegated subagents.
  • Add regression coverage for controller/executor deny-by-default delegation and parent session deny ceilings.

Test

  • bun run test test/permission-task.test.ts test/agent/plan-mode-subagent-bypass.test.ts
  • bun typecheck
  • push hook: bun turbo typecheck

Fixes #26700
Fixes #26747
Fixes #26758
Fixes #27123

@Sewer56
Copy link
Copy Markdown
Contributor

Sewer56 commented May 17, 2026

@kitlangton This PR introduces a regression.

Parent agents with scoped edit permissions like:

edit:
  "*": deny
  "specific-pattern": allow

now break subagents that have their own scoped edit allows:

edit:
  "other-pattern": allow

other-pattern can no longer be accessed.

Merging of permissions puts parent's "*": deny last, overwriting any allow rules by child.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment