Skip to main content

hcom

CI Latest release License: MIT

Connect independent coding agents across terminals and machines. They can message each other, monitor activity, react to events, and launch more agents. Start an agent with hcom in front, then prompt normally.

Use it to coordinate multi-agent pipelines, run different AI CLIs as each other's subagents, or just to avoid copy-pasting.

Works with claude codex opencode grok hermes pi omp agy copilot qoder cursor kimi kilo gemini

https://github.com/user-attachments/assets/1ce23ed9-f529-4be0-8124-816aa4c2fd43

Install

macOS, Linux, Windows:

uv tool install hcom

or: brew install aannoo/hcom/hcom

or install script

macOS, Linux, Android:

curl -fsSL https://github.com/aannoo/hcom/releases/latest/download/hcom-installer.sh | sh

Windows:

irm https://github.com/aannoo/hcom/releases/latest/download/hcom-installer.ps1 | iex

Quickstart

Terminal 1:

hcom claude

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

  • find the agent that worked on that feature, resume it and ask it why it's bad

Open the TUI dashboard:

hcom

What agents can do

  • Message each other in real time. Messages arrive mid-turn (after tool calls) or wake idle agents immediately.

  • Observe who's running and what they're doing: status, transcripts, tool results, file edits, commands, live terminal screens, context/token usage. Search past conversations.

  • Subscribe to status changes, commands, file edits, collisions, and session events, then react automatically.

  • Control: spawn, fork, resume, kill agents 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

Hooks activate only when an agent is launched with hcom in front. Normal usage is unaffected.

Any other AI tool without hooks can join by running hcom start

In any CLI tool, prompt:

> run: `hcom start --help` follow what it says and stay connected
Any process can wake agents with hcom send

Send messages from any process/script:

hcom send -b @luna -- "wake up and do this task"

Chain with hcom events:

hcom events --idle luna --wait 600 && hcom send -b @nova -- "luna is done, review it"

Terminals

Every agent runs in a real terminal you can see, scroll, and interrupt. Any emulator works for spawning (hcom auto-detects). 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

Check with hcom relay status, toggle with hcom relay off / on.

Treat the token like an API/SSH key. See SECURITY.md


Reference

Full reference: hcom run docs

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
Qoder CLI automatic hcom qoder
Grok Build automatic hcom grok
Hermes Agent automatic hcom hermes
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

Hermes chats

A Hermes gateway chat (Telegram, Discord, etc) can join hcom:

hcom hooks add hermes   # plugin into the active profile (HERMES_HOME picks another); a running gateway loads it

In the chat: /hcom start connects, /hcom stop disconnects.

hcom hooks remove hermes disconnects and removes its plugin.

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 <command> --help for full flags.

Spawn

hcom [N] claude|gemini|codex|agy|opencode|kilo|pi|omp|cursor-agent|kimi|copilot|qoder|grok|hermes   # 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 <name> Group label — agents can be addressed as @tag
--terminal <preset> Where windows open: default (auto-detect), kitty, wezterm, tmux, cmux, iterm, etc…
--dir <path> Directory where the agent launches
--headless Run in background pty with no terminal window
--device <name> Spawn on a remote device (via relay)
--hcom-prompt <text> Initial user prompt
--hcom-system-prompt <text> Append to system prompt
--json Print the outcome as one JSON object (also hcom r, hcom f, hcom kill); an error that stops the command before it acts goes to stderr with a non-zero exit and no JSON

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 events --follow           # Stream events as JSON Lines
hcom update                    # update hcom version

hcom run docs --cli for all commands.

Config

Configuration

Config lives in ~/.hcom/config.toml. Precedence: defaults < config.toml < env vars.

hcom config                           # show all values with sources
hcom config <key>                     # get
hcom config <key> <value>             # set
hcom config <key> --info              # detailed help for a key
hcom config -i <name> <key> <value>   # per-agent override at runtime

Keys

Key Purpose
tag Group label — launched agents become tag-name
hints Text appended to every message the agent receives
notes Text appended to bootstrap (one-time, at launch)
bootstrap_exclude Bootstrap parts to omit: identity, messages, capabilities (including tag, relay, headless, and command notices), rules, handoff, or all (default: none). Inspect with hcom config bootstrap show [part].
auto_approve Auto-approve safe hcom commands (send/list/events/…)
auto_subscribe Event subscription presets: collision, created, stopped, blocked
name_export Export instance name to a custom env var
title_mode Terminal/tab title behavior: combined (default), label, or off
terminal Where new agent windows open (hcom config terminal --info)
timeout Idle timeout for headless Claude (seconds)
subagent_timeout Keep-alive for Claude subagents (seconds)
claude_args / gemini_args / codex_args / opencode_args / kilo_args / pi_args / omp_args / cursor_args / kimi_args / copilot_args / qoder_args / grok_args / hermes_args Default args passed to the tool

Scope

hcom config tag mycrew                        # global
hcom config -i luna hints "respond in JSON"   # per-agent
HCOM_TAG=dev hcom 3 claude                    # per-launch env

Per-project isolation

export HCOM_DIR="$PWD/.hcom"   # isolate hcom state (db, logs) to this folder
rm -rf "$HCOM_DIR"             # clean up

Run hcom config <key> --info or hcom 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.

  • hcom run onidle — waits for an agent to go idle, then types text into another agent (hcom run onidle luna nova 'luna is done, review it') or launches a new one with it as the prompt (hcom run onidle luna codex 'review what luna just did').

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.

Troubleshoot and Uninstall

Troubleshoot

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

Uninstall

Safely remove all hcom hooks:

hcom hooks remove

Then remove binary:

brew uninstall hcom
# or: uv tool uninstall hcom
# or: rm "$(which hcom)"

Contributing

Issues and PRs welcome. Build from source and dev setup: CONTRIBUTING.md

License

MIT

Metadata

Release files for hcom 0.7.31

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for hcom 0.7.31
File Actions
hcom-0.7.31-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for hcom-0.7.31-py3-none-win_amd64.whl
hcom-0.7.31-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details for hcom-0.7.31-py3-none-musllinux_1_2_x86_64.whl
hcom-0.7.31-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details for hcom-0.7.31-py3-none-musllinux_1_2_aarch64.whl
hcom-0.7.31-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details for hcom-0.7.31-py3-none-manylinux_2_28_aarch64.whl
hcom-0.7.31-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for hcom-0.7.31-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
hcom-0.7.31-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for hcom-0.7.31-py3-none-macosx_11_0_arm64.whl
hcom-0.7.31-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for hcom-0.7.31-py3-none-macosx_10_12_x86_64.whl
hcom-0.7.31-py3-none-android_24_arm64_v8a.whl Python 3 none Android API level 24+ ARM64 v8a Details for hcom-0.7.31-py3-none-android_24_arm64_v8a.whl

Total release size: 56.7 MB

Release files / hcom-0.7.31-py3-none-win_amd64.whl

Download URL hcom-0.7.31-py3-none-win_amd64.whl
Size 8.0 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
4434e90b526856f69c277bba59d042dd2f33bb992b14369bd98a6dcb13b9ef6d
BLAKE2b-256 checksum
How to use checksums
f593dcbf118cae3b9fa3f2ca91c1e67e7fa90312e76b514d3519c7c73cadeabd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / hcom-0.7.31-py3-none-musllinux_1_2_x86_64.whl

Download URL hcom-0.7.31-py3-none-musllinux_1_2_x86_64.whl
Size 7.4 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
178d9e457c1d83eeaa59f06f720d3bae224b6f9cd5b66b4d84ec4f15b9dd5cfd
BLAKE2b-256 checksum
How to use checksums
4595c1c226a9c35c6203415b83d4920e5b8e2fb1061651c1f1fa06f245b41123
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / hcom-0.7.31-py3-none-musllinux_1_2_aarch64.whl

Download URL hcom-0.7.31-py3-none-musllinux_1_2_aarch64.whl
Size 6.8 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
05075c91616318cdc01ddf17a29578d84ba5881ee481bc908aa7219c75ee00c3
BLAKE2b-256 checksum
How to use checksums
8db84c7a0528cfe7e379ac0988c75153e58e2b1e2b638d13c50aa38ee6a0e4a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / hcom-0.7.31-py3-none-manylinux_2_28_aarch64.whl

Download URL hcom-0.7.31-py3-none-manylinux_2_28_aarch64.whl
Size 6.6 MB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
6a7e022a9ad3dba7a6c6744afd0ce4c33590c4bba39a05538c6ecb9032c67b46
BLAKE2b-256 checksum
How to use checksums
c35327da25db38b9f079f4998d98b274ba50bf7da96b8b3904c5c24c7ab82504
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / hcom-0.7.31-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL hcom-0.7.31-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 7.3 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
5467f4f360119617cea105184199941ee4338e6581c2801541cdaae0f8d5e7b3
BLAKE2b-256 checksum
How to use checksums
1dde02ef910a9f6776363c9042cdff965a772a09f9678289c30c320b1e976d6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / hcom-0.7.31-py3-none-macosx_11_0_arm64.whl

Download URL hcom-0.7.31-py3-none-macosx_11_0_arm64.whl
Size 6.6 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
5936242b9956bb9297151eed1dd9a40967967df87a8365f97f0e0b41360b8c98
BLAKE2b-256 checksum
How to use checksums
059212d18a45357ef2a9765342203d5031b08dcd67bc988814428c10b46f6a3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / hcom-0.7.31-py3-none-macosx_10_12_x86_64.whl

Download URL hcom-0.7.31-py3-none-macosx_10_12_x86_64.whl
Size 7.1 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
f8f957e531ef70cdae736ece5fa5e812a38e0123dbf0e01d97f077ab1bedf418
BLAKE2b-256 checksum
How to use checksums
5bbbca9ae354c9e2ded1f028ae663ee8d43e3e61c87fcd9b3d0df034d5f7aa5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / hcom-0.7.31-py3-none-android_24_arm64_v8a.whl

Download URL hcom-0.7.31-py3-none-android_24_arm64_v8a.whl
Size 6.8 MB
Tags Android API level 24+ ARM64 v8a Python 3
SHA-256 checksum
How to use checksums
78dde68975e794e8f29b7f3a13c36533b2a8566416d04aec7b4a20c841dd3dc1
BLAKE2b-256 checksum
How to use checksums
f360b88096faff56b11bef830af3066ad7843798ae90df32a23d7bf2e90530a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for hcom 0.7.31

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.7.31 This release

8 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page