Skip to content

[Feature Request] Support Sub-Agent calling in ChatAgent #3858

@nitpicker55555

Description

@nitpicker55555

Required prerequisites

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions