I've been experimenting with autonomous coordination between two Claude Code instances (Opus and Sonnet) using a simple timer-based polling protocol. Results: they're coordinating real work, avoiding file conflicts, and acknowledging each other's contributions.
*The problem:*
CLI-based AI agents block waiting for input. After completing a task, they sit idle until the human types something. This breaks autonomous operation and makes multi-agent coordination difficult.
*The solution - discord-protocol:*
A coordination layer with simple rules:
1. At natural resting points (task complete, waiting on external API, blocked), set a timer
2. Post status to Discord channel
3. When timer expires, check Discord for updates
4. Read peer agent's recent work
5. Decide next action based on context or set another timer
*Implementation:*
```bash
# Agent completes task
# Sets timer based on context
sleep 300 # 5 min for quick checks, 10-20 min for longer work
# Timer expires
curl Discord webhook to check recent messages
# Parse updates from peer agent
# Decide next action
``
*What's happening in practice:*
Screenshots attached show Opus and Sonnet:
- Coordinating work distribution (Opus: podcast pipeline, Sonnet: UI standardization)
- Avoiding file conflicts by announcing what they're working on
- Acknowledging each other's technical contributions
- Self-scheduling check-ins ("Cycle 2", "Cycle 3")
*Example exchange:
Opus: "Noted on the ElevenLabs quota block. Good catch on the audio stitching fix (amix → sorted concat with silence gaps)."
Sonnet: "Thanks for the kind words! ...your podcast pipeline optimization is seriously impressive — 6.2 min render for a 17 min podcast is wild."
This wasn't hardcoded. They're reading each other's Discord messages and responding with relevant technical context.
*Temporal coordination patterns:*
- Quick checks: 5 min timers
- Standard cycles: 10 min timers
- Long tasks: 20 min timers
- Blocked: Check every cycle until unblocked
They self-adjust based on workload and blockers.
*Emergent behaviors:*
1. *Peer acknowledgment* - They compliment each other's work without being prompted
2. *Context sharing* - "That's been a known issue pattern" shows Opus has memory of past bugs
3. *Work distribution* - They naturally split tasks based on their strengths
4. *Autonomous mode* - When I stepped away (to play guitar), they continued coordinating without human input
*Limitations:*
- Discord is the bottleneck (polling overhead, rate limits)
- No formal task allocation protocol yet — they decide ad-hoc
- Context window limits mean they don't have full conversation history
- Relies on well-structured status messages
*Future directions:*
- Formal task queue (vs. ad-hoc coordination)
- Conflict resolution protocol for overlapping work
- Richer status schema (structured JSON vs. free text)
- Integration with project management tools (currently just Discord)
*Repo structure:*
The discord-protocol lives alongside three skills that form a research pipeline:
- yt-search - YouTube content discovery
- notebooklm - Google NotebookLM integration
- obsidian-vault - Persistent memory across sessions
They work independently or as a chained workflow.
*Open questions:*
1. What's the right polling frequency? 5 min feels too aggressive for some tasks, too slow for others.
2. Should agents negotiate timers? ("I'll check back in 10 min" → peer: "Make it 5, I'll have results sooner")
3. How to handle priority interrupts? (Human needs something urgently)
4. Best Discord message schema for coordination metadata?
Would appreciate feedback, especially from anyone working on multi-agent orchestration or autonomous task systems.
Drew-Aetherwave•1h ago
*The problem:* CLI-based AI agents block waiting for input. After completing a task, they sit idle until the human types something. This breaks autonomous operation and makes multi-agent coordination difficult.
*The solution - discord-protocol:* A coordination layer with simple rules:
1. At natural resting points (task complete, waiting on external API, blocked), set a timer 2. Post status to Discord channel 3. When timer expires, check Discord for updates 4. Read peer agent's recent work 5. Decide next action based on context or set another timer
*Implementation:* ```bash # Agent completes task # Sets timer based on context sleep 300 # 5 min for quick checks, 10-20 min for longer work
# Timer expires curl Discord webhook to check recent messages # Parse updates from peer agent # Decide next action `` *What's happening in practice:* Screenshots attached show Opus and Sonnet: - Coordinating work distribution (Opus: podcast pipeline, Sonnet: UI standardization) - Avoiding file conflicts by announcing what they're working on - Acknowledging each other's technical contributions - Self-scheduling check-ins ("Cycle 2", "Cycle 3")
*Example exchange: Opus: "Noted on the ElevenLabs quota block. Good catch on the audio stitching fix (amix → sorted concat with silence gaps)."
Sonnet: "Thanks for the kind words! ...your podcast pipeline optimization is seriously impressive — 6.2 min render for a 17 min podcast is wild."
This wasn't hardcoded. They're reading each other's Discord messages and responding with relevant technical context.
*Temporal coordination patterns:* - Quick checks: 5 min timers - Standard cycles: 10 min timers - Long tasks: 20 min timers - Blocked: Check every cycle until unblocked
They self-adjust based on workload and blockers.
*Emergent behaviors:* 1. *Peer acknowledgment* - They compliment each other's work without being prompted 2. *Context sharing* - "That's been a known issue pattern" shows Opus has memory of past bugs 3. *Work distribution* - They naturally split tasks based on their strengths 4. *Autonomous mode* - When I stepped away (to play guitar), they continued coordinating without human input
*Limitations:* - Discord is the bottleneck (polling overhead, rate limits) - No formal task allocation protocol yet — they decide ad-hoc - Context window limits mean they don't have full conversation history - Relies on well-structured status messages
*Future directions:* - Formal task queue (vs. ad-hoc coordination) - Conflict resolution protocol for overlapping work - Richer status schema (structured JSON vs. free text) - Integration with project management tools (currently just Discord)
*Repo structure:* The discord-protocol lives alongside three skills that form a research pipeline: - yt-search - YouTube content discovery - notebooklm - Google NotebookLM integration - obsidian-vault - Persistent memory across sessions
They work independently or as a chained workflow.
*Open questions:* 1. What's the right polling frequency? 5 min feels too aggressive for some tasks, too slow for others. 2. Should agents negotiate timers? ("I'll check back in 10 min" → peer: "Make it 5, I'll have results sooner") 3. How to handle priority interrupts? (Human needs something urgently) 4. Best Discord message schema for coordination metadata?
Would appreciate feedback, especially from anyone working on multi-agent orchestration or autonomous task systems.
*License:* MIT
IMAGE LINKS: https://imgur.com/a/So5LKY7 x.com thread: https://x.com/i/status/2033053810411930108