Skip to content

feat: inter-instance communication channel for dynamic coordination #239

@Iron-Ham

Description

@Iron-Ham

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High priorityenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions