Hub Dispatch
Hub Dispatch lets the agent send a task to a remote muxd node and collect the result, without leaving your local session. It is useful when a task needs to run on a specific machine — for example, running a Linux-only test suite from a Mac, or triggering a deployment from a node that has the right credentials.
Prerequisites
Both the local node and the remote node must be registered with the same hub. See the hub documentation for setup instructions.
Tools
hub_discovery
Lists all nodes currently connected to the hub, along with their reported capabilities:
hub_discovery
Example output:
Nodes connected to hub:
linux-ci linux/amd64 tools: bash, file_read, file_write, git
mac-build darwin/arm64 tools: bash, file_read, file_write, xcode
staging linux/amd64 tools: bash, file_read, docker, kubectl
Use this before dispatching to confirm the right node is available and has the tools you need.
hub_dispatch
Sends a prompt to a specific node and returns the output when the remote session completes:
hub_dispatch node=linux-ci prompt="Run the full test suite and report any failures"
muxd resolves the node, creates a new session on it, submits the prompt, and streams the output back to your local session. The remote agent runs with the full tool set available on that node.
How It Works
- The local agent calls
hub_dispatchwith a node name and a prompt. - The hub routes the request to the named node.
- The remote node creates a new session and starts the agent loop with the given prompt.
- Output is streamed back through the hub and printed in the local TUI as it arrives.
- When the remote session ends, the final result is returned as the tool result.
The remote session is independent — it has its own working directory, tool set, and context. It does not share memory or state with the local session beyond what is included in the dispatch prompt.
Use Cases
| Scenario | Example |
|---|---|
| Cross-platform testing | Run the Linux test suite from a Mac dev machine |
| Platform-specific builds | Trigger an Xcode build on a Mac node from a Linux CI node |
| Deployment | Deploy from a staging node that has the right cloud credentials |
| Isolated execution | Run untrusted code on a disposable node |
Constraints
| Constraint | Detail |
|---|---|
| Sub-agents | hub_dispatch is not available inside sub-agent sessions |
| Node availability | If the named node is offline, the tool returns an error immediately |
| Timeouts | Long-running remote sessions may time out; check hub configuration for limits |
| No shared filesystem | Remote nodes use their own filesystem — files are not synced automatically |