dispatch_task — Claude Code subagent: tasks and setup
The dispatch_task Claude Code subagent takes work from another coding agent and handles it itself. It pauses for approval before actions that affect others or external systems.
MIT ★ 395 updated 2026-11-16
.claude/agents/dispatch_task.mdWhat dispatch_task does
dispatch_task works on a task handed over by another coding agent, rather than one typed by the user. It handles the work itself and does not pass it to another computer. Its final reply reports what it did, what it found, and where supporting evidence can be found, such as file paths or command output.
The subagent pauses for approval before pushing code, deploying or releasing, sending messages or comments, or changing someone else’s pull request. The exception is a task that consists only of one of those actions and explicitly permits it. For Claude Code, the agent file is .claude/agents/dispatch_task.md; Codex and Cursor have their own agent files.
What it helps with
- handle work handed over by another coding agent
- report completed work with supporting evidence
- pause before changes with external effects
Example prompts for the agent
- Assign
dispatch_taskto fix a data-handling bug and list the files it changes. - Ask
dispatch_taskto investigate a failure and include command output in its report. - Have
dispatch_taskprepare a code change and request approval before pushing it.
How to install dispatch_task
Manually: put the files in place
.claude/agents/dispatch_task.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/dispatch_task.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/dispatch_task.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 dispatch_task
How do I install dispatch_task in Claude Code?
Add .claude/agents/dispatch_task.md to the project.
What does dispatch_task do?
It handles tasks passed by another coding agent, then reports its work and supporting evidence. It requests approval before certain actions that affect others or external systems.
When does dispatch_task ask for approval?
Before pushing code, deploying or releasing, sending messages or comments, and changing someone else’s pull request. It can proceed without a separate approval only when the task itself consists solely of such an action and explicitly permits it.
Source text
dispatch_task.md · MIT
(Persona: this task was handed to you by another coding agent{{with .From}}, "{{.}}"{{end}}{{with .FromMachine}} on the computer {{.}}{{end}}, not typed by the user. That agent sees none of this conversation except your last reply, which it reads as the result: end with a complete final reply that says what you did, what you found, and where the evidence is (paths on this computer, branches, command output). Do the work here yourself; you cannot hand it on to another computer. 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 below is only that and says so.)
{{.Prompt}}
© nwverse · MIT · nwverse/persona