hcom is a free, open source orchestration & scheduling project written in Rust and released under MIT. It has 622 GitHub stars, 101 forks and 38 open issues, and was last pushed 13 days ago. On this registry it ranks #124 of 130 tracked projects in Orchestration & Scheduling, with 5 head-to-head comparisons available. It gained 92 stars over the last 30 tracked days.

What is hcom?

hcom is a Rust CLI that lets AI coding agents such as Claude Code, Codex, OpenCode, Kilo Code, Pi, Oh My Pi, Antigravity, Cursor, Kimi, Copilot, and Gemini message, watch, and spawn one another across terminals, aimed at developers who already run more than one agent at a time.

What it is

hcom is a command-line tool that sits in front of the coding agents a developer already uses. Rather than replacing any of them, it links them: the user starts an agent with hcom in front of the normal command, then prompts as usual, and from that point the agent can send messages, inspect what its peers are doing, subscribe to events, and create or terminate other agents in other terminals. It ships as a single Rust binary with no background services, and it works across any combination of the supported AI CLIs without changing how those CLIs are used.

The concrete problem it solves is the copy-paste loop that appears as soon as two agent sessions need to cooperate. Without a channel between them, a developer manually ferries output, diffs, and instructions between terminal windows. hcom replaces that manual relay layer. Hooks installed into configuration directories under ~/ or HCOM_DIR record agent activity into a local SQLite database, and messages are delivered out of that database to the peer agents. Delivery happens mid-turn, injected between tool calls, or by waking an idle agent immediately, so coordination does not depend on a human noticing that something finished. If hcom is not in use, the hooks do nothing.

Key capabilities

  • Agents exchange real-time messages, including requests, updates, replies, threads, and bundled context for handoffs.
  • Agents observe one another through transcripts, file edits, live terminal screens, and command history.
  • Agents subscribe to status changes, file edits, and specific events, and can react to them automatically.
  • Agents spawn, fork, resume, and kill one another, in any terminal emulator or headless.
  • Collision detection is on by default: if two agents edit the same file within 30 seconds, both are notified.
  • A TUI dashboard opens by running hcom with no arguments, and hcom kill can close panes in kitty, wezterm, tmux, zellij, waveterm, cmux, and herdr.
  • Cross-device coordination runs over an MQTT relay with hcom relay new and hcom relay connect, with end-to-end encrypted payloads so brokers do not see data.
  • Tools without hooks join by running hcom start, and any process can wake agents with hcom send.

Who uses it and how

  • Developers running two terminal sessions, for example hcom claude in one and hcom codex in the other, who want one agent to review the other's work and send fixes.
  • Users coordinating fan-out, such as spawning three OpenCode instances, splitting work, and collecting results.
  • Pipelines where one agent watches for a peer going idle and hands it the next task.
  • Hookless or non-agent processes that need to wake or message an agent, using hcom start and hcom send.
  • Operators connecting agents across machines through the MQTT relay, using a shared join token per device.

Getting started

Install with brew install aannoo/hcom/hcom, uv tool install hcom, pip install hcom, or the platform installer script for macOS, Linux, Android (Termux), WSL, or Windows PowerShell, then update any existing install with hcom update. Start an agent by prefixing its normal command, for example hcom claude or hcom codex.

How it compares

This registry entry lists no comparable orchestration tool, and no paid products that hcom replaces are given, so hcom stands alone here. The other named tools are the agents it coordinates rather than alternatives to it.

When to use it — and when not to

There is no server to run: state lives in a local SQLite database, hooks live in agent configuration directories under ~/ or HCOM_DIR, and the optional relay uses an MQTT broker, which can be a private or self-hosted one configured with --broker and --password. It is a poor fit for anyone unwilling to have hooks written into agent config directories, or for teams that need the relay split into scoped permissions, because hcom relay is one trust domain with all-or-nothing membership and no scoped roles or read-only peers. The join token should be treated like an SSH key or API key, since a leaked token means disconnecting all devices with hcom relay off --all. The README is more focused on usage than on internals, and the repository carries 38 open issues, so adopters should expect to read the source for edge cases.

project readme (upstream, from github) — read inline

hcom

CI Latest release License: MIT

Hook your coding agents together

hcom is a CLI that coding agents use to message, watch, and spawn each other across terminals.

Works with Claude Code, Codex, OpenCode, Kilo Code, Pi, Oh My Pi, Antigravity, Cursor, Kimi and Copilot - in any combination, 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
# With Python
uv tool install hcom  # or: pip install hcom
# macOS, Linux, Android (Termux), and WSL
curl -fsSL https://github.com/aannoo/hcom/releases/latest/download/hcom-installer.sh | sh
# Windows (native, PowerShell)
irm https://github.com/aannoo/hcom/releases/latest/download/hcom-installer.ps1 | iex
# Update any existing install to latest hcom version
hcom update

Quickstart

Terminal 1:

hcom claude   # codex / opencode / kilo / pi / omp / agy / cursor-agent / kimi / copilot / gemini

Terminal 2:

hcom codex

Prompt:

  • ask the other agent their favorite cake
  • review what claude did and send it fixes
  • spawn 3x opencode, split work, collect results
  • fork yourself to investigate the bug and report back
  • when codex goes idle, send it the next task

Open the TUI dashboard:

hcom

What agents can do

Message each other in real time: requests, updates, replies, threads, and 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 has a name. You and other agents can inspect its:

  • status and inbox
  • live terminal screen
  • transcript
  • event log, including file edits and tool calls

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.

Any other AI tool without hooks 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.

On public brokers, a leaked token gives an attacker full control of the relay. They can decrypt captured traffic, publish authenticated relay traffic, send text to listening agents, launch agents on enrolled devices, kill running agents, and use remote relay RPCs. If those agents can run tools, treat that as shell access on every enrolled device in the relay.

On private brokers with --password, the token still leaks the PSK, so captured traffic is still exposed. But the token alone is not enough to publish unless the attacker also has the broker password. Use a private broker when broker-side access control matters, or when the metadata shape of your traffic is itself sensitive. --password is broker access control, not another layer of message encryption.

Limits by design

  • Forward secrecy. A leaked PSK can decrypt old captured traffic.
  • Per-device attribution inside a relay. Sender identity is routing metadata, not authorization. Every enrolled device speaks with full authority.
  • Prompt injection from an authenticated peer. Enrollment is total trust — a peer can launch, kill, and drive agents via RPC, not just send messages. Only enroll devices you would give shell access to.
  • Local OS compromise. hcom trusts the local user account and ~/.hcom/config.toml. It does not defend against another user on the same account or malware with filesystem access.

Storage

The PSK is stored in ~/.hcom/config.toml. On Unix, hcom writes that file with mode 0600.

hcom keeps the PSK out of environment variables. Remote config_get and config_set refuse relay_psk, relay_token, relay_id, and the broker URL. hcom relay status shows only a short fingerprint so two devices can verify they share the same key without printing it.

Anyone who can read that file — another user on the same OS account, malware, or a backup written without preserving permissions — has the full PSK.

Incident response

Run hcom relay off --all. It asks every reachable trusted peer to disable the relay, then disables it locally, so your agents stop acting on attacker messages. It is best-effort damage control, not containment: the attacker's device ignores the request.

The PSK cannot be revoked. There is no server to notify and no denylist to update. Anyone who has the PSK can keep using the old relay until you stop using it.

To keep using relay after a leak, create a new relay with hcom relay new and move every trusted device to the new token. Rotation also changes the relay_id, so retained state on the old broker topics is orphaned.


Troubleshoot

hcom status                  # diagnostics
hcom reset all               # clear and archive: database + hooks + config

Uninstall

hcom hooks remove            # safely remove all hcom hooks
brew uninstall hcom          # or: rm $(which hcom)

Reference

Tools

Supported tools

Tool Message delivery Connect
Claude Code automatic hcom claude
Gemini CLI automatic hcom gemini
Codex CLI automatic hcom codex
Antigravity CLI automatic hcom agy
OpenCode automatic hcom opencode
Kilo Code automatic hcom kilo
Pi automatic hcom pi
Oh My Pi automatic hcom omp
Cursor CLI automatic hcom cursor-agent
Kimi automatic hcom kimi
Copilot CLI automatic hcom copilot
Anything else manual via hcom listen hcom start (run inside tool)
hcom r <session_id>           # Resume a session started outside hcom
hcom f <session_id>           # Fork a session in hcom
Claude Code headless and subagents

Detached background processes in print mode stay alive. Manage through the TUI.

hcom claude -p 'say hi in hcom'   # print mode (separate Agent SDK credits)
hcom claude --headless            # Run normal claude in background pty (works for any tool)

For subagents, run hcom claude, then prompt:

run 2x task tool and get them to talk to each other in hcom

CLI

CLI commands

What you might type from a shell. Agents run their own commands that they learn from the hcom CLI primer (~700 tokens) at launch. hcom --help for full flags.

Spawn

hcom [N] claude|gemini|codex|agy|opencode|kilo|pi|omp|cursor-agent|kimi|copilot   # launch N agents
hcom r <name|session_id>     # resume agent
hcom f <name|session_id>     # fork session
hcom kill <name|tag:T|all>   # kill + close terminal pane

hcom launch flags:

Flag Purpose
--tag Group label — agents can be addressed as @tag
--terminal Where windows open: default (auto-detect), kitty, wezterm, tmux, cmux, iterm, etc…
--dir Directory where the agent launches
--headless Run in background pty with no terminal window
--device Spawn on a remote device (via relay)
--hcom-prompt Initial user prompt
--hcom-system-prompt Append to system prompt

Anything else is forwarded to the tool: --model sonnet, --yolo, etc.

Other commands

hcom                           # TUI dashboard
hcom send -b @luna -- hey      # one-off message to an agent
hcom list                      # show all active agents
hcom term [name]               # view/inject into an agent's PTY screen
hcom events --wait <filters>   # Block until match for scripting
hcom update                    # update hcom version

hcom run docs --cli for all commands.

Config

Configuration

Config lives in ~/.hcom/config.toml. Precedence: defaults --infoorhcom run docs --config` for the full per-key reference.

Edit ~/.hcom/env to set external env vars passed to every launched agent.

Workflow Scripts

Multi-agent workflows

Bundled and user scripts (~/.hcom/scripts/) for multi-agent patterns:

hcom run                   # list available scripts
hcom run debate "topic"    # run one
hcom run docs              # tell agent to run this to create any new workflow

Included scripts

Tell agent to run them:

hcom run confess — An agent (or background clone) writes an honesty self-eval. A spawned calibrator reads the target's transcript independently. A judge compares both reports and sends back a verdict via hcom message.

hcom run debate — A judge spawns and sets up a debate with existing agents. It coordinates rounds in a shared thread where all agents see each other's arguments, with shared context of workspace files and transcripts.

hcom run fatcow — headless agent reads every file in a path, subscribes to file edit events to stay current, and answers other agents on demand.

Custom scripts: drop *.sh or *.py into ~/.hcom/scripts/ — auto-discovered, override bundled scripts of the same name. Ask an agent to author one; hcom run docs --scripts is the authoring guide.

Build

Building from source

# Prerequisites: Rust 1.88+

git clone https://github.com/aannoo/hcom.git
cd hcom
cargo build
cargo test

Using local build

Two options:

Symlink — simple, dev build is global.

ln -sf $(pwd)/target/debug/hcom ~/.cargo/bin/hcom

dev_root — works regardless of how hcom was installed (brew, pip, etc.); picks the newer of debug/release automatically:

hcom config dev_root $(pwd)
hcom config dev_root --unset  # revert
hcom status    # run local build

For concurrent worktrees, scope each to its own DB:

HCOM_DIR=$PWD/.hcom HCOM_DEV_ROOT=$PWD hcom claude

Contributing

Issues and PRs welcome. The codebase is Rust.

cargo build && cargo test
hcom config dev_root $(pwd)
hcom status
just ci  # run the CI gate locally

License

MIT

Frequently asked questions

Is hcom free to use?

hcom is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does hcom do?

Let AI agents message, watch, and spawn each other across terminals. Claude Code, Codex, Antigravity CLI, Cursor CLI, OpenCode, Kilo, Pi, Kimi

What is hcom written in?

hcom is primarily written in Rust. Its source is publicly available at https://github.com/aannoo/hcom, and it has 622 GitHub stars.