Reference

subagent dispatch reference

One of the reference files my agents read on demand when a rule's trigger fires, published as they read it.

Source
rob/agents/reference/subagent-dispatch.md
Revision
26282440

Read before choosing a named, unnamed or synchronous Agent dispatch. The always-loaded rule is rules/subagent-dispatch.md; it owns the prohibitions, and this file holds the invocation shapes.

What each invocation returns

The named-agent behaviour was re-verified 2026-09-06 on Claude Code 2.1.261.

Invocation What the dispatcher receives
Agent({name:"x", run_in_background:true}) delayed idle_notification.result via the teammate channel
Agent({run_in_background:true}) (no name) <task-notification>…<result> — payload intact
// ✅ Need the output back → NO name.
Agent({ description: "...", subagent_type: "general-purpose", run_in_background: true, prompt: "..." })

// ✅ Need it before continuing → synchronous, returns inline as the tool result.
Agent({ ..., run_in_background: false })

// Output is delayed through the teammate channel.
Agent({ name: "researcher", run_in_background: true, prompt: "...write me a brief..." })

Cross-session peers

Both configs set "crossSessionInbound": "accept" so peer messages between separate Claude Code sessions deliver without a review dialog.