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
Plan Mode Agent Spawned General Subagent to edit code #24741
@DUCKJAIII you can solve it by setting the permissions properly
{
"$schema": "https://opencode.ai/config.json",
// set readonly global permissions, it will override default permissions for all agents, including the built-in agents (build, general, explore...)"permission": {
"edit": "ask",
"task": {
// do not allow running subagents with edit permissions by default without user confirmation"*": "ask",
"explore": "allow",
},
},
"agent": {
// allow edit permissions for specific agents"build": {
"permission": {
"edit": {
"*": "allow",
},
"task": {
// allow agents with edit permission to run subagents with edit permissions by default without user confirmation"general": "allow",
},
},
},
"general": {
"permission": {
"edit": {
"*": "allow",
},
"task": {
"general": "allow",
},
},
},
},
}
Activity
github-actions commentedon Apr 28, 2026
This issue might be a duplicate of existing issues. Please check:
DUCKJAIII commentedon Apr 28, 2026
Bot is right, a duplicated issue
nikitakot commentedon Apr 29, 2026
@DUCKJAIII you can solve it by setting the permissions properly
{ "$schema": "https://opencode.ai/config.json", // set readonly global permissions, it will override default permissions for all agents, including the built-in agents (build, general, explore...) "permission": { "edit": "ask", "task": { // do not allow running subagents with edit permissions by default without user confirmation "*": "ask", "explore": "allow", }, }, "agent": { // allow edit permissions for specific agents "build": { "permission": { "edit": { "*": "allow", }, "task": { // allow agents with edit permission to run subagents with edit permissions by default without user confirmation "general": "allow", }, }, }, "general": { "permission": { "edit": { "*": "allow", }, "task": { "general": "allow", }, }, }, }, }neuhaus commentedon May 1, 2026
it's a critical bug since Jan 1st 2026.
neuhaus commentedon May 1, 2026
Does this fix bash access (including destructive commands) in plan mode? I'm not so sure it does.
nikitakot commentedon May 1, 2026
works on my end, it seems like once you set the global permissions they override all agents permissions, do you have any global bash permissions set?
DUCKJAIII commentedon May 1, 2026
Sorry to tell you that I have not implemented the recommended fix
My initial work around was to tell the agent to not spawn subagents with edit/destructive commands in plan mode via agents.md
The workaround was not ideal, but worked for me. I am using Gemini 3.1 pro custom tools
I will come back once I have tested the suggested fix and removing the instruction in agents.md
Alternatively, let me know your experience
neuhaus commentedon May 1, 2026
I haven't changed any permissions yet.
neuhaus commentedon May 1, 2026
This critical issue is a duplicate of issue #7292 and hasn't been fixed since it was introduced on Jan 1st.
rekram1-node commentedon Jun 23, 2026
Automated: closing question issues.
GitHub Issues are for bug reports and feature requests only — questions / support are no longer tracked here.
If this is a bug or feature request, please open a new issue with the appropriate template.