Herdr vs cmux: terminal persistence and the Mac browser workflow
By Flavio
Updated
Tagged: AI
Compare Herdr and cmux for coding agents: persistence, agent state, macOS UX, browser automation, SSH, and multi-agent workflows.
After I published my Herdr guide, someone asked me how it compares to cmux and which one to pick. Both tools help you supervise coding agents, so there’s a lot of overlap, and the choice comes down to whether you want a native Mac app with a browser beside your code or a multiplexer that owns your terminal processes on the machine doing the work.
If you’re only comparing tools that run inside your existing terminal, see Herdr vs tmux vs Zellij instead. Here I’m looking at the desktop workflow, including browser automation and remote sessions.
cmux is a native macOS terminal app built on libghostty, with vertical workspaces, notification rings, split panes, a scriptable browser, and a local automation API. Herdr is a terminal-native multiplexer that runs inside the terminal you already use, keeps its panes alive in a background server, detects coding agents, and exposes their lifecycle state through a CLI and socket API.
They solve a similar daily problem, yet they behave quite differently once you look at who owns the terminal, what survives a disconnect, and how much an automation script can know about an agent.
The main difference
cmux is a Mac terminal built around supervising coding agents, whereas Herdr is an agent-aware terminal multiplexer that runs right on the machine doing the work.
What both tools do
Both tools give you real terminal processes instead of rebuilding an agent conversation as chat messages, so you can keep several repositories open, run agents beside dev servers and tests, and stop polling terminal tabs by hand.
Both give you:
- workspaces, tabs, and split panes
- support for Codex, Claude Code, OpenCode, and other terminal agents
- notifications when background work needs attention
- a CLI and local socket API
- session restoration for supported coding agents
- SSH workflows
- ways for an agent or script to control other terminals
Where they diverge is how they’re built and how much structured state they expose to automation.
Side-by-side comparison
| Dimension | Herdr | cmux |
|---|---|---|
| Primary interface | Terminal UI inside an existing terminal | Native Swift and AppKit macOS app |
| Rendering | Uses your current terminal emulator | Uses libghostty directly |
| Local persistence | Background server owns live PTYs | Restores app state and supported agent sessions after relaunch |
| Agent attention | Semantic working, blocked, done, idle, and unknown states | Notification rings, unread state, agent hooks, and sidebar status |
| Automation | Agent-aware and pane-aware commands with lifecycle waits | Workspace and surface control, notifications, metadata, and browser automation |
| Multi-agent support | Starts and controls named agents from different supported CLIs | Turns supported Claude Code Teams and oh-my-opencode subagents into native panes |
| Browser | No built-in browser | Scriptable browser panes with DOM, console, network, and screenshot access |
| Remote model | Runs its server and terminal UI on macOS, Linux, or Windows, with saved SSH machines in one window | Mac app opens managed SSH workspaces through a remote relay |
| Mobile | Works in a normal terminal on a small screen | iPhone and iPad companion in beta |
Native Mac application or terminal multiplexer
Switching to cmux means moving to a native Swift and AppKit macOS app. Because it renders terminals directly through libghostty and controls the whole window, it can sit a real browser next to your terminal panes, trigger native macOS notifications, and use familiar Mac shortcuts.
Herdr leaves your terminal emulator alone. You run it inside Ghostty, iTerm2, Terminal, Kitty, WezTerm, or whatever terminal you open over SSH. You trade away tight Mac desktop integration and get portability back: the same workspace model and keyboard controls follow the process across macOS, Linux, and Windows instead of staying tied to one laptop.
If you’re running Herdr 0.9 inside an outer terminal that supports the Kitty graphics protocol, Herdr also shows images from tools that use it, enabled by default.
If you want a solid handle on the processes, pipes, jobs, and terminal environment behind either tool, my free Shell Commands course covers all of that.
Persistence is the biggest difference
Under the hood, Herdr runs a background server that owns your pseudo-terminals. Detach from Herdr, close the terminal window, and reconnect later: your shell, dev server, test watcher, and coding agent are still running right where you left them.
Stopping the Herdr server itself is a different case. A cold restart restores your workspace layout and can resume supported agent conversations, though arbitrary commands have to start again. Starting with Herdr 0.9, an agent can also report its own resume command so Herdr can reopen that session after a restart even without an official integration.
cmux saves your windows, workspaces, pane layout, working directories, scrollback, and browser history, and its session restore can run the native resume command for supported agents too. It doesn’t checkpoint arbitrary local processes when you quit the app, so a dev server or test watcher comes back as a normal terminal unless another persistent tool owns it.
That isn’t a problem if you leave cmux open all day, or if you run persistent remote processes inside tmux. The difference is that Herdr builds live detach and reattach directly into its own runtime model.
Attention versus agent lifecycle state
When you’re watching several agents at once, cmux focuses on pulling your eyes to the right pane quickly. Agent hooks, standard terminal notification sequences, and cmux notify can light up a pane, mark a workspace unread, pop up a desktop notification, and let you jump straight to the latest event. Scripts can also add status pills, progress bars, and logs to the sidebar through the cmux CLI and socket API.
Herdr models the agent lifecycle directly instead of stopping at unread alerts. It tracks whether an agent is working, blocked, done in the background, idle after you’ve viewed it, or present in an unknown state, and those states roll up from the pane to the tab and workspace.
That pays off as soon as you script around your agents. You can tell Herdr to wait until a named agent becomes blocked or done, read that exact agent’s terminal output, and send the next prompt to the same process. The Herdr agent automation API exposes those lifecycle states alongside terminal input and notifications, which makes coordinating one agent from another much easier.
Multi-agent workflows
For supported team systems, cmux makes hidden background participants visible and controllable. Claude Code teammates and oh-my-opencode subagents show up as native splits, so while the parent workflow still comes from the agent system, you can watch and steer every participant right in the window.
Herdr takes a more open-ended route and leaves the team structure to your scripts or your coordinator agent. You create panes, start named agents from supported CLIs, give each one a bounded task, wait on its lifecycle state, and read the result. Codex can coordinate Claude Code, or one Codex agent can spin up another Codex reviewer.
Those agents talk through Herdr’s local socket API. Herdr hands the socket path to managed pane processes, and the CLI wraps the same control surface, so a coordinator can address another agent by name, prompt it, wait for it, and read its response without relying on whichever terminal has focus.
Keep in mind that workspaces and panes only organize processes, so neither tool prevents two agents from editing the same file at once. You still need Git isolation for safe boundaries, and my free Git course covers the branches, diffs, commits, and working-tree model behind that.
cmux includes a scriptable browser
If you build for the web, cmux’s built-in browser pane is a major draw. You can place a browser right beside your terminal, and an agent can navigate, inspect the DOM, click, type, run JavaScript, capture screenshots, and read console or network activity through the same socket API. An agent can change your app, open the local dev server, and verify the result without leaving cmux.
Herdr has no built-in browser. You run a browser automation tool as a separate process or let the coding agent use its own browser integration. When browser verification sits at the center of your workflow, cmux gives you a more complete desktop setup out of the box.
Remote work
With Herdr, the multiplexer lives on the remote machine itself. You can SSH into a Linux server, start Herdr there, detach, disconnect, and reconnect later, or use herdr --remote to attach a local Herdr client to the remote server.
Herdr 0.9 also adds saved machines. You register an SSH host once, and its workspaces appear in the same window alongside your local ones:
herdr machine add workbox
The agent list and notifications cover every connected machine. Because each machine keeps its own Herdr server, a dropped connection to one doesn’t knock out the others, and Herdr reconnects on its own. That remote host can run Linux, macOS, or Windows.
You can check whether a saved machine is reachable with herdr machine status, and scripts can target one with herdr --machine workbox agent list even without an open Herdr window. Since the processes belong to the remote Herdr server and the interface stays a terminal UI, you can reach it from another laptop or even a phone.
cmux handles remote work from your Mac instead. The cmux ssh workflow creates a managed remote workspace with a relay on the remote host that preserves sessions across connection drops, routes remote localhost traffic into browser panes, forwards notifications, and supports remote agent teams. If you want tmux to own persistence on the server, cmux can also attach to remote tmux sessions.
Both approaches work well, and you’re mainly deciding whether you want Herdr running as the remote multiplexer or a Mac app supervising a managed remote workspace. If host verification, keys, config, tunnels, automation, and recovery are new to you, my free SSH course covers that whole layer.
How I would choose
Go with cmux if:
- you work mostly on a Mac
- you want a polished native terminal app
- browser verification belongs right beside the agent
- notification rings and unread navigation solve your attention problem
- you use Claude Code Teams or oh-my-opencode
Pick Herdr if:
- the multiplexer needs to run on the machine doing the work
- arbitrary terminal processes have to survive a detach
- you want your local and remote machines in one window
- your scripts need semantic agent lifecycle states
- you want to coordinate different agent products through one interface
- you need the same workflow from a small terminal screen
If coding-agent workflows themselves are new to you, my AI fundamentals guide explains the agent loop, tools, permissions, context, and verification.
You can use both
You don’t even have to pick only one, because Herdr runs fine inside a normal cmux terminal pane.
Let cmux handle the native Mac interface, browser panes, notification center, and desktop shortcuts, while Herdr owns the persistent terminals and semantic agent state on your local or remote machine. That combination works well whenever you want cmux’s desktop feel without giving up Herdr’s server-owned sessions.
If neither fits your setup, I rounded up more options in Herdr alternatives.
Want me to talk about your product? You can sponsor this site.
Related posts about ai: