Summary
Add a real-time message bus that allows Claude Code instances to dynamically communicate and coordinate during execution, going beyond the current static context.md approach.
Problem
Currently, instances only share context via a static context.md file generated at session start. They cannot:
- Share discoveries made during execution
- Claim "ownership" of files/modules to avoid conflicts
- Request help or delegate subtasks to other instances
- Coordinate on shared concerns in real-time
This leads to duplicate work and missed opportunities for collaboration.
Proposed Solution
Implement an inter-instance message bus with:
Message Types
- Discovery: "I found that auth uses JWT tokens in
internal/auth/"
- Claim: "I'm working on
internal/api/ - please avoid modifying"
- Release: "Done with
internal/api/ - available for others"
- Question: "Does anyone know where the database config is?"
- Answer: "Database config is in
internal/config/database.go"
Implementation Ideas
- Extend the existing
internal/event/ bus with cross-instance messaging
- Use a shared file or socket for IPC between tmux sessions
- Inject received messages into each instance's context dynamically
- TUI panel showing recent cross-instance messages
Benefits
- Reduced duplicate work across instances
- Better coordination on complex multi-file changes
- Instances can learn from each other's discoveries
- More efficient use of API tokens
Alternatives Considered
- Periodic context.md regeneration: Simpler but not real-time
- Shared database: More complex infrastructure
- Direct Claude-to-Claude API calls: Not feasible with current architecture
Related
Summary
Add a real-time message bus that allows Claude Code instances to dynamically communicate and coordinate during execution, going beyond the current static
context.mdapproach.Problem
Currently, instances only share context via a static
context.mdfile generated at session start. They cannot:This leads to duplicate work and missed opportunities for collaboration.
Proposed Solution
Implement an inter-instance message bus with:
Message Types
internal/auth/"internal/api/- please avoid modifying"internal/api/- available for others"internal/config/database.go"Implementation Ideas
internal/event/bus with cross-instance messagingBenefits
Alternatives Considered
Related