Synopsis
b
Description
Thebroadcast command sends a message to all active agent sessions in the current repository. The message is delivered to each agent’s tmux pane, simulating user input.
This is useful for:
- Sending the same instruction to multiple agents
- Requesting status updates from all agents
- Coordinating parallel work across agents
- Testing how different agents respond to the same prompt
Arguments
The message to send to all agents. All arguments are joined with spaces to form the complete message.
How It Works
- Retrieves all active sessions for the current repository from state
- For each session:
- Sends the message to the agent’s tmux window (
:agent) - Automatically presses Enter after the message
- Logs the action
- Sends the message to the agent’s tmux window (
Examples
Send Same Prompt to All Agents
Request Status Updates
Multi-word Messages
Coordinated Actions
Typical Workflow
Output
The command displays:- Total number of sessions receiving the message
- Each session name as messages are sent
Use Cases
Parallel Problem Solving
Parallel Problem Solving
Launch multiple agents and broadcast the same problem to see different approaches:
Coordinated Testing
Coordinated Testing
Have multiple agents test different scenarios:
Code Review
Code Review
Ask all agents to review their work:
Emergency Stop
Emergency Stop
Send stop or reset instructions:
Behavior Details
Message Delivery
- Messages are sent using
tmux send-keysto the:agentwindow - Enter is pressed automatically after the message
- Double Enter is sent to ensure message submission
Session Scope
- Only affects sessions in the current repository
- Sessions from other repositories are unaffected
- Session list is retrieved from Uzi’s state file
Error Handling
- If a session cannot receive the message, an error is logged but other sessions continue
- No agents found results in an error:
no active agent sessions found - Missing message argument results in:
message argument is required
Comparison with run
While both commands execute across all agents, they serve different purposes:
| Feature | broadcast | run |
|---|---|---|
| Purpose | Send messages to agents | Execute shell commands |
| Target | Agent window | New tmux window |
| Output | Agent processes message | Command output captured |
| Use Case | Agent instructions | System commands |
Related Commands
prompt- Create agents to broadcast tols- See which agents will receive the broadcastrun- Execute shell commands across agentsauto- Auto-handle prompts triggered by broadcasts
Notes
If an agent is in the middle of processing, the broadcast message will be queued and handled when the agent is ready for input.