Overview
Disconnect one or more agents from hcom. Preserves instance data in events table for later resume.Syntax
Agents to stop (names,
tag:X, or all)If omitted, stops self (current agent)Special Targets
Stop all local instancesCannot be combined with other targets
Stop all instances with specific tag
Flags
Skip confirmation preview when running inside AI toolRequired for
all, tag:*, or multi-agent stops from Claude/Gemini/Codex/OpenCodeBehavior
Self-Stop (No Targets)
Resolves your identity and stops it:Named Stop
Stop specific agent(s):Tag Stop
Stop all agents with a tag:Stop All
Stop everything:What Happens
- Headless Instances: Process killed (SIGTERM → SIGKILL after 2s)
- Interactive Instances: Notified via TCP (graceful shutdown)
- Stopped Event: Logged with full snapshot to events table
- Instance Row: Deleted from instances table
- Subagents: Recursively stopped when parent stops
life.stopped event with snapshot, enabling resume via hcom r.
Remote Instances
Stopping remote instances (from other devices) sends control message via MQTT relay:Remote instance name must include device suffix (
:BOXE). Without it, stop fails with “missing device suffix” error.Examples
Self-Stop
Stop Named Agent
Stop Multiple Agents
Stop by Tag
Stop All (with Preview)
Stop All (with —go)
Stop Tag with Orphans
Exit Codes
All targets stopped successfully
- Identity resolution failed (self-stop)
- Instance not found
- Running tasks prevent stop (subagent guard)
- Relay unavailable (remote instance)
- Tag/all with no matches
Notes
Graceful vs Kill:
hcom stop is graceful (TCP notify for interactive, SIGTERM for headless). Use hcom kill for immediate SIGTERM → SIGKILL.Headless Logs: Stopped headless instances print their log file path. Logs persist in
~/.hcom/.tmp/logs/ for debugging.Resume: Stopped instances can be resumed with
hcom r <name>, which restores session history and cursor position.Subagent Guard: Cannot run
hcom stop from within a Task subagent. Subagents should end their turn naturally without calling stop.Confirmation Gate: When run from inside an AI tool (Claude/Gemini/Codex/OpenCode) with
all, tag:*, or multiple targets, requires --go flag and shows preview.Data Preservation: Stop logs a
life.stopped event with full instance snapshot (status, directory, session_id, tool, etc.). This enables perfect resume via hcom r.Related Commands
hcom list --stopped- View stopped instanceshcom r- Resume stopped agentshcom kill- Terminate processes immediatelyhcom start- Reconnect to hcom