How do you supervise coding agents without watching every window?
The symptom
If you refreshed an agent's window twice in the last ten minutes to see whether it finished, your workflow is cracking. That was me: Claude in one terminal, opencode in another, and my attention split between shipping code and checking panes.
Use case
I wanted two agents in one workspace, and I wanted to close my laptop mid-run without losing anything on reopen.
Preconditions
- herdr installed (0.9.3 at the time of writing)
- a supported agent: claude, codex, gemini, opencode, copilot, kimi, amp, grok, others
- a pane sitting at its shell prompt
Steps
1. Keep one persistent session
herdr --session workEverything inside survives a closed lid, a reboot, or a dropped SSH line. Later, herdr session attach work puts the same tabs and panes back on screen. One named session per project keeps contexts separate.
2. Drive agents with the loop
herdr agent list # who runs where, and in what state
herdr tab create # new tab, note the pane id
herdr agent start api --kind claude --pane 3
herdr agent prompt api "Add tests for the auth module" --wait
herdr agent read api
herdr agent wait api --until blockedAgents move between idle, working, blocked, and done. wait --until blocked parks the terminal until the agent needs a decision, so polling turns into waiting. I run two agents on separate tasks and attach to whichever goes blocked first.
3. Script the setup
#!/usr/bin/env bash
# rebuild the workspace in one command
herdr tab create > /dev/null
pane=$(herdr tab create)
herdr agent start api --kind claude --pane "$pane"
herdr agent prompt api "Check git status and pick up where we left off." --wait
herdr tab focus 1After a reboot this restores my whole workspace in seconds. The same CLI reaches the herdr server on my desktop rig through one attach from my laptop (herdr --remote). That is my daily setup.
Validation
Three checks tell you it works. herdr agent list reports each agent's state. wait returns the moment an agent hits the state you asked for. After a reboot, session attach restores every tab and pane.
Failure modes
- agent start needs a pane at a clean shell prompt; a pane mid-command fails readiness detection (30s default timeout)
- wait only sees states herdr detects; herdr agent explain shows why an agent reads as unknown
- prompt --wait blocks your terminal; drop the flag to fire and continue
What herdr does not solve
herdr reports state and herds terminals. It does not review code, pick tasks, or unblock an agent; those decisions stay mine. It also cannot resurrect a conversation the agent itself lost inside the pane.
Next action
Install herdr, run herdr agent list, and count how many agent windows you can close today.
Recommended for you
- WorkflowCodex CLI
How I keep Codex side chats and old tasks findable without losing work
Terminal Codex sessions scatter context across chats and tasks, making it hard to resume past work or hold several investigations at once.
- WorkflowCodex CLI
How I kept provider and pane control in Codex without losing flow
Replayed Codex conversations dropped reasoning summaries and steering messages could vanish mid-turn, making long sessions hard to trust.
- WorkflowCodex CLI
When to use incremental tool updates instead of legacy streaming?
Codex tool updates on Google Cloud Vertex AI previously arrived in batches rather than as they happen; incremental sending is now the default, with a flag to opt out.
- WorkflowVercel
When to use AI Gateway instead of direct image model APIs?
A separate MiniMax account, key, and bill just to generate product images slows you down until one gateway API key covers it.
Enjoyed this article?
Subscribe for new articles. No spam. Unsubscribe anytime.