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
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:
Running through the main agentic process works:
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:
But using subagents will cause the command to hang indefinitely because the subagent is waiting for permission:
Plugins
No additional plugins
OpenCode version
1.18.14
Steps to reproduce
See above
Operating System
Fedora 43