Tips & TricksIntermediate8 min read

Herdr vs tmux: Which One to Use for Running Coding Agents

Herdr and tmux both split your terminal and keep it running after you close it. The difference is that Herdr tells your coding agents apart by state (working, blocked, done) and lists them. Compare how they work, their keys, what survives a restart, and when to pick each, with the same task played back in both.

Herdr and tmux are both tools that split your terminal and keep it running after you close it. The difference is that Herdr tells coding agents (Claude Code, Codex and others) apart by state and shows in a list whether each one is working, waiting for your approval, or done.

This article plays back the same task (two Claude Code sessions side by side) in both Herdr and tmux, compares how they work, their keys and what survives a restart, and ends with when to pick each. Herdr facts come from the 0.9.5 official docs and release notes, and tmux behavior was checked with tmux 3.7c.

The short answer

  • Pick Herdr if you mostly run several coding agents side by side. The color of each entry in its list tells you which pane is waiting for approval
  • Pick tmux if you work on servers a lot or combine it with other tools. It is one package away almost everywhere and works for anything, not just agents
  • Both use ctrl+b as the prefix, so learning one makes the other easier

What they share

Herdr and tmux both split into a server and clients that attach to it (the screen you are looking at). The server owns the processes in your panes, so closing the screen or losing your SSH connection does not stop the work.

tmuxHerdr
Split the screenPanesPanes
Keep running after closingDetach (ctrl+b d)Detach (ctrl+b q)
Come backtmux attachherdr
Prefixctrl+bctrl+b
Where it runsInside the terminal you already useInside the terminal you already use

The same task in both

Run two Claude Code sessions for different projects in left and right panes. First, tmux.

tmux: two Claude Code sessions in left and right panes (a recreation of tmux running in your browser)

Now the same thing in Herdr. Apart from ctrl+b v for the split, the steps are the same.

spaces
·shop-api
main
agentsgrouped
1
+
user@webterm:~/projects/shop-api$
Herdr: in the list on the left, the Claude Code session waiting for approval turns red (a recreation of Herdr running in your browser)

The difference is the list on the left. Herdr tells the agent in each pane apart by state and marks it with one of four states.

  • working: busy
  • blocked: waiting for an approval or an answer
  • done: finished, and you have not looked yet
  • idle: finished and seen (or waiting for input)

tmux shows you what is in each pane and nothing more. With two panes you can tell by looking, but with five or six spread across windows, you end up hunting for the one that stopped. tmux can still flag a window: have Claude Code ring the terminal bell, and tmux marks that window with ! (see "Notice approval prompts" in Claude Code with tmux).

How they differ

tmuxHerdr
Built forTerminal work of any kindRunning coding agents
NestingSession > window > paneWorkspace > tab > pane
Agent stateNot trackedworking, blocked, done and idle shown in a list
After a restartNothing is kept (plugins such as tmux-resurrect can save it)Layout and working directories come back, and supported agents resume their conversations
MouseOff by default (set -g mouse on)Click and drag to split and move from the start
Other machinesStart tmux on the SSH hostSaved SSH machines appear in the same list as local work
ScriptingType with tmux send-keys, read with tmux capture-paneType with herdr pane run, read with herdr pane read, and herdr agent wait waits until an agent is waiting
WindowsDoes not run directly (use it inside WSL)Runs natively (some features differ from Linux and macOS)
License and historyISC, developed since 2007Apache 2.0, pre-1.0 with frequent releases

How the nesting maps

A Herdr workspace is close to a tmux session. Make one per project, and the list on the left becomes your list of projects. A Herdr tab is a tmux window, handy for separating what you watch, such as agents, logs and server.

What a restart does

If you only detach, processes keep running in both. The difference shows when the server or the computer restarts.

  • tmux: When the server stops, no sessions or panes remain. To keep the layout, install plugins such as tmux-resurrect or tmux-continuum
  • Herdr: The original processes stop, but Herdr saves and restores the layout of workspaces, tabs and panes, with their working directories. Supported agents such as Claude Code, Codex and Cursor Agent resume their conversations. Anything else comes back as a shell opened in the saved directory

Letting agents drive it

Herdr expects agents to drive Herdr themselves. For example, a script can wait until the agent in another pane is waiting for input before moving on.

herdr pane split w1:p1 --direction right   # create a pane on the right
herdr pane run w1:p2 "npm test"            # type into that pane
herdr agent wait w1:p1 --until blocked     # wait until the left agent is waiting

tmux can type and read the same way with send-keys and capture-pane, but deciding whether an agent is waiting is up to you, from the text on its screen.

Key map

Press the ctrl+b prefix, then the next key.

ActiontmuxHerdr
Split rightctrl+b %ctrl+b v
Split downctrl+b "ctrl+b -
Move between panesctrl+b + arrowctrl+b h/j/k/l
Zoom a pane in and outctrl+b zctrl+b z
Close a panectrl+b xctrl+b x
New window (tab)ctrl+b cctrl+b c
New workspace(tmux new -s name)ctrl+b shift+n
Pick from a listctrl+b s, ctrl+b wctrl+b g
Scroll and copyctrl+b [ctrl+b [
Detachctrl+b dctrl+b q
List keysctrl+b ?ctrl+b ?
Stop everythingtmux kill-serverherdr server stop

Which one to pick

Herdr fits when you

  • Run three or more Claude Code or Codex sessions, each on its own task
  • Want to know which agent is waiting for approval without hunting for it
  • Want the layout and agent conversations back after a restart
  • Want to run it natively on Windows

tmux fits when you

  • Often work on servers and want the same tool everywhere
  • Use it for more than agents (watching logs, dev servers, builds)
  • Combine it with tools that expect tmux (such as Claude Code's agent teams showing each teammate in its own pane)
  • Prefer a tool with a long track record

You do not have to pick only one. You can line up agents in Herdr on your machine and use tmux on the servers you SSH into.

FAQ

Can Herdr replace tmux?

Herdr does tmux's core jobs: splitting the terminal and keeping it running after you detach. Its prefix is the same ctrl+b. tmux still wins on being preinstalled or one package away on servers, and on tools that expect tmux. For example, Claude Code's agent teams show each teammate in its own split pane only inside tmux or iTerm2.

Does Herdr use the same keys as tmux?

The prefix is the same ctrl+b, and so are c for a new tab (a window in tmux), z for zoom, [ for copy mode and ? for the key list. Splitting differs (Herdr uses v for right and - for down, tmux uses % and "), as do moving between panes (h/j/k/l in Herdr) and detaching (q in Herdr, d in tmux).

Do agents keep running after I close Herdr?

Yes. Whether you detach with ctrl+b q or close the terminal, pane processes keep running inside the Herdr server. Type herdr again to come back. To stop everything, run herdr server stop.

What happens to Herdr and tmux when I restart my computer?

In both, the pane processes stop. tmux keeps nothing, not even the session layout, unless you install a plugin such as tmux-resurrect. Herdr saves and restores the layout of workspaces, tabs and panes with their working directories, and supported agents such as Claude Code and Codex resume their conversations.

Does Herdr work on Windows?

Yes. Herdr 0.9.5's official docs say native Windows support is generally available, with some features that differ from Linux and macOS. tmux does not run on Windows directly, so you use it inside WSL.

Practice both in your browser

On WebTerm Learn, you can practice the Herdr Introduction and tmux Introduction courses in your browser, with nothing to install. Both move like a game, one step at a time: split panes, move between them, detach and come back. The Herdr course also has you notice an agent waiting for approval and answer it.

Related Courses

Ready to practice? Try these interactive courses.

Related Articles

← Back to Articles