Herdr vs tmux vs Zellij

By

Compare Herdr, tmux, and Zellij for persistent terminal sessions, remote work, layouts, plugins, and running multiple coding agents.

~~~

Herdr, tmux, and Zellij can all keep terminal programs running after you detach. They provide panes, tabs or windows, and persistent sessions.

Their priorities differ. tmux is a mature, general-purpose terminal multiplexer. Zellij focuses on a friendly workspace with layouts and a rich WebAssembly plugin system. Herdr is built around coding agents.

The short answer

Use tmux when you want the smallest, most established tool for persistent terminal sessions and you are happy to configure it.

Use Zellij when you want strong defaults, visible shortcut hints, reusable layouts, floating panes, and plugins aimed at a human terminal workspace.

Use Herdr when coding agents are the main processes in your terminal and you want agent state, agent-aware waits, direct attach, and an API they can control.

All three keep your existing terminal emulator. None requires you to replace Ghostty, Kitty, iTerm2, Alacritty, Windows Terminal, or another terminal application.

Practical comparison

CapabilityHerdrtmuxZellij
Persistent live terminalsYesYesYes
Main organizationWorkspaces, tabs, panesSessions, windows, panesSessions, tabs, panes
Default prefixctrl+bctrl+bMode-based shortcuts
Mouse-first useYesAvailable, usually configuredYes
On-screen shortcut guidanceHelp and workspace UIMinimal by defaultStrong default status bar
Agent lifecycle stateBuilt inNoNo
Agent-aware waits and promptsBuilt inNoNo
General terminal scriptingCLI and socket APIExtensive command languageCLI actions
Declarative layoutsWorkspace and plugin workflowsScripts and configKDL layouts
Plugin modelLocal executable workflowsConfig, scripts, hooks, external toolsWebAssembly/WASI plugins
Normal SSH workflowYesYesYes
Direct attach to one agentYesNoNo
Session shape after server exitRestored; agent resume when supportedNot a live-process checkpointBuilt-in session resurrection
Project maturityNewVery matureEstablished

Agent state is irrelevant if you only run shells and editors. If you need lifecycle-aware agent coordination, the size of the plugin ecosystem matters less.

How the concepts map

The names are slightly different:

HerdrtmuxZellij
WorkspaceSessionSession
TabWindowTab
PanePanePane
Attached clientClientClient

Herdr also has a separate concept for a recognized coding agent inside a pane.

A pane is a terminal. An agent is a process Herdr can classify as working, blocked, done, idle, or unknown.

tmux and Zellij see the pane. Herdr also tries to understand the agent running inside it.

Starting a session

With Herdr:

herdr

With tmux:

tmux

With Zellij:

zellij

Each command starts a session or connects you to its interface.

Named sessions differ:

# Herdr
herdr session attach work

# tmux
tmux new -s work

# Zellij
zellij --session work

Herdr recommends using workspaces inside the default session first. Named sessions are useful when you need completely separate servers, sockets, panes, and runtime state.

Detach and reattach

In Herdr, press ctrl+b, then q.

Reattach with:

herdr

In tmux, press ctrl+b, then d.

Reattach with:

tmux attach

In Zellij, the default detach action is available from its session mode. Reattach with:

zellij attach

While the background server remains alive, the original processes remain alive too.

This is not the same as restoring after the server exits.

Herdr restores the workspace shape after a full server restart, but arbitrary shells, servers, and tests restart as new shells. Supported coding agents can resume their own conversations when an official integration reported their session IDs.

Zellij has built-in session resurrection. It serializes the layout and commands, and can optionally save pane viewports and scrollback. Resurrected commands wait for confirmation by default before running again.

tmux is strongest when the tmux server never stops. It does not turn arbitrary processes into a checkpoint that survives a server exit.

tmux is the durable Unix default

tmux has been around for a long time and is installed on an enormous number of servers.

Its model is small and consistent:

It is extremely scriptable. The command language, formats, hooks, options, and control mode can support very advanced workflows.

The tradeoff is that tmux starts fairly plain.

Many people build a personal configuration for mouse support, pane navigation, status bars, session management, and plugins. This is a strength if you want full control and friction if you want polished defaults immediately.

I would choose tmux when:

tmux can run ten coding agents. It simply does not know which one is waiting for approval.

Zellij is the friendly terminal workspace

Zellij focuses on a good experience without requiring a large configuration first.

The default interface shows available key actions. It has floating and stacked panes, a session manager, reusable layouts, and built-in plugins.

Layouts are written in KDL:

layout {
  pane
  pane split_direction="vertical" {
    pane
    pane command="npm" {
      args "run" "dev"
    }
  }
}

Start it with:

zellij --layout project.kdl

Zellij’s plugins are WebAssembly/WASI programs. They can render interfaces, react to application state, and control the workspace. Zellij itself uses plugins for parts of its UI.

I would choose Zellij when:

Zellij can also host many agents. Like tmux, it treats them as terminal programs rather than semantic agent processes.

Herdr is built around agents

Herdr inherits the persistent-terminal model from multiplexers.

The background server owns real pseudo-terminals. The TUI is a client. I can detach every client and the panes keep running.

Then Herdr adds an agent layer.

It can detect supported coding agents and show whether they are working, blocked, done, idle, or unknown. Official integrations can report native agent session IDs for restore.

The CLI can target an agent by name:

herdr agent prompt reviewer \
  "Review the current diff" \
  --wait

It can wait for an approval:

herdr agent wait reviewer \
  --until blocked \
  --timeout 120000

It can read recent output:

herdr agent read reviewer \
  --source recent-unwrapped \
  --lines 120

The command waits for the agent state instead of sending keystrokes and sleeping for ten seconds.

Herdr also lets an agent control the workspace through the Herdr skill.

I would choose Herdr when:

Herdr is much newer than tmux and Zellij. Its plugin marketplace is young, native Windows support has platform-specific caveats, and some advanced surfaces are still evolving.

Layouts and automation

The three tools solve repeatable setup differently.

With tmux, I usually write a shell script or use a session tool that calls tmux commands.

With Zellij, I describe tabs and panes in a KDL layout.

With Herdr, I can use the CLI directly, let an agent create the layout, or package the workflow as a plugin.

For example:

herdr workspace create \
  --cwd ~/project \
  --label project \
  --no-focus

Then a script or agent can capture the returned IDs, create tabs and panes, run commands, and wait for results.

Herdr plugins are normal executable workflows with a herdr-plugin.toml manifest. Read my practical guide to Herdr plugins for the complete flow.

Remote work

All three work well after a normal SSH login:

ssh you@server
herdr

Replace herdr with tmux or zellij for the other tools.

Herdr also has a thin-client remote mode:

herdr --remote workbox

The local client connects over SSH to a Herdr server on the remote host. This keeps local keybindings and can bridge local clipboard images to the remote session.

The simple SSH-first path is still the most universal.

If SSH is new to you, my free SSH course explains keys, host configuration, and remote commands.

Can I nest them?

Yes, but I avoid it unless there is a clear reason.

Nested prefix keys, mouse handling, colors, and resize events can become confusing.

One useful case is connecting to a server that already uses tmux while you use Herdr locally. Decide which layer owns persistence and which layer owns the interface.

If Herdr needs to detect an agent, do not put another multiplexer between the Herdr pane and that agent. Herdr may only see tmux or Zellij as the foreground process.

Which one would I pick?

For a small server utility, I would still be happy with tmux.

Zellij is excellent when I want polished defaults and reusable layouts. For my current workflow, where several coding agents run at the same time, I would use Herdr.

With Herdr I can address an agent by name, wait for its actual lifecycle state, and let agents build and control the same terminal workspace I use.

You can read the primary guides in the tmux getting started documentation, the Zellij user guide, and the Herdr documentation.

Tagged: AI · All topics

Want me to talk about your product? You can sponsor this site.

~~~

Related posts about ai: