-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Required prerequisites
- I have searched the Issue Tracker and Discussions that this hasn't already been reported. (+1 or comment there if it has.)
- Consider asking first in a Discussion.
Motivation
Add the capability for ChatAgent to invoke sub-agents.
Currently, Claude Code supports a runtime pattern in which a main agent can call a sub-agent to complete a task delegated by the main agent. (This is typically used for exploratory tasks, where the intermediate reasoning process is not necessary to retain in the main agent’s context—only the final result matters.)
After the sub-agent completes the task, it returns only the task result to the main agent. This mechanism effectively isolates the execution context of the sub-task, preventing unnecessary context accumulation in the main agent and significantly improving its capacity for long-horizon tasks.
The set of tools available to the sub-agent must be a subset of the main agent’s toolset. The main agent has full control over which of its allocated tools are exposed to the sub-agent.
To prevent unbounded recursion, sub-agents are not permitted to recursively invoke additional sub-agents.
Solution
No response
Alternatives
No response
Additional context
No response