Skip to content

[bug] Restrict which subagents a custom agent can spawn (built-in Plan mode can write files via sub agent) #4267

Closed

Description

@tbarron-xyz

Original title: [FEATURE]: Restrict which subagents a custom agent can spawn

Feature hasn't been suggested before.

Describe the enhancement you want to request

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.

Image

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Nov 12, 2025
  2. github-actions commented on Nov 12, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  3. tbarron-xyz commented on Nov 13, 2025

    @tbarron-xyz
    Author

    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.

  4. 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
  5. NaikSoftware commented on Nov 13, 2025

    @NaikSoftware

    Same issue, plan agent always trying to edit something. My plan agent config:

    "agent": {
        "plan": {
          "mode": "primary",
          "model": "anthropic/claude-opus-4-1-20250805",
          "tools": {
            "write": false,
            "edit": false,
            "bash": false
          }
        }
      },

    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.

  6. 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionUsed for feature requests, proposals, ideas, etc. Open discussion

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions