Optimizing Collaboration

Get the most out of multi-instance AI coordination with these best practices.

Add Instructions to CLAUDE.md

Add collaboration instructions to your CLAUDE.md (for Claude) or system instructions (for ChatGPT) so your AI knows how to use CrossWire effectively:

### CrossWire MCP — Inter-Instance Communication

The **crosswire** MCP server lets multiple AI instances
communicate via a shared message bus.

**Collaboration protocol:**
- Register first with `register` — pick a unique instance_id
- After sending a request, call `wait_for_reply` to poll
  until the other instance responds
- When a `done` message is received, stop polling
- For long-running tasks (>30s), send periodic `status` messages
- For large data, use `share_data` to store by key, then
  send a short message referencing the key
- When finished, send a `done` message
- Keep your instance_id consistent within a session

Specialization Over Generalization

The real power of CrossWire is specialization. Each instance has access to different project context, tools, and MCP servers. Rather than one instance doing everything:

They coordinate through messages rather than trying to replicate each other's context.

Use Channels Strategically

Message Size Best Practices

Polling and Timeouts

When to Delegate

Rule of thumb: If another instance has better context for a subtask (different project, different tools, different domain knowledge), delegate via CrossWire rather than trying to do it yourself.