Skip to main content

Recursive Teams: Agents That Spawn Agents

In connector.json, every worker is a full agent — not a subagent. Any agent can spawn its own team, which can spawn more teams. The tree has no depth limit.

Subagent vs Agent

The difference is architectural. A subagent is a function call inside the parent’s process. A connector.json agent is a separate PTY session — independent, full-featured, capable of everything the parent can do.

How Recursive Spawning Works

4 levels deep. 14 agents total. 5 different LLMs. Each agent is a real PTY session. Each can spawn more.

The Spec

The agent itself decides how to decompose the work. It writes its own connector.json files. It runs them. The main session doesn’t need to know the full tree upfront.

Main Session Observability

The main session (you) can see and control the entire tree.
You see everything. You can intervene anywhere. But you don’t have to — the agents manage their own sub-teams.

Scratchpad Hierarchy

Each team level has its own scratchpad. Parent can read child scratchpads.
Information flows up naturally. Each agent writes to its level. Parent agents read child scratchpads for synthesis.

Why This Is Different

Claude Code Teams

Leader spawns teammates. Teammates cannot spawn more teammates. Flat hierarchy. One level deep.

Codex Plugin

One subprocess call. No spawning at all.

connector.json

Any agent can be a leader. Any leader can have a team. Trees, not lists. Depth is unlimited.

The Compound Effect

One connector.json at the top. 16 agents across 4 levels. 5 different LLMs. Automatic cost optimization. All managed by the same daemon infrastructure. This isn’t orchestration. This is an AI organization.

Safety

Recursive spawning is powerful. Safeguards are essential.
  • max_depth: how deep the tree can go
  • max_total_agents: total across all levels
  • max_cost_usd: spending cap for the entire tree
  • timeout_per_agent_ms: no single agent runs forever
The daemon enforces these. Agents can’t override their own limits. Note: capabilities and limits are planned fields not yet in the core spec. They represent the governance layer for recursive execution. Recursive teams extend naturally across machines — each level can target different hardware. See Machine-Level Expansion. For how recursive depth combines with agent count, direction, and machines as independent scaling dimensions, see Dimensional Growth.