Moderated Multi-Agent Discussion
Start a structured discussion with AI agents, each with a unique persona.
Pre-flight Check
Before any other action, verify the Agent Teams environment:
- •
Check environment variable: The discuss feature requires Agent Teams. If
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMSis not set to1, inform the user:codeThe discuss feature requires Agent Teams to be enabled. Add this to your .claude/settings.json: { "env": { "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1" } }Then STOP - do not proceed with discussion setup.
Execution
- •
If no topic provided: Use AskUserQuestion to interactively gather:
- •Discussion topic (required)
- •Number of participants (2-8, default: 4)
- •Whether it's a debate (pro/con) or open discussion
- •Any specific roles or perspectives to include
- •
Load protocol: Read
agents/discuss-lead.mdto load the full discussion lead protocol. Execute the protocol directly - do NOT spawn it as a subagent. - •
Analyze topic: Determine team composition (roles, debate mode detection) and prepare persona inputs.
- •Identify the professional domain and relevant diversity axes for the topic.
- •Demographics: If geographic origin matters (e.g., global industry practice, policy comparison): estimate practitioner origin distribution, pass
demographics: { origin_weights: { ... }, outlier_ratio: 0.2 }to_1_seed. If origin is not the relevant axis: omitdemographicsand encode diversity directly as a controversy axis. - •Briefs: Write a 1-2 sentence background differentiation guide per slot (e.g., "20-year veteran with regulatory background", "Early-career startup founder"). These seed each persona's Expertise section.
- •Name cultures: Assign a distinct
name_cultureper agent (no duplicates). Pick from diverse regions (e.g., Korean, Nigerian, Brazilian, German, Indian, Japanese, Egyptian). If demographics providedsuggested_origin, use that instead.
- •
Generate personas: Spawn
persona-generatoragents in parallel (one per role,model: "sonnet"). Include from each assignment:- •
brief(from step 3) as Expertise seed. - •
name_culture(from step 3 orsuggested_origin) - never omit. - •
positionsandtonefrom_1_seedassignments. - •If
is_outlier: add context inbrief(e.g., "unusual background for this domain - give a compelling career path"). - •Leave gender, age, and other details to the persona-generator LLM.
- •
- •
Initialize: Call
discuss_lead({ op: "_2_create", ... })with generated personas → getsession_id - •
Spawn teammates: Create Agent Team
coral-dc-{session_id}, spawndiscussantteammates - •
Run discussion: Execute
discuss_lead(_3_step)rounds - bid collection → winner resolve → speech escalation loop until termination - •
Synthesize: Call
discuss_lead({ op: "_7_end", ... }), read full transcript via_4_transcript, present structured summary
Termination Policy
Default: Keep calling _3_step rounds until the system returns phase=ended (automatic termination via epoch exhaustion).
Early manual termination (_7_end) is allowed only when ALL conditions are met:
- •Every agent has spoken at least twice
- •Second-round speeches reference or build on earlier positions rather than introducing entirely new topics
- •At least one agent has explicitly proposed a synthesis or convergence point
- •The most recent speech does not contain an unanswered question directed at other participants
Before calling _7_end, always check:
- •Is there an agent who hasn't had a second turn yet? If so, run more
_3_steprounds instead. - •Does the last speech pose a question? If so, run more rounds - ending on an unanswered question cuts off dialogue unfairly.
Context Enhancement
From the user's request, identify:
- •Discussion topic (required - gather interactively if not provided)
- •Preferred team size (default: 4–6 agents)
- •Whether it's a pro/con debate (triggers debate mode)
- •Any specific perspectives or roles requested
- •Any controversy hints provided via
--hints(pre-specified axes to include in Phase 1 analysis)
Error Policy
If agents/discuss-lead.md cannot be read, report the error to the user.