Skip to main content
Cover art for "Running Coding Agents in tmux, and When Harmony Is the Better Fit"
GUIDE

Running Coding Agents in tmux, and When Harmony Is the Better Fit

Harmony Team

· 6 MIN READ

If you run more than one coding agent, there is a good chance you already use tmux for it: one pane per agent, a session that outlives the terminal window, and a server you can reattach to from anywhere. It is a sound setup. This guide shows how to do it well, then says plainly where tmux is the better tool and where Harmony is.

A tmux layout for two agents

Start a named session, split it, and start one agent in each pane. Give each its own git worktree so they never edit the same files.

$ git worktree add ../myapp-claude -b claude/api
$ git worktree add ../myapp-codex -b codex/ui
$ tmux new-session -d -s agents -c "$PWD/../myapp-claude"
$ tmux split-window -h -t agents -c "$PWD/../myapp-codex"
$ tmux send-keys -t agents:0.0 'claude' Enter
$ tmux send-keys -t agents:0.1 'codex' Enter
$ tmux attach -t agents

Detach with Ctrl-b d and the agents keep working. Reattach later, from the same machine or over SSH, with tmux attach -t agents.

Passing work between panes

tmux can read one pane and type into another, which is enough for a crude hand-off:

$ tmux capture-pane -p -t agents:0.0 -S -40 > /tmp/claude-said.txt
$ tmux send-keys -t agents:0.1 'Read /tmp/claude-said.txt and review the API it describes.' Enter

It works, but you are the scheduler. Nothing knows that the message landed, whether the other agent started on it, or that the first agent is now waiting on your approval in a pane you are not looking at.

Where tmux is the better tool

  • On a remote server over SSH. tmux is already there or one package away, and Harmony is a desktop app.
  • When you want nothing between you and the terminal. tmux adds panes and sessions and gets out of the way.
  • When everything is a script. send-keys and capture-pane are easy to drive from a shell script, and many people already have one.
  • When you live in the keyboard. A tmux setup tuned over years is hard to beat for speed.

On Windows, tmux needs WSL or another Unix-like environment, which matters if your agents and your repository live on the Windows side.

What Harmony adds

Harmony keeps the part of this that works: real terminals, one per agent, that keep running when you close the window. It is a free desktop app for Windows, macOS and Linux, and it adds the bookkeeping you otherwise do by hand.

  • A shared task board every agent can read and update, instead of a TASKS.md you keep honest yourself.
  • Messages between agents, across providers, that survive a restart, instead of send-keys into a pane and hoping.
  • Each tab shows which agent is in it and, when it can tell, whether it is waiting on you, so an approval prompt in a pane you are not watching is easier to catch.
  • The same operations from MCP and a command-line client, so agents and scripts can drive the workspace the way you do.
  • Optional cloud hosting (Harmony Pro) when the work has to keep going after the laptop closes.

To be precise about how finished that is: the workspace, task board, messaging and worktrees ship today as preview features, status detection is still improving and can read as unknown when it has no evidence, and fully autonomous multi-agent runs are experimental. The features page labels every capability.

Choosing

If your agents run on a server you reach over SSH, keep tmux. If they run on your own machine and you spend your time relaying context between panes and checking which one is waiting on you, try Harmony: it is free, needs no account, and the agents you already use run in it unchanged. The two are not exclusive, and the side-by-side guide works with either.

What's next

Close the window. Come back to the work.

Quit the UI and local agent sessions keep running in the background. If the laptop sleeps, they pause with the machine; on wake, Harmony rechecks them and reattaches the same tabs and terminal history.

Download Harmony

Free · Runs locally · No account needed