Detection
Before it can drive a pane, cyber-mux has to know which multiplexer it is inside. Detection is
two-mode.
1. Fast-path / override
Section titled “1. Fast-path / override”If CYBER_MUX is set to a known value (tmux, herdr, wezterm, zellij, screen, or none), it
is trusted outright. CYBER_MUX_PANE carries the pane id alongside it.
This also acts as an override: CYBER_MUX=none forces no-mux behavior even inside a real
multiplexer.
export CYBER_MUX=tmux CYBER_MUX_PANE=%3cyber-mux doctor prints exactly this line for your current pane, so you can pin it and skip
discovery.
2. Ancestry discovery
Section titled “2. Ancestry discovery”With no fast-path set, cyber-mux walks the process ancestry from its own PID (ps -o ppid=,comm=),
looking for a tmux, herdr, wezterm/wezterm-gui/wezterm-mux-server, zellij, or screen
ancestor. It walks past the tool’s own shell — the immediate parent is often not the human’s pane.
If the walk is inconclusive (e.g. ps is unavailable), it falls back to the $TMUX / $HERDR_ENV /
$WEZTERM_PANE / $ZELLIJ environment hints — the fast-positive signal used only when the walk
itself found nothing. WezTerm has no separate “inside wezterm” flag the way $TMUX/$HERDR_ENV are:
$WEZTERM_PANE is the hint, doubling as both the signal and the pane id. Zellij sets $ZELLIJ
inside any Zellij pane, the same ambient-flag shape as $TMUX/$HERDR_ENV. These hints are never
trusted over ancestry — an ancestry-verified multiplexer always wins over a stale env hint. The
Zellij adapter requires Zellij ≥ 0.44.1, the release that added per-pane CLI addressing.
Self pane
Section titled “Self pane”cyber-mux resolves its own pane from environment alone (no ps walk): the CYBER_MUX_PANE
fast-path, then $TMUX_PANE (tmux), then $HERDR_PANE_ID (herdr), then $WEZTERM_PANE (wezterm),
then $ZELLIJ_PANE_ID (zellij). This is the identity key a session uses to address itself.