Back to blog

How I stopped watching my coding agents and started supervising them

Thắng Đoàn
Thắng Đoàn

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 work

Everything 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 blocked

Agents 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 1

After 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.

Share:

Recommended for you

Enjoyed this article?

Subscribe for new articles. No spam. Unsubscribe anytime.

By subscribing you agree to receive the newsletter. No spam, and you can unsubscribe anytime.