Skip to main content
The daemon protocol lives in packages/agent/src/protocol.ts. It’s how CLI, TUI, and web all attach to a running daemon.

Version numbers

  • DAEMON_PROTOCOL_VERSION — bumps only on incompatible changes.
  • DAEMON_SCHEMA_REVISION — bumps on schema changes.
Every wire change is classified as one of:
  • Backward-compatible — old clients keep working with new daemons without a change.
  • Capability-gated — the daemon only sends the new thing to clients that advertised support.
  • Incompatible — old clients cannot talk to new daemons. Requires a DAEMON_PROTOCOL_VERSION bump.

Capability negotiation

Clients advertise capabilities on connect. The daemon checks capabilities before sending new commands or depending on events the client doesn’t understand. New daemon commands must not be part of startup without a protocol or capability gate — otherwise old clients would fail to connect.

Compatibility tests

Every wire change updates:
  • The compatibility maps.
  • The new-client / old-daemon test.
  • The old-client / new-daemon test.
If a change ships without these updates, mixed-version deployments will break.
Last modified on August 17, 2026