anomalyco / anomalyco/opencode
Subagent escalating permissions
Open
@nexxeln is already working on this.
Since Jul 29, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
When a agent calls a subagent to do a task it requires a tool that the subagent is explicity denied from using, the subagent is able to utilize the denied tool
Plugins
No response
OpenCode version
1.18.7
Steps to reproduce
Following the steps from Opencode docs, add a subagent such as
# ~/.config/opencode/agents/tester.md
---
description: Reviews changes without modifying files
mode: subagent
model: "code"
color: "#ff6b6b"
steps: 8
permissions:
- action: edit
resource: "*"
effect: deny
- action: shell
resource: "*"
effect: deny
- action: write
resource: "*"
effect: deny
---
Review for correctness, security, regressions, and missing tests.
List findings in severity order with file and line references.
Tell the main agent to modify a file using the subagent.
When subagent is called it will have the ability to use the edit tool which is denied.
Screenshot and/or share link
1. Main Agent calls subagent to edit file
2. Subagent is able to edit file when permissions for edit are set to deny
Operating System
MacOs
Terminal
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.