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
[bug] Restrict which subagents a custom agent can spawn (built-in Plan mode can write files via sub agent) #4267
My edit-disabled, task-tool-enabled custom planning agent will just spawn a subagent when it wants to edit files. I want it to have subagent capability for e.g. researching multiple things at the same time, but I want to restrict which types of subagent it can spawn. Or, ensure it can only spawn subagents with less-or-equal capabilities than itself.
This issue might be a duplicate of existing issues. Please check:
Task should inherit current agent permissions/tools for MCP #3808: Task should inherit current agent permissions/tools for MCP - This describes the same core problem where agents with restricted permissions can circumvent their limitations by delegating tasks to subagents that don't inherit the same restrictions.
Feel free to ignore if none of these address your specific case.
I'm changing this from a feature request to a Bug. It just happened to me on the default Plan agent (spawned a task which wrote a file). Seems like a problem that the default Plan agent can write files lol.
changed the title [-][FEATURE]: Restrict which subagents a custom agent can spawn[/-][+]Restrict which subagents a custom agent can spawn (built-in Plan mode can write files via sub agent)[/+]on Nov 13, 2025
Maybe the issue is more critical and not related to subagents, because when you asked Plan agent like this "Let’s refactor..." he tries to edit code immediately instead of planning it first.
IMHO now we should focus on stability over features, because the basic usage flow has a lot of problems and a lot of regressions after migration to the new TUI. For example such a simple thing as editing Java file now very unstable, periodically broke syntax, append the same lines twice, etc. Maybe problem with jdtls, but it is one of the tens of bugs I faced in the every session when I give yet another chance to use opencode instead of claude or codex.
changed the title [-]Restrict which subagents a custom agent can spawn (built-in Plan mode can write files via sub agent)[/-][+][bug] Restrict which subagents a custom agent can spawn (built-in Plan mode can write files via sub agent)[/+]on Nov 13, 2025
Activity
github-actions commentedon Nov 12, 2025
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
tbarron-xyz commentedon Nov 13, 2025
I'm changing this from a feature request to a Bug. It just happened to me on the default Plan agent (spawned a task which wrote a file). Seems like a problem that the default Plan agent can write files lol.
[-][FEATURE]: Restrict which subagents a custom agent can spawn[/-][+]Restrict which subagents a custom agent can spawn (built-in Plan mode can write files via sub agent)[/+]NaikSoftware commentedon Nov 13, 2025
Same issue, plan agent always trying to edit something. My plan agent config:
Maybe the issue is more critical and not related to subagents, because when you asked Plan agent like this "Let’s refactor..." he tries to edit code immediately instead of planning it first.
IMHO now we should focus on stability over features, because the basic usage flow has a lot of problems and a lot of regressions after migration to the new TUI. For example such a simple thing as editing Java file now very unstable, periodically broke syntax, append the same lines twice, etc. Maybe problem with jdtls, but it is one of the tens of bugs I faced in the every session when I give yet another chance to use opencode instead of claude or codex.
[-]Restrict which subagents a custom agent can spawn (built-in Plan mode can write files via sub agent)[/-][+][bug] Restrict which subagents a custom agent can spawn (built-in Plan mode can write files via sub agent)[/+]