wandb/senpai / plugins/senpai/skills/delegate-subagents
delegate-subagents
VerifiedChoose, configure, launch, and collect bounded subagents for research and engineering decisions. Root agents and delegation-capable subagents should read this before delegating: every task requires an explicit model tier, and high-leverage work such as research ideation, round planning, plateau pivots, large research reviews, hard optimization, disputed evidence, and expensive experiment portfolios requires frontier judgment.
Delegate subagents
Batch independent tasks in one spawn_agents call with a stable batch_key. Give each child a self-contained assignment and ask for a compact, evidence-linked result.
Every task must explicitly set model to fast, smart, or frontier; there is no implicit model tier. Choose the least expensive tier that provides the judgment the task requires:
- Use
model="fast"for mechanical, easily verified work: locating files, extracting facts, counting records, formatting results, running bounded commands, and reporting test or build failures. - Use
model="smart"for ordinary implementation and review, literature retrieval, bounded synthesis, standard failure diagnosis, and debugging code that is not already heavily optimized. - Use
model="frontier"for quality-first research judgment. This includes fresh research ideation, planning a new research round, changing direction after a plateau, reviewing a large research or experiment history, difficult debugging or optimization of code that is already highly optimized, reconciling conflicting evidence or disagreement between local and external evaluation, and selecting a portfolio that will consume substantial GPU time or external-evaluation budget.
Keep frontier tasks focused. When using more than one for the same decision, give them distinct questions or perspectives. Do not spend frontier capacity on routine monitoring, simple retrieval, formatting, or other work whose answer is cheap to verify. Treat every child result as advice: inspect its evidence before acting on it.
Choose an agent and context
Choose:
explorefor local code, data, artifacts, or history;search_general_webfor current public sources;search_research_publicationsfor scholarly literature and primary papers;bash-runnerwithmodel=fastfor tests, builds, and bounded commands; andgeneral-purposefor mixed analysis, planning, review, or implementation.
Agent specialization and model tier are independent. For first-principles synthesis, critique, diagnosis, or planning, use agent="general-purpose". Use search_research_publications when the task is to find and compare primary papers, and search_general_web for current public sources. The search agent and its search skills own source selection and search mechanics.
Normally set include_context=false and provide a self-contained task with exact evidence paths. This gives the child a fresh perspective while preserving access to the merged system prompt and searchable parent history. Set include_context=true only when the complete model-visible conversation is necessary and cannot be summarized reliably. For research judgment, ask for research, critique, diagnosis, ideas, or a plan rather than edits.
Keep bulk output in the child
Delegate before running a command or broad read that may return substantial output. A child can summarize output it produced; it cannot remove output that already entered the parent context.
- Use
agent="bash-runner", model="fast"for verbose tests, builds, bounded logs, Git inspection, and deterministic command output. - Use
agent="explore", model="fast"for broad file, history, or PR-artifact searches and extraction into cited facts. - Use
agent="general-purpose", model="fast"for exact mechanical edits with explicit file targets and focused acceptance checks. - Use
model="smart"for ordinary implementation, review, synthesis, and failure diagnosis. - Use
model="frontier"for causal scientific interpretation, disputed evidence, direction changes, and expensive experiment portfolios.
For a potentially large GitHub review, have the root call
get_prs(max_inline_prs=0), pass the returned artifact path to an Explore
child, inspect the child's cited decisive evidence, and perform any typed
GitHub transition in the root.
Collect results
spawn_agents returns task IDs immediately. Continue useful work, then use bounded await_agents calls with all, first, quorum, or change and a timeout of at most 300 seconds; a larger timeout is rejected, so wait again instead. Use agent_status for one non-blocking snapshot and cancel_agents when work is no longer useful; do not poll.
A child's result is the text it wrote with its final finish call plus the finish message. A result above about 15,000 tokens is saved to a file under the role state's delegation/results/ directory, and the result carries a summary and that path; read the file when the summary is not enough.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 465k | Updated | Claude CodeCodex | Verified | Install |
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 465k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 318k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 318k | Updated | Claude CodeCodex | Verified | Install |