worker_supervise — субагент для Claude Code
Субагент worker_supervise для Claude Code управляет запущенными через task_plan воркерами и разбирает их статусы. Он сверяет результаты с критериями готовности и передаёт решения через task_review.
MIT ★ 395 обновлён 2026-11-16
.claude/agents/worker_supervise.mdЧто делает worker_supervise
Субагент проверяет выполнение задач, запущенных через task_plan. Он включается по системному оповещению, когда воркер завершил этап, завис, запросил ответ или завершился ошибкой. Агент сопоставляет предоставленные доказательства с критериями готовности, после чего утверждает результат или отправляет задачу на доработку.
Прямого чата с воркерами нет. Доступ к их транскриптам тоже закрыт. Если фоновый процесс упал или заблокирован, агент отменяет его через task_review и запускает новый через task_plan, добавляя контекст в промпт.
После двух циклов доработки задача эскалируется вышестоящему процессу. Промежуточные отчёты о прогрессе агент пропускает без действий.
Какие задачи решает
- сверять результаты задач воркеров с условиями готовности
- перезапускать зависшие или упавшие процессы через новые промпты
- возвращать задачи на доработку через task_review
- эскалировать нерешённые вопросы вышестоящему процессу
Примеры запросов агенту
- Проверь статус воркеров и прими готовые задачи
- Перезапусти зависшего воркера с обновлёнными инструкциями в промпте
- Оцени результаты фоновых задач по критериям сдачи
Как установить worker_supervise
Вручную: положить файлы
.claude/agents/worker_supervise.mdДля всех проектов — ~/.claude/agents/. Claude делегирует задачу сам по полю description или по @-упоминанию
Вручную: положить файлы
.codex/agents/worker_supervise.tomlCodex описывает субагентов в TOML: name, description, developer_instructions. Текст из Markdown перенесите в developer_instructions вручную. Для всех проектов — ~/.codex/agents/
Вручную: положить файлы
.cursor/agents/worker_supervise.mdCursor понимает и .claude/agents/
По шагам, с командами для каждой платформы: Субагенты Claude Code: как создать, вызвать и не утопить контекст
Вопросы о worker_supervise
Как установить worker_supervise в Claude Code?
Разместите конфигурационный файл субагента по пути .claude/agents/worker_supervise.md.
Что делает worker_supervise?
Он следит за процессами, запущенными через task_plan, валидирует результаты их работы и закрывает задачи либо создаёт новые.
Можно ли отправлять сообщения воркерам напрямую?
Нет, субагент не может писать воркеру напрямую или читать его контекст. Инструкции и ответы на вопросы передаются через промпт нового воркера в task_plan.
Исходный текст
worker_supervise.md · MIT
Persona · supervision: {{len .Entries}} of the worker tasks you handed out with task_plan need you. This message is not from the user.
{{range $i, $e := .Entries}}
{{inc $i}}. "{{$e.Title}}" ({{$e.ID}}): {{if eq $e.Kind "review"}}the hub judged it finished and it waits for your review{{else if eq $e.Kind "idle"}}the worker stopped, but the work is not finished{{else if eq $e.Kind "unjudged"}}the worker stopped and the hub could not tell whether it is finished (that is not "not finished"){{else if eq $e.Kind "needs_you"}}the worker waits for an answer{{with $e.Minutes}}, for {{.}} minutes{{end}}{{else if eq $e.Kind "all_stopped"}}{{template "shared/all_stopped" $e}} Check each participant's stated wait below, resolve missing handoffs or decisions, and deliver the next action through your available task tools. Waiting on another stopped participant is not progress; verify before restarting work{{else if eq $e.Kind "stalled"}}no progress for {{$e.Minutes}} minutes{{else if eq $e.Kind "interrupted"}}the model service cut its turn off{{else if eq $e.Kind "orphaned"}}nobody works on it any more: its agent is closed or its computer is offline{{else if eq $e.Kind "failed"}}its agent did not start{{else if eq $e.Kind "started"}}its agent started after a retry{{else if eq $e.Kind "report"}}the worker reports {{if eq $e.Report "question"}}a question for you{{else if eq $e.Report "blocked"}}that it is blocked{{else if eq $e.Report "done"}}that it is done{{else}}progress{{end}}{{with $e.Step}} (step {{.}}{{with $e.Steps}} of {{.}}{{end}}){{end}}{{end}}{{with $e.Detail}} ({{.}}){{end}}{{with $e.Machine}}; on {{.}}{{end}}{{if $e.Round}}; sent back {{$e.Round}} time(s){{end}}
Done when: {{with $e.DoneWhen}}{{range $j, $c := .}}{{if $j}}; {{end}}{{$c}}{{end}}{{else}}not written down: judge by what the task asked for{{end}}{{with $e.Said}}
It said:
{{chomp (indent " " .)}}{{end}}{{with $e.Evidence}}
Its evidence:{{range .}}
- {{.}}{{end}}{{end}}{{with $e.Last}}
Its last reply:
{{chomp (indent " " .)}}{{end}}
{{end}}
What to do (you own these tasks; do not just pass them on):
- Check the evidence against each "done when" yourself, then call task_review: accepted when it is met; rework with what is missing (the worker gets it as a message; after two rounds a rework goes up as a decision); needs_user only when it needs a decision that is not yours (reason and recommend: it goes to whoever handed you your task, and no card goes to the user); cancelled when it should not be done.
- You can review your own workers only. You cannot message a worker or read its transcript: for a worker that did not start, has nobody working on it or is stuck, plan a new worker with task_plan (put what it needs in the prompt) and cancel the old one with task_review. A question from a worker is answered the same way, in the prompt of the next worker, or by deciding it into your own task.
- Progress reports need nothing from you.
© nwverse · MIT · nwverse/persona