herdr: Terminal Agent Multiplexer for Coding Agents — 12K+ Stars
herdr is a Rust-based terminal multiplexer for AI coding agents. Run Claude Code, Codex, Cline, and OpenCode in parallel — each with its own real terminal, workspace tabs, and state tracking. tmux rebuilt for agents.
- NOASSERTION
- Updated 2026-07-07
{{< resource-info >}}
AI coding agents are multiplying fast — Claude Code, Codex CLI, Cline, OpenCode, Aider, Devin — and managing them simultaneously is a nightmare. Each agent wants its own terminal, its own workspace, its own process tree. Switching between them means alt-tabbing through a mess of terminal windows, losing track of which agent is working, which is blocked, and which crashed.
herdr solves this by being a terminal multiplexer purpose-built for AI agents. Think tmux, but instead of managing shells, it manages agents. Each agent gets its own real terminal (not an app’s imitation), you can see their states at a glance, organize them into workspaces and tabs, and reattach from anywhere — even your phone over SSH.

What Is herdr? #
herdr (pronounced “heer-der”) is a Rust-based terminal multiplexer for AI coding agents. Created by Ogul Cancelik, it gives you a single terminal interface to run, monitor, and manage multiple coding agents simultaneously.
The core philosophy: agents should run in real terminals, not sandboxed emulations. When an agent launches a full-screen TUI (like htop or lazygit), it needs a real PTY. herdr provides this by wrapping each agent in a tmux session internally, but presenting a clean agent-centric interface on top.
Key Capabilities #
- Real terminal per agent — Each agent runs in its own PTY with full TUI support
- Agent state tracking — Sidebar shows each agent as blocked (red), working (yellow), done (blue), or idle (green)
- Workspaces and tabs — Organize agents by project folder or repository
- Persistent sessions — Close your laptop, detach from SSH, and agents keep running; reattach from any terminal
- Zero telemetry — Single binary, no account, no cloud dependency, no data collection
- Mouse-native UI — Click, drag, and split panes without touching the keyboard
Architecture #
herdr is built on a simple but powerful architecture:
┌─────────────────────────────────────┐
│ herdr CLI (Rust) │
│ ┌──────────┬──────────┬─────────┐ │
│ │ Workspace│ Workspace│ Workspace│ │
│ │ Tab 1 │ Tab 2 │ Tab 3 │ │
│ │ │ │ │ │
│ │ ┌────┐ │ ┌────┐ │ ┌────┐ │ │
│ │ │AGT1│ │ │AGT2│ │ │AGT3│ │ │
│ │ └────┘ │ └────┘ │ └────┘ │ │
│ └──────────┴──────────┴─────────┘ │
└─────────────────────────────────────┘
│ │ │
┌────▼────┐ ┌────▼────┐ ┌────▼────┐
│ tmux #1 │ │ tmux #2 │ │ tmux #3 │
│ (PTY) │ │ (PTY) │ │ (PTY) │
└─────────┘ └─────────┘ └─────────┘
The Agent Server #
herdr runs a background server process (herdr-server) that persists across terminal sessions. This server:
- Manages all tmux sessions for agents
- Tracks agent state (blocked/working/done/idle)
- Handles reattachment from new terminals
- Maintains workspace and tab organization
When you close your laptop or lose your SSH connection, the server keeps running. When you reconnect, herdr attach restores your entire workspace exactly as you left it.
State Detection #
herdr detects agent states by monitoring terminal output patterns:
- Blocked (red) — Agent is waiting for user input, file edits, or approval
- Working (yellow) — Agent is actively running commands, writing code, or reasoning
- Done (blue) — Agent completed its task and exited
- Idle (green) — Agent is running but not actively processing
This is heuristic-based (no hooks required) and works with any agent that produces terminal output — Claude Code, Codex CLI, Cline, OpenCode, Aider, and more.
Installation #
Cargo Install #
cargo install herdr
Requires Rust 1.70+. This is the recommended method for full feature support.
Pre-built Binary #
# Linux (x86_64)
curl -L https://github.com/ogulcancelik/herdr/releases/latest/download/herdr-x86_64-linux.tar.gz | tar xz
sudo mv herdr /usr/local/bin/
# macOS (Apple Silicon)
curl -L https://github.com/ogulcancelik/herdr/releases/latest/download/herdr-aarch64-darwin.tar.gz | tar xz
sudo mv herdr /usr/local/bin/
Docker #
docker run -it --rm \
-v ~/.herdr:/root/.herdr \
-v /var/run/docker.sock:/var/run/docker.sock \
ghcr.io/ogulcancelik/herdr:latest
Prerequisites #
- tmux 3.2+ (herdr uses tmux under the hood for PTY management)
- Rust 1.70+ (for cargo install)
- SSH (optional, for remote reattachment)
Usage #
Starting an Agent #
# Start Claude Code in a new agent pane
herdr run claude-code
# Start Codex CLI with a specific task
herdr run codex "Refactor the auth module to use JWT"
# Start multiple agents in parallel
herdr run claude-code &
herdr run codex &
herdr wait
Managing Workspaces #
# Create a new workspace for a project
herdr workspace create my-project --dir ./my-project
# Add agents to a workspace
herdr workspace use my-project
herdr run claude-code --workspace my-project
# Switch between workspaces
herdr workspace list
herdr workspace use another-project
Monitoring Agent States #
# View all agents and their states
herdr status
# Watch agent states in real-time
herdr watch
# Get notifications when agents finish
herdr notify --on-done "echo Agent $AGENT finished"
Attaching and Detaching #
# Attach to the herdr server (shows all agents)
herdr attach
# Detach (Ctrl+B, D — same as tmux)
# Agents keep running
# Reattach from a different terminal or SSH session
ssh user@server
herdr attach
# Reattach from your phone
ssh user@server -p 22
herdr attach
Splitting and Layout #
# Split horizontally
herdr split-h
# Split vertically
herdr split-v
# Cycle through layouts
herdr layout next
# Resize panes
herdr resize --up 5
Supported Agents #
herdr works with any CLI-based coding agent. Officially tested with:
| Agent | Status | Notes |
|---|---|---|
| Claude Code | Fully supported | Real-time state detection |
| Codex CLI | Fully supported | OpenAI’s coding agent |
| Cline (VS Code) | Supported | Via CLI mode |
| OpenCode | Fully supported | State detection works |
| Aider | Fully supported | Git-aware agents |
| Devin CLI | Supported | Autonomous agent mode |
| Any tmux-compatible CLI | Works | Generic agent mode |
Custom Agent Configuration #
You can define custom agents with specific state-detection patterns:
# ~/.herdr/agents.yaml
agents:
my-custom-agent:
command: "my-agent --task $TASK"
state_patterns:
blocked: /waiting for input|please edit/
working: /running|executing|analyzing/
done: /complete|finished|done/
workspace_default: "custom"
Comparison with Alternatives #
herdr vs tmux #
| Feature | herdr | tmux |
|---|---|---|
| Agent state tracking | Automatic (color-coded) | Manual (window names) |
| Workspace organization | Built-in (by project) | Manual (sessions) |
| Mouse support | Native (click, drag) | Configurable |
| Agent-specific commands | herdr run, herdr watch | tmux new-window, etc. |
| Learning curve | Low (agent-first) | Moderate (terminal-first) |
| Reattachment | Seamless (server-based) | Session-based |
tmux is the more general-purpose tool. herdr is tmux for agents — it wraps tmux’s session management in an agent-centric UI. If you only manage terminals (no agents), tmux is sufficient. If you manage multiple coding agents simultaneously, herdr saves significant cognitive overhead.
herdr vs tmuxinator #
| Feature | herdr | tmuxinator |
|---|---|---|
| Agent state tracking | Real-time color codes | None |
| Persistence | Server process | Session-based |
| Remote reattach | SSH from anywhere | Local only |
| Multi-agent workflows | Built-in | Manual |
| Mouse UI | Native | Limited |
tmuxinator is a session manager for tmux — it opens predefined windows and panes. herdr goes further by tracking what’s running inside each pane and surfacing agent states visually.
herdr vs Screen #
| Feature | herdr | GNU Screen |
|---|---|---|
| Agent awareness | Yes | No |
| Modern UI | Rust/TUI | Legacy |
| Mouse support | Native | Limited |
| Community | Growing | Mature |
| Package availability | Pre-built binaries | System packages |
Screen is the granddaddy of terminal multiplexers. herdr is what you get when you redesign it for the AI agent era.
Performance #
herdr is written in Rust and is remarkably lightweight:
- Binary size: ~15 MB (single static binary)
- Memory usage: ~2 MB idle, ~5 MB per agent session
- Startup time: < 50ms
- CPU usage: Near zero when idle, scales with agent activity
The tmux server runs as a background daemon with minimal overhead. All state detection happens locally via terminal output analysis — no network calls, no cloud dependency.
Limitations #
No GUI #
herdr is terminal-only. There is no desktop app, no browser UI, no mobile app (though you can SSH into a server and use herdr from your phone’s terminal). If you prefer a visual dashboard, herdr’s TUI may feel austere.
Heuristic State Detection #
Agent state detection relies on terminal output patterns, not API hooks. This means:
- It works with any agent (no integration required)
- But it may occasionally misclassify states (e.g., an agent printing “working…” while actually blocked)
- Custom patterns can be configured for edge cases
Agent Compatibility #
While herdr works with any CLI agent, some agents have quirks:
- Agents that clear the terminal screen may lose state context
- Agents that use non-standard escape codes may not be detected correctly
- Full-screen TUI agents (like
vimorhtop) work perfectly — this is actually herdr’s strength
No Built-in Billing #
herdr does not track API costs or token usage. If you are managing agents across paid APIs, you will need separate tools for cost tracking.
Editor’s Take #
herdr fills a gap that has grown wider as AI coding agents multiplied. Before agents, tmux was enough — you managed terminals, not intelligent processes. But when each “terminal” is an autonomous agent that thinks, writes code, and sometimes gets stuck waiting for you, you need more than window management. You need agent awareness.
herdr’s genius is its simplicity. It does not try to be an IDE, a project manager, or a CI/CD pipeline. It is a terminal multiplexer that understands agents — their states, their workspaces, their need to persist across disconnects. The fact that it is written in Rust and costs nothing to run makes it a no-brainer for anyone juggling multiple coding agents.
The color-coded state sidebar alone saves minutes per day. No more alt-tabbing through 8 terminal windows wondering which agent is done and which is stuck. herdr tells you: red = blocked (you need to act), yellow = working (leave it alone), blue = done (check the output), green = idle (it is thinking).
For teams running multiple agents across repositories, herdr’s workspace organization is invaluable. Create a workspace per project, add agents per folder, and switch between projects without losing context. The reattach-over-SSH feature means your agents keep running on a remote server even when your laptop sleeps.
The one thing herdr lacks compared to commercial alternatives is a visual dashboard. But for terminal users — and that is herdr’s audience — the TUI is faster, lighter, and more reliable than any web-based agent manager.
FAQ #
Q: Does herdr work with non-coding agents? #
A: Yes. Any CLI process that produces terminal output can be managed by herdr. While it is optimized for coding agents (Claude Code, Codex, Cline), you can use it to manage any long-running terminal processes — web servers, data pipelines, monitoring tools, etc.
Q: Can I use herdr on Windows? #
A: herdr requires tmux, which is primarily a Unix tool. On Windows, you can use WSL2 (Windows Subsystem for Linux) to run herdr. Native Windows support is planned but not yet available.
Q: How does herdr handle agent crashes? #
A: If an agent crashes, herdr marks it as blocked (red) and keeps the terminal session alive. You can inspect the crash output, fix the issue, and restart the agent in the same workspace without losing context.
Q: Is there a web-based dashboard for herdr? #
A: Not yet. herdr is terminal-first by design. The creators have mentioned a web dashboard is in the roadmap, but the current TUI is considered sufficient for the target audience.
Q: Can herdr manage agents on remote servers? #
A: Yes. Since herdr uses a server process, you can run herdr-server on a remote machine and attach from any terminal (including SSH from your phone). Agents continue running on the remote server regardless of your connection status.
Q: Does herdr support agent-to-agent communication? #
A: Not directly. herdr manages agents in parallel but does not facilitate communication between them. If agents need to share data, use shared filesystems, environment variables, or a message queue.
More from Dibi8 #
- OmniRoute: Free AI Gateway with 237 Providers
- Orca: Parallel Agent Orchestration by StableAI
- Chrome DevTools MCP: Browser Automation for Coding Agents
Sources #
Published: July 07, 2026 | Last updated: July 07, 2026 | Stars: 12,627 | License: NOASSERTION
💬 Discussion