The mesh command group provides tools for managing distributed LLM sessions across multiple nodes. Sessions can be pushed to remote nodes, transferred between nodes, and continue running even when disconnected from the local terminal.

Use mesh serve to start a mesh node, mesh push to send sessions to remote nodes, and mesh attach to connect to running sessions.

Usage:
  sonny mesh [command]

Persistent flags

These apply to every mesh subcommand except serve, which has its own listener-side flags.

FlagTypeDescription
--client-castringCA bundle file used to verify the server cert
--client-certstringclient TLS certificate file (PEM) for mTLS-protected mesh endpoints
--client-keystringclient TLS key (PEM filesystem path OR pkcs11: URI per RFC 7512)
--client-key-pinstringPIN file for PKCS#11 client key (optional)
--dev-insecure-transport—DEVELOPMENT ONLY: allow plaintext, unauthenticated mesh channels on loopback addresses (equivalent to SONNY_MESH_INSECURE_DEV_PROFILE=i-accept-plaintext-mesh-not-for-production)
--endpointstringmesh gRPC endpoint (default: mesh.endpoint config, SONNY_MESH_ADDR, or localhost:50052)
-h, --help—help for mesh
--server-namestringSNI / cert-SAN match target (required when --client-cert is set)

Mesh subcommands also accept the global flags .

Subcommands

SubcommandPurpose
adoptAdopt a running session using a pinned, single-use offer
attachAttach to a running session
detachDetach from a session
execRun a shell command on a remote mesh node via its A2A endpoint
hostBootstrap and manage SSH-reachable mesh hosts
human-keyManage the keys that let a device attach to mesh sessions as their human
identityProvision and inspect mesh node identity material
listList nodes and sessions (alias ls)
nodesList mesh nodes
peersPrint this daemon’s mesh participation snapshot as JSON
pushPush a session to a remote node
relateGrant, revoke and list peer relationships between root sessions on two nodes
serveStart a mesh node
sessionsList mesh sessions
terminateTerminate one or many mesh sessions (aliases kill, stop)
transferTransfer a session to another node

sonny mesh service install|uninstall|run exists only on Windows builds (manages the mesh node as a Windows service); it is absent from this command tree entirely on Linux/macOS builds, where systemd/launchd own that job instead.

mesh serve

Start a mesh node that can host and transfer sessions. The node listens for gRPC client connections for session streaming and compatibility, advertises on the Synapse QUIC peer plane using protobuf framing by default, retains WebSocket and JSON negotiation for rolling-upgrade compatibility, accepts sessions from other nodes, and sends heartbeats to announce availability.

Usage:
  sonny mesh serve [flags]
FlagTypeDescription
--advertise-addrstringaddress peers should use to reach this node’s gRPC surface, e.g. a reachable tailscale DNS name like “lothiriel:9052” (default: --grpc); required on a multi-host mesh because the bind address is not routable from a peer
--authz-policystringpath to the RBAC policy YAML (default /etc/sonny/mesh/authz.yaml)
--castringTLS CA certificate file
--certstringTLS certificate file
--control-dbstringpath to the SQLite mesh control-plane DB (default <data>/control.db)
--coordinatorstringmesh coordinator address (if joining existing mesh)
--grpcstringgRPC listen address (default “:50052”)
-h, --help—help for serve
--keystringTLS key file
--labelstringsnode labels (key=value)
--managed-manifeststringprivate managed-worker deployment manifest (required in production builds)
--max-sessionsintmaximum concurrent sessions (default 10)
--mesh-peerstringsquic:// peer URL (preferred), or ws:// development / wss:// mTLS compatibility URL (repeatable)
--modelsstringssupported models
--namestringnode name (default: $(whoami)@$(hostname))
--node-idstringnode ID (default: auto-generated UUID)
--providersstringssupported LLM providers
--recipesstringsavailable recipes
--regionstringnode region (for routing)
--synapse-listenstringaddress Synapse listens on for QUIC/UDP (default) and WebSocket/TCP compatibility (default “:50053”)
--trust-domainstringSPIFFE trust domain for peer SVIDs (default mesh.local)
--zonestringnode zone (for routing)

mesh push

Usage:
  sonny mesh push [flags]
FlagTypeDescription
-f, --filestringlocal recipe file whose recipe ID is sent (or use --pack)
--follow—follow session output after push
-h, --help—help for push
--nodestringtarget node ID (default: best available)
--persist—persist session on detach (default true)
--recipestringID of the recipe the target node runs (or use --file)
--session-dirstringabsolute working directory for the session on the target node (default: the current directory)

mesh attach and mesh detach

sonny mesh attach <session-id> connects to a running session.

FlagTypeDescription
-h, --help—help for attach
--read-only—attach in read-only mode

sonny mesh detach leaves the session:

FlagTypeDescription
-h, --help—help for detach
--keep-running—keep session running in background (default true)
--stop—pause session instead of backgrounding

mesh transfer

Usage:
  sonny mesh transfer [flags]
FlagTypeDescription
--force—force transfer even if session is active
-h, --help—help for transfer

mesh terminate

sonny mesh terminate [session-id] (aliases kill, stop).

FlagTypeDescription
--all—terminate every matching session (requires --node or --all-nodes)
--all-nodes—with --all, terminate sessions on every node
--force—force terminate without graceful shutdown
-h, --help—help for terminate
--nodestringnode ID for --all (terminates all sessions on this node)
--reasonstringreason for termination
--yes—skip the interactive confirm for --all or --all-nodes

Inspecting nodes and sessions

sonny mesh list (alias ls) lists nodes and sessions; it takes no flags beyond -h/--help.

sonny mesh nodes:

FlagTypeDescription
-h, --help—help for nodes
--regionstringfilter by region
--zonestringfilter by zone

sonny mesh sessions:

FlagTypeDescription
-a, --all—show all sessions including completed
-h, --help—help for sessions
--isolation-assurancestringfilter by achieved assurance
--isolation-backendstringfilter by achieved backend
--isolation-statestringfilter by isolation verification state
--searchstringfilter by session, recipe, model, provider, or node text
--sortstringsort by updated, assurance, backend, or isolation-state (default “updated”)

Attaching one session without a node

To expose a single interactive session so a remote client can attach to it without running a full node, use --mesh-self on sonny run .