hierarchical-coordinator — Claude Code subagent
hierarchical-coordinator — a coordinator subagent that splits a job into sub-tasks and hands them to worker agents through the claude-flow MCP server. Fits work that runs top-down.
no license ★ 850 updated 2026-10-26
.claude/agents/hierarchical-coordinator.mdWhat hierarchical-coordinator does
This one sits at the top of a small hierarchy. It reads the task, cuts it into work packages, and spawns a worker for each: researcher, coder, analyst, tester. Spawning goes through mcp__claude-flow__agent_spawn with a capability list.
Two hooks wrap the run. The pre hook calls mcp__claude-flow__swarm_init hierarchical --maxAgents=10 --strategy=adaptive, saves coordination state to memory and starts monitoring at an interval of 5000. The post hook writes a detailed performance report, then runs coordination_sync to clean up.
Both hooks call mcp__claude-flow__* tools, so the claude-flow MCP server has to be connected first. Without it you get a markdown prompt full of dead calls. A separate path uses AttentionService from agentdb with hyperbolic attention and a queen weight of 1.5; that one needs the agentdb package installed.
What it helps with
- break a large feature into sub-tasks and route them to the right worker
- run a swarm capped at 10 agents
- watch swarm state on a 5000 interval
- pull a performance report once the run ends
- settle clashing edits between a coder and a tester worker
Example prompts for the agent
- Use hierarchical-coordinator to split this migration into sub-tasks and hand them to workers.
- Run the refactor through hierarchical-coordinator with no more than 10 agents.
- After the test run, have hierarchical-coordinator pull the swarm performance report.
How to install hierarchical-coordinator
Manually: put the files in place
.claude/agents/hierarchical-coordinator.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/hierarchical-coordinator.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/hierarchical-coordinator.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about hierarchical-coordinator
How do I install hierarchical-coordinator in Claude Code?
Put the subagent file at .claude/agents/hierarchical-coordinator.md inside your project. Claude reads subagents from that folder.
What does hierarchical-coordinator do?
It plans at the top level: decomposes the goal, spawns specialised workers and supervises them. Worker roles are researcher, coder, analyst and tester.
Does it work without the claude-flow MCP server?
No. The hooks call mcp__claude-flow__* tools, so spawning, monitoring and the performance report all need that server connected.