Skip to main content
monolex-pty-daemon is the native PTY and terminal-emulation service beneath the Monolex desktop app, headless server, Maxmux, MonoTerm, and Monopty. It owns child processes and Alacritty-based VTE state so clients can reconnect without becoming the terminal process owner. Published contract: monolex-pty-daemon 0.2.8, OpenCLIs build 2026-07-18-155744. The executing binary, registry, and public CDN metadata agree on this release.

Quick Start

Most users should let Monolex or the headless service manage the daemon rather than launching an extra owner manually.

Complete Command Reference

There are intentionally no public create/write/resize subcommands. Those operations travel over the versioned daemon protocol through Monolex clients; exposing a second ad-hoc CLI parser would split ownership of ordering and state.
Only the four flag forms above are parser exits. Bare help, bare version, an unknown option, or any other first argument falls through to daemon startup. Do not probe this binary with guessed subcommands.

Internal Control Protocol

The daemon control socket currently uses protocol version 1 and accepts seven newline-delimited JSON request types. These are a client-library contract, not shell subcommands: The control response has one stable shape with success, optional sessionId, socketPath, error, message, and protocolVersion fields. Session input/output then travels over the returned per-session socket; users should go through Headless, Monopty, Maxmux, MonoTerm, or lib-pty-client instead of writing raw protocol messages.

Session retirement is process-tree ownership

In 0.2.8, remove-session moves the session out of the shared map, releases the global lock, then terminates and reaps the owned process tree before it acknowledges success. A stubborn child therefore cannot freeze unrelated health, list, or create requests. If cleanup fails, the session is put back and the caller receives an error instead of a successful row-only deletion. On Unix, the daemon validates the session leader and foreground process group, sends a graceful hangup, waits, then uses a bounded kill escalation. On Windows, every ConPTY session is assigned to a Job Object configured with KILL_ON_JOB_CLOSE, so descendants are contained with the shell. Whole-daemon shutdown drains all sessions and applies the same cleanup contract. A lifecycle test should prove that both the shell PID and a foreground descendant PID are gone after close; an empty session list alone is insufficient evidence.

What the Daemon Owns

The daemon does not own desktop tabs, gateway authentication, remote estate presence, terminal UI key bindings, or AI answer extraction. Those remain in their respective client and orchestration layers.

Deployment and Signing

On macOS, a copied or rebuilt sidecar must be code-signed before a hardened Monolex app can launch it. A successful build alone is not deployment proof. For a packaged app, verify all of these independently:
On Linux and Windows, verify the installed architecture-specific payload and a real PTY lifecycle. Socket or named-pipe reachability does not by itself prove that the child terminal is rendering correctly.

Published Platforms

Version 0.2.8 ships five standalone archives from clean source commit 98c4bcada9e8d248ec48678e191f8d47daefd436: darwin-aarch64, linux-x86_64, linux-aarch64, windows-x86_64, and windows-aarch64. All five archives and extracted binaries were directly hash-verified. The macOS payload executed as 0.2.8 and passed strict Developer ID verification. Headless 0.1.45 also bundles PTY Daemon 0.2.8 in each of its four platform archives. A standalone daemon version check and a Headless-bundled sidecar check are different release proofs; verify the executable that the active service actually launches.

Relationships