anomalyco / anomalyco/opencode
Auto-approve permissions (--auto) do not cascade down to subagents after running 'opencode run --auto'
@jlongster is already working on this.
Since Aug 11, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
When you run opencode run --auto, the auto-approve permissions do not cascade down to subagents.
I conducted two tests:
Test 1
I have a file in my workspace called test.txt, which just contains the word purple in it. I have set 'edit': 'ask' for permissions in my opencode.json file.
The following command hangs indefinitely because the subagent is forever waiting for user permission:
opencode run --auto "Spawn a subagent to edit the test.txt file and append the words 'monkey' and 'dishwasher' to the text."
Running through the main agentic process works:
opencode run --auto "Edit the test.txt file and append the words 'monkey' and 'dishwasher' to the text."
Test 2
I want to create a file in /tmp. By default external_directory permissions are set to ask.
Using the main agentic process works:
opencode run --auto "Create a file in /tmp called test.txt and write 'This is a test' in it"
But using subagents will cause the command to hang indefinitely because the subagent is waiting for permission:
opencode run --auto "Spawn a subagent to create a file in /tmp called test.txt and write 'This is a test' in it"
Plugins
No additional plugins
OpenCode version
1.18.14
Steps to reproduce
See above
Operating System
Fedora 43
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.