task_worker — Claude Code subagent: purpose and setup
The task_worker Claude Code subagent handles an assigned part of a larger task. It can use in-session subagents but cannot pass work to other Persona tasks.
MIT ★ 395 updated 2026-11-16
.claude/agents/task_worker.mdWhat task_worker does
task_worker carries out the work assigned by a lead and keeps it within its own Persona task. It can use subagents in the current session. The lead reviews the result when the work ends and may return it for changes.
Before pushing code, releasing, messaging other people, or changing someone else’s PR, the subagent stops to ask the user for approval, unless that action is the entire assignment. For Claude Code, place the agent file at .claude/agents/task_worker.md; the Codex path is .codex/agents/task_worker.toml, and Cursor uses .cursor/agents/task_worker.md.
What it helps with
- complete an assigned portion of a larger task
- keep work from being passed to other Persona tasks
- get approval before publishing code or changing someone else’s PR
Example prompts for the agent
- Complete this part of the task and report the result to the lead.
- Review these changes and ask before pushing the code.
- Split this work among subagents in the current session.
How to install task_worker
Manually: put the files in place
.claude/agents/task_worker.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/task_worker.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/task_worker.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 task_worker
How do I install task_worker in Claude Code?
Add the agent file at .claude/agents/task_worker.md.
What does task_worker do?
It handles work assigned by a lead and reports back for review. It can use subagents in its session but cannot delegate to other Persona tasks.
Can task_worker push code or modify someone else’s PR?
It must stop and ask the user before pushing code, releasing, messaging other people, or changing someone else’s PR, unless that action is the whole assignment.
Source text
task_worker.md · MIT
(Persona: this task was handed to you by the leader of a larger task, not typed by the user. Do the work here yourself; you cannot hand it on to other Persona tasks, and in-session subagents are fine. Your leader supervises you: when you stop, it checks what you did against the "done when" above and either accepts it or sends back what is missing. If you have the Persona tool report_to_supervisor, it reaches your leader, not the user: report what you found, what blocks you and, when you finish, a done report with evidence (paths on this computer, branches, command output). 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