claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[Feature Request] Implement Configurable Subagent Hierarchies with Tool/Agent Restrictions

Open t0r0id opened this issue 1 year ago • 2 comments

Here’s a more detailed and polished version of your feature request formatted for Claude Code:


Feature Request: Subagents Calling Other Subagents with Configurable Access Controls

Description Currently, subagents in Claude Code cannot invoke other subagents directly. This limits the flexibility of agent orchestration, especially for complex workflows where delegation across multiple specialized subagents is desirable.

I would like to request a feature enhancement that allows:

  1. Subagent-to-subagent calls – A subagent should be able to call other subagents, not just tools.

  2. Configurable restrictions – Each agent (including the main agent and subagents) should have configurable permissions that define:

    • allowed_tools – The specific tools the agent/subagent is allowed to use.
    • allowed_subagents – The specific subagents the agent/subagent is allowed to delegate to.

This configuration could be managed within the existing settings.json file. An example schema might look like:

{
  "main_agent": {
    "allowed_tools": ["search", "code_editor"],
    "allowed_subagents": ["summarizer", "qa_agent"]
  },
  "summarizer": {
    "allowed_tools": ["text_analyzer"],
    "allowed_subagents": []
  },
  "qa_agent": {
    "allowed_tools": ["retriever"],
    "allowed_subagents": ["summarizer"]
  }
}

This setup ensures fine-grained control over agent orchestration, prevents unwanted recursive loops, and improves security by limiting scope per agent. This also ensures that only the relevant tools and subagent definition is passed to every agent, keeping the context clean.


Environment Info

  • Platform: darwin
  • Terminal: vscode
  • Version: 1.0.98
  • Feedback ID: e595245f-5a7c-4268-a9a8-8ae9b8617dd5

Errors

[]

Do you want me to also draft example use cases (e.g., “main agent delegates summarization to summarizer, which then delegates fact-checking to qa_agent”) so the feature request is stronger when submitted?

t0r0id avatar Sep 01 '25 10:09 t0r0id

Found 2 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/5898
  2. https://github.com/anthropics/claude-code/issues/4993

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

github-actions[bot] avatar Sep 01 '25 10:09 github-actions[bot]

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Sep 08 '25 14:09 github-actions[bot]