Tmux Session Persistence

Automatically enabled once tmux is installed. The CLI process stays persistent inside a tmux session, so restarting the daemon does not interrupt the CLI.

tmux session management

Why it matters

On botmux restart, the worker process exits, but the tmux session (and the CLI process inside it) keeps running. The next time a message arrives, the worker automatically re-attaches, with no need to reload context via --resume — the context stays alive the whole time, saving tokens, saving time, and losing no state.

Eventtmux sessionCLI process
botmux restartSurvivesSurvives (re-attached on next message)
/close or close buttonDestroyedTerminated (SIGHUP)
CLI exits / crashes on its ownCloses along with itAlready exited (automatically restarted with a new session)

Attach directly

# Interactive session list; attach directly after selecting
botmux list

# Manual attach (session name = bmx-<first 8 chars of sessionId>)
tmux attach -t bmx-<first8>
# Ctrl+B, D to detach, without affecting the running CLI

# Force fall back to pure pty mode (without using tmux)
BACKEND_TYPE=pty botmux start

Once you attach, what you see is a terminal exactly identical to your local development — and this is the key difference between botmux and "read-only output" approaches.