GuidesRunning & maintaining

What is tmux? The tool that keeps agent sessions alive

A terminal multiplexer: programs keep running after you disconnect, and you reattach from anywhere. The five commands that matter, tmux vs screen, and the one thing tmux can't survive.

August 10, 2026The Everpod team
The short answer

tmux is a terminal multiplexer: in its own words, it “enables a number of terminals to be created, accessed, and controlled from a single screen” and, crucially, “may be detached from a screen and continue running in the background, then later reattached.” That second sentence is why the agent era rediscovered a tool from 2007: a program started inside tmux keeps running after your SSH connection drops, your laptop sleeps, or you simply go to bed. Start a long agent run inside tmux on a server, close everything, reattach tomorrow: the run never noticed you left.

The mental model: a server for your terminals

The persistence isn’t magic: it’s architecture. tmux “keeps all its state in a single main process, called the tmux server,” which runs in the background and owns every program started inside it. What you see in your terminal is just a client displaying one of the server’s sessions. Disconnecting kills the client; the server, and everything inside it, carries on. Within a session, tmux organizes things as windows (full-screen, like tabs) split into panes (rectangular sub-terminals), useful but secondary to the detach trick for most agent work.

The five commands that cover 95% of use

tmux new -s agent      # start a named session
Ctrl-b d               # detach - it keeps running
tmux ls                # list sessions
tmux attach -t agent   # reattach from anywhere
Ctrl-b [               # scroll back (q to exit)

Every tmux keystroke starts with the prefix, Ctrl-b by default, followed by a command key. Detach with prefix-d, reattach with tmux attach from any later connection, and use copy mode (prefix-[) to scroll through output that has already flowed past. That’s most of it; the man page runs long because tmux can do far more, none of it required.

Why agent operators specifically need it

A coding agent’s work session is a long-running terminal program, and a bare SSH session dies with your connection, taking the program with it. tmux is the standard fix, which is why it anchors the DIY always-on-agent pattern: Claude Code in tmux on a VPS, reachable from any device, surviving every disconnect. It pairs naturally with mosh. The two solve different halves of the same problem: mosh keeps your connection pleasant on flaky networks, tmux keeps the program alive when there’s no connection at all. From a phone, the combination is what makes driving a server from your pocket workable.

tmux vs GNU screen

screen is the older tool in the same category: GNU Screen, “a full-screen window manager that multiplexes a physical terminal between several processes”. It is still maintained (release 5.0.2 shipped in July 2026). Both deliver the core detach-and-survive behavior, so neither is a wrong answer. tmux is the busier project (part of the OpenBSD base system, ISC-licensed, release 3.7b in July 2026, original author Nicholas Marriott still maintaining) and is what nearly every agent-on-a-server guide you meet will assume, which is a practical reason to learn it first even before comparing features.

What tmux does not do

tmux survives disconnects, not reboots: its server is an ordinary process, and when the machine restarts (say, for security updates), sessions and everything running in them are gone. Anything that must outlive the machine belongs on disk, not in a terminal’s memory, which is exactly how agents like OpenClaw treat their own state. Treat tmux as the pause button for live work, and disk as the place work actually lives.

Your own cloud agent, set up for you.

Everpod runs OpenClaw on a private, always-on computer of its own: set up, secured and backed up, with model usage included. You name your agent, and say hello about fifteen minutes later.

Create your agent

First month half price, then $29/mo · model usage included · cancel anytime

Wondering what you’d do with one? See what a cloud agent can do