You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Redefining permission in subagents stopped working #27497
The issue affects version 1.14.50 and several versions before it.
In version 1.14.17 everything works correctly.
This inheritance behavior was changed in your code but not updated in the documentation, either you update the documentation, or don’t do something that breaks the entire logic of permissions.
Plugins
No response
OpenCode version
1.14.50
Steps to reproduce
In the orchestrator (primary agent) set edit: deny, and in the subagent set edit: allow.
As a result, the subagent now inherits edit: deny despite the fact that edit: allow is specified.
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
Reacted by Sergei Korolev, Otto Sulin, Dmitriy Gast and Stephan Schielke
If your issue is specifically about subagents being unable to override (loosen) a permission set by the parent/orchestrator agent, it may be distinct — please clarify in those threads if so.
I have this issue too, if I delegate subagent with edit: allow from a primary agent that has edit allow, it will work. When the 'orchestrator' style agent with no permissions delegates the subagent, the edit: allow is ignored
When the 'orchestrator' style agent with no permissions delegates the subagent, the edit: allow is ignored.
This is to prevent permission leakage, e.g., the Plan agent delegating to another agent to write on its behalf.
I added the PR above to find a middle ground, where if you have a matching edit permission rule between the parent agent and subagent, the rule won't be added to the new session's permission ruleset. This means that global deny permissions won't be added to the end of the list and overrule your other edit permissions (permissions match in a LIFO order.
This is to prevent permission leakage, e.g., the Plan agent delegating to another agent to write on its behalf.
then the whole point of the "orchestrator" pattern falls to the ground. Right now my orchestrator has much higher privileges than it should have because of that and I had to instruct it very hard not to do things on its own (like write), but rather delegate.
I think it should be solved with documenting and saying that agent might try to be sneaky and delegate to subagents when it's missing some permissions and not trying to protect users from it, because naturally I expected it to work because subagent had edit but it failed to do anything.
On top of that, I'd think of adding another option/setting on the agent definition which when set to true would behave as it currently does.
I agree with you @Vizualni , that's why I created the PR to find the middle ground, so I can continue with my orchestrator pattern without breaking the core premise of circumventing expected permissions.
I had more granular permissions set for edit, which all got overridden as well for the subagent session, but the above should now work (potentially with some caveats depending on how your orchestrator is configured).
Activity
github-actions commentedon May 14, 2026
This issue might be a duplicate of existing issues. Please check:
If your issue is specifically about subagents being unable to override (loosen) a permission set by the parent/orchestrator agent, it may be distinct — please clarify in those threads if so.
Vizualni commentedon May 19, 2026
I can confirm. This happens to me as well. I am on 1.15.5
mcgoughprogress commentedon May 27, 2026
I have this issue too, if I delegate subagent with edit: allow from a primary agent that has edit allow, it will work. When the 'orchestrator' style agent with no permissions delegates the subagent, the edit: allow is ignored
felixnorden commentedon May 28, 2026
This is to prevent permission leakage, e.g., the Plan agent delegating to another agent to write on its behalf.
I added the PR above to find a middle ground, where if you have a matching
editpermission rule between the parent agent and subagent, the rule won't be added to the new session's permission ruleset. This means that globaldenypermissions won't be added to the end of the list and overrule your other edit permissions (permissions match in a LIFO order.Vizualni commentedon May 29, 2026
While I understand the reasoning of
then the whole point of the "orchestrator" pattern falls to the ground. Right now my orchestrator has much higher privileges than it should have because of that and I had to instruct it very hard not to do things on its own (like write), but rather delegate.
I think it should be solved with documenting and saying that agent might try to be sneaky and delegate to subagents when it's missing some permissions and not trying to protect users from it, because naturally I expected it to work because subagent had
editbut it failed to do anything.On top of that, I'd think of adding another option/setting on the agent definition which when set to true would behave as it currently does.
felixnorden commentedon May 29, 2026
I agree with you @Vizualni , that's why I created the PR to find the middle ground, so I can continue with my orchestrator pattern without breaking the core premise of circumventing expected permissions.
I had more granular permissions set for edit, which all got overridden as well for the subagent session, but the above should now work (potentially with some caveats depending on how your orchestrator is configured).
github-actions commentedon Jul 29, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.