Skip to content

Reserved subjects

The protocol reserves a small set of facet names and system command names. Packages MUST NOT use these for application ops or events.

Reserved facets (transport-handled)

These appear in the wire grammar as {root}.{mount}.<facet>:

FacetDirectionUseSource
$inboxinboundactor receives opsNatsTransport.semanticToNats lines 308–330
$eventsoutboundpub/sub events fan-outsame
$reply (with suffix .<cid>)actor → callerrequest/reply correlationline 297–305
$exitchild → parentlifecycle exit signal for supervisionline 316–319
$stateactor → watchersKV last-value updates (handled by JetStream)spec

These are reserved at the transport layer. Custom mounts MUST NOT name themselves with leading $ (e.g., a mount named $mything would collide with facet handling).

Reserved root-level subjects

SubjectUse
{root}.$inboxroot-level actor inbox (the runtime root)
{root}.$eventsroot-level events
{root}.$exitroot-level exit
{root}.$reply.<cid>reply subjects for any caller in this root
{root}.> (wildcard)match-all under root

Reserved system commands

Auto-subscribed by MatrixActor. Verbatim from projects/matrix-3/packages/core/src/core/MatrixActor.ts:111:

typescript
const SYSTEM_COMMANDS = [
  '$join',
  '$join_ack',
  '$leave',
  'introspect',
  '$introspect',
  '$ping',
  '$reply',
  '$getState',
  '$getHistory',
  '$createControl',
  '$activity',
  '$preferences',
  '$config',
  '$membrane-inherit',
  '$membrane',
  '$skill',
  '$cognitive.set',
  '$cognitive.get',
  '$triggers.add',
  '$triggers.remove',
  '$triggers.list',
  '$skills.add',
  '$skills.remove',
] as const;

Each is auto-handled; no actor needs to declare them in static accepts.

CommandWhat it does
$join / $join_ack / $leavechild registers/unregisters with parent
$introspect (and introspect)returns the actor's full declared surface
$pinghealth check, returns $pong
$replyresponse envelope op
$getState / $getHistorystate read / event history read
$createControlspawn a control child
$activityactivity tracking (oracle loop)
$preferences / $configactor configuration
$membrane / $membrane-inheritCESK membrane program management
$skill / $skills.add / $skills.removeruntime skill management
$cognitive.set / $cognitive.getcognitive overrides
$triggers.add / $triggers.remove / $triggers.listruntime prompt triggers

Excluded system commands

$prompt and $source-code are NOT in SYSTEM_COMMANDS. The source comment (MatrixActor.ts:135):

"NOTE: $prompt and $source-code are intentionally NOT here. They live in headlessFrameworkOps (see _subscribeToInbox) so that shell-managed actors defer to the shell handler, avoiding the dual-dispatch race (actor + shell both fire for the same op)."

These two commands route through a separate framework-ops layer to preserve shell ownership of conversational/source surfaces.

Aspirational system commands (target)

WORKSTREAMS/core-and-packaging/ACTOR-COMMUNICATION-CONTRACT.md § "System Commands" documents Plan 9-aligned commands not yet implemented:

CommandPlan 9 analogStatus
$ctl/proc/<pid>/ctltarget
$status/proc/<pid>/statustarget
$childrenls /proc/<pid>/target
$ns/proc/<pid>/nstarget
$env/proc/<pid>/envtarget
$health(Matrix-only)target

$ctl would unify stop/restart/reconfigure/gc/debug under one op. The spec is settled; the implementation is workstream material.

Reserved op name prefix

$<verb> and $<verb>.<modifier> are reserved for system commands. Application ops MUST NOT use a leading $. Instead use <area>.<verb>:

Application opReserved (forbidden)
chat.send$send
registry.resolve$resolve
runtimes.start$start

NATS protocol-internal subjects

These are NATS server internals and not Matrix subjects:

SubjectUse
_INBOX.*NATS native request/reply reply subject
_R_.*NATS service routing
$SYS.*NATS system account subjects

Matrix code does NOT publish to these. The transport rejects publishes that fall outside the Matrix root prefix; NATS rejects publishes to $SYS.* from non-system accounts.

See also