Docs/Hosting a runtime

Hosting a runtime

constant host runs one agent CLI inside a native PTY and lets you switch the live runtime with a tmux-style prefix key, mid-conversation.

constant host codex
constant host claude

The child keeps its own terminal UI, colors, keybindings, and resume behavior. Constant sits outside it, forwards input and output untouched, and only steps in when it sees the prefix key.

Switching

The default prefix is Ctrl-B. Press it, release, then a key:

KeysAction
Ctrl-B cContinue in Claude Code, refreshing the existing projection
Ctrl-B CCreate a new Claude continuation
Ctrl-B xContinue in Codex, refreshing the existing projection
Ctrl-B XCreate a new Codex continuation
Ctrl-B :Open the Constant command line (switch, new, quit)
Ctrl-B dDetach and exit cleanly
Ctrl-B Ctrl-BSend a literal Ctrl-B to the child

The full list lives in Keybindings.

Changing the prefix

If Ctrl-B collides with tmux, pick another:

constant host codex --prefix C-t
CONSTANT_PREFIX=C-t constant host codex

What a switch does

On a switch, Constant stops the current child, distills its active session, writes the target runtime's native session, and starts the target with its own resume command. No summary, no model calls. See How it works and What carries.

Pass-through, not a multiplexer

Constant hosts exactly one runtime at a time and forwards its output verbatim. It is not a terminal multiplexer or compositor, which is why the host stays small. There is no persistent status bar, by design.