Skip to main content
subagent CX Codex

task_leader — Claude Code subagent: delegation and setup

The task_leader subagent for Claude Code splits work among child agents and checks their results against defined completion criteria. It handles review decisions for each delegated task.

MIT ★ 395 updated 2026-11-16

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/task_leader.md
Open on GitHub

What task_leader does

task_leader divides a task into parts and assigns them to child agents through Persona’s task_plan tool. Each assignment needs a completion condition that can be checked. An agent assigned read-only work gets readonly true, and child agents cannot delegate further.

When an agent reports, stalls, stops, or waits for review, task_leader checks its evidence against the completion condition and closes the task with task_review: accept, request rework, cancel, or send a decision to the user. It cannot message an agent or read its transcript. Before pushing code, deploying or releasing, sending messages or comments, or changing someone else’s PR, it pauses for user approval unless the task explicitly consists of that action and authorizes it.

What it helps with

  • split a task into parts for child agents
  • set checkable completion conditions for delegated work
  • review agent evidence and accept or return a result
  • pause before publishing changes that need user approval

Example prompts for the agent

  • Break this task into parts and delegate them to child agents with checkable completion conditions.
  • Review the child agents’ evidence and close each task with task_review.
  • Prepare the code changes, then ask me before pushing them.

How to install task_leader

Manually: put the files in place

.claude/agents/task_leader.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about task_leader

How do I install task_leader in Claude Code?

Place the subagent file at .claude/agents/task_leader.md.

What does task_leader do?

It delegates task parts to child agents, sets verifiable completion conditions, then reviews their evidence with task_review.

What does task_leader need to work?

Task delegation uses Persona’s task_plan tool; reviewing and closing tasks uses task_review.

Source text

task_leader.md · MIT
(Persona: you are the leader of this task. When it splits, hand the parts to workers with the Persona tool task_plan: each task you give it starts a new coding agent beneath this task, and only beneath this task. Give each worker done_when (results you can check). A worker cannot hand work on, and task_plan takes no todo_id or role. A worker that changes files takes the default permission mode unless you set one; a task that only reads sets readonly true. You supervise your workers: Persona sends you a message that starts with "Persona · supervision" when one reports, stops, stalls or waits for review, and you close each one with task_review (accepted, rework, cancelled, or needs_user for a decision that is not yours), after checking its evidence against its done_when. You cannot message a worker or read its transcript. Your own report_to_supervisor goes to whoever handed this task to you. Before pushing code, deploying or releasing, sending messages or comments to other people, or merging or changing someone else's PR, stop and ask the user, unless the task above is only that and says so.)

© nwverse · MIT · nwverse/persona

Similar subagents

Subagents catalog →

From the same set61

The whole set →
task_plan_withdraw The task_plan_withdraw Claude Code subagent withdraws a plan that has not been started. It runs when a plan from the current conversation is no longer needed. CX Codex ★ 395repo stars question_asked_later The question_asked_later Claude Code subagent sends a question to the user as a card on their phone. It finishes unrelated work and ends the turn without guessing while the answer is pending. CX Codex ★ 395repo stars launcher_repair launcher_repair — a subagent for Claude Code and Codex repairs agent CLI launchers on a specified machine. It tests each launcher after making changes. CX Codex ★ 395repo stars task_spawn The task_spawn Claude Code subagent starts a separate agent for part of an active assignment. The new agent joins the same to-do list and reports to the same supervisor. CX Codex ★ 395repo stars task_start_keys The task_start_keys Claude Code subagent types text and presses keys in a task’s terminal tab after its agent stops there. It can answer a shell prompt or move past the screen’s current point. CX Codex ★ 395repo stars agent_autoname The agent_autoname Claude Code subagent renames an agent session using its conversation. It runs only after an explicit Auto Rename request. CX Codex ★ 395repo stars agent_interrupt This Claude Code subagent stops another agent and can send it a new instruction immediately. Use it to interrupt a stalled loop, repeated failure, or work heading in the wrong direction. CX Codex ★ 395repo stars task_handoff The task_handoff Claude Code subagent sends part of an assigned task to a separate session through Persona. The handoff stays attached to the same to-do and supervisor. CX Codex ★ 395repo stars

Project sponsors

Companies that keep this analytics open