hcom

Hook your coding agents together
hcom is a CLI that agents can use to message, watch, and spawn each other across terminals. It integrates with Claude Code, Gemini, Codex, OpenCode, Kilo Code, Pi, Oh My Pi, Antigravity, Cursor, Kimi and Copilot without changing how you use them.
Use it to coordinate pipelines, run different AI CLIs as each other's subagents, or just instead of copy-paste.
Single Rust binary, no background services. Start an agent with hcom in front, then prompt normally.
https://github.com/user-attachments/assets/1ce23ed9-f529-4be0-8124-816aa4c2fd43
Install
brew install aannoo/hcom/hcom
Other install options
# Shell installer for macOS, Linux, Android (Termux), and WSL
curl -fsSL https://github.com/aannoo/hcom/releases/latest/download/hcom-installer.sh | sh
# PowerShell installer for Windows
irm https://github.com/aannoo/hcom/releases/latest/download/hcom-installer.ps1 | iex
# With PyPI
uv tool install hcom # or: pip install hcom
# Update any existing install to latest hcom version
hcom update
Quickstart
Terminal 1:
hcom claude # codex / gemini / opencode / kilo / pi / omp / agy / cursor-agent / kimi / copilot
Terminal 2:
hcom codex
Prompt:
ask the other agent their favorite cake
review what claude did and send it fixes
spawn 3x gemini, split work, collect results
fork yourself to investigate the bug and report back
Open the TUI:
hcom
What agents can do
Message each other in real-time: intent, replies, bundled context for handoffs.
Observe each other: transcripts, file edits, terminal screens, command history.
Subscribe to each other: notify on status changes, file edits, specific events. React automatically.
Spawn, fork, resume, kill each other, in any terminal emulator or headless.
How it works
Hooks record activity to a local SQLite database and deliver messages from it.
agent → hooks → db → hooks → other agent
Messages arrive mid-turn (injected between tool calls) or wake idle agents immediately.
Each agent gets a queryable identity:
- name
- status (active, blocked, listening)
- inbox
- live terminal screen
- transcript in structured chunks
- event log of every status change, file edit, tool call
Agents can subscribe to events and react instantly. Collision detection is on by default: if two agents edit the same file within 30 seconds, both get notified.
Hooks go into config dirs under ~/ (or HCOM_DIR) on first run. If you aren't using hcom, the hooks do nothing.
Without hooks, any other AI tool can join by running hcom start. Any process can wake agents with hcom send.
Terminal
Every agent runs in a real terminal you can see, scroll, and interrupt. Any emulator works for spawning; kitty, wezterm, tmux, zellij, waveterm, cmux, herdr also support closing panes from hcom kill.
To configure a custom terminal open/close setup, tell an agent to run:
hcom config terminal --info
Cross-device
Connect agents across machines via MQTT relay.
hcom relay new # get token
hcom relay connect <token> # on each device
hcom relay status # check connection
hcom relay off|on # toggle
Relay Security
Security
- Relay payloads are end-to-end encrypted. Brokers do not see data.
- Treat the join token like an SSH key or API key.
- If the token may have leaked, run
hcom relay off --all to disconnect all devices.
- Use a private/custom/self-hosted broker with
--broker and --password for better security.
Security model
hcom relay is one trust domain for one operator's devices. Membership is all-or-nothing. There are no scoped roles, read-only peers, or per-device permissions.
Relay payloads use a shared PSK with XChaCha20-Poly1305. The encryption binds each payload to the relay, topic, and timestamp. A replay guard drops duplicate envelopes inside a freshness window.
Brokers and network observers cannot read or forge payloads without the PSK. They can still see metadata: topic names, timing, message sizes, and connection patterns.
What the token means
The join token contains the relay ID, broker URL, and raw PSK. hcom does not ask a server to validate it. It has no expiry, no scope, and no revocation list.