Keep OpenClaw TUI running in a persistent tmux session, so reconnection is instant and safe.
# start or attach TUI session
watson
# attach only (if already running)
watson_a
# kill the session
watson_kAdd these shortcuts to ~/.bash_aliases:
# Personal shortcuts
openclaw() {
PATH="$HOME/.local/share/openclaw-node/current/bin:$PATH" /usr/bin/openclaw "$@"
}
# Start/attach OpenClaw TUI in tmux session "watson"
watson() {
tmux new-session -A -s watson 'PATH="$HOME/.local/share/openclaw-node/current/bin:$PATH" /usr/bin/openclaw tui --session agent:main:main --deliver'
}
# Attach to existing watson session only
watson_a() {
tmux attach -t watson
}
# Kill watson session
watson_k() {
tmux kill-session -t watson 2>/dev/null || true
}~/.bashrc already sources ~/.bash_aliases, so open a new shell (or run source ~/.bash_aliases) to use the commands.
# direct
PATH="$HOME/.local/share/openclaw-node/current/bin:$PATH" /usr/bin/openclaw tui --session agent:main:main --deliver
# with tmux directly
tmux new-session -A -s watson 'PATH="$HOME/.local/share/openclaw-node/current/bin:$PATH" /usr/bin/openclaw tui --session agent:main:main --deliver'Installed via npm global. Do not replace the package while the Gateway or TUI is running: both processes hold OpenClaw state and may keep loading modules from the replaced installation.
systemctl --user start openclaw-maintenance-update.service
journalctl --user -u openclaw-maintenance-update.service -n 200 --no-pagerThe openclaw-maintenance-update.timer checks daily at 04:15 UTC. It does
nothing when the installed version is current. For a real update it stops
watson and the Gateway, verifies and backs up SQLite/config/session state,
installs an exact package version, runs
aligns the configured official WhatsApp channel plugin to that exact version,
runs openclaw doctor --fix --non-interactive --yes, validates the config and
databases, and requires the new Gateway version and RPC probe before recreating
the TUI. SQLite is never checked concurrently with a running Gateway; the two
integrity passes happen while all writers are stopped, before and after
doctor. The local-model llama-cpp plugin is deliberately outside this
maintenance job. Any failure leaves the Gateway stopped for inspection.
Check current vs latest:
openclaw --version
npm show openclaw version- If Gateway is down, start it first:
openclaw gateway start - Detach from tmux without stopping TUI:
Ctrl+bthend
The gateway and the TUI session have separate lifecycles. A running gateway does not prove that the persistent tmux session exists.
Check both before changing the gateway configuration:
openclaw gateway status
tmux lsIf the gateway is healthy but the tmux session is absent, recreate only the TUI session:
tmux new-session -d -s watson 'PATH="$HOME/.local/share/openclaw-node/current/bin:$PATH" /usr/bin/openclaw tui --session agent:main:main --deliver'
tmux lsThe agent-scoped session key is required on multi-agent installations. A bare
--session main is ambiguous and the TUI exits immediately.