Overview
Thehcom events command provides query and subscription capabilities for the event stream, which tracks messages, status changes, file edits, and lifecycle events across all agents.
Basic Usage
Event Filters
Filters combine with AND logic (same flag repeated = OR).Agent & Type
Status & Context
Commands & Files
Messages
Time Range
Shortcuts
SQL Queries
SQL Schema (events_v view)
Base fields:id(integer)timestamp(ISO-8601 string)type(message | status | life)instance(agent name)
msg_*):
msg_from(sender name)msg_text(message content)msg_scope(broadcast | mentions)msg_sender_kind(instance | external | system)msg_delivered_to(JSON array)msg_mentions(JSON array)msg_intent(request | inform | ack)msg_thread(thread name)msg_reply_to(event ID)
status_*):
status_val(listening | active | blocked | error)status_context(tool:X | deliver:X | approval | prompt | exit:X)status_detail(file paths, commands, error messages)
life_*):
life_action(created | ready | stopped | batch_launched)life_by(initiator name)life_batch_id(batch identifier)life_reason(stop reason)
- Use
LIKE '%name%'for JSON arrays (delivered_to, mentions) - Use
<>instead of!=for negation - Combine with filter flags for readability
Event Subscriptions
Subscriptions deliver matching events as messages from[hcom-events].
Subscribe with Filters
Subscribe with SQL
Manage Subscriptions
Wait Mode
Block until a matching event occurs or timeout.0- Event matched1- Timeout or error
Launch Status
Wait for agent launch to complete.Examples
Development Monitoring
Agent Coordination
Debug & Audit
Output Format
Streamlined (default)
Compact format (~35% token reduction) with:- Truncated timestamp (19 chars)
- Removed bloat fields (sender_kind, scope, delivered_to)
- Truncated detail fields (unless —cmd/—file active)
Full (—full)
Complete event data including all fields.JSON
Tips
- Use
--last Nto limit output size - Combine filters to narrow results:
--agent peso --cmd git - Use subscriptions instead of polling:
events sub --idle peso - Use
--waitfor blocking operations - Archive searches include
--allflag - Collision detection auto-filters for self-relevance
See Also
- hcom listen - Wait for messages
- hcom list - Agent status
- hcom config - Auto-subscribe presets