Configure Herdr
Agent delegation
Install the Herdr skill so agents can control panes, start other agents, and hand work to each other.
Herdr ships a skill file that teaches an agent its CLI. With it, an agent can split a pane, start a second agent in it, send a prompt, wait, and read the output. The two agents do not need to be the same harness. Any supported agent can drive any other.
Without Herdr, the same thing takes a custom MCP server or glue scripts per harness. Here it is one skill and one CLI.
Install the skill
The skills CLI installs it for every harness that supports skills, on macOS, Linux, and Windows.
npx skills add herdrdev/herdr --skill herdr -g
ls ~/.claude/skills/herdr ~/.codex/skills/herdr
# SKILL.mdWithout the skills CLI, print the file and add it to your agent's global instructions.
herdr --skill > ~/herdr-skill.mdHow it works
Herdr runs a server in the background. The herdr command talks to that server over a local socket, and every command returns JSON. The UI you see is one client. An agent that runs herdr from inside a pane is another.
Every pane Herdr opens gets HERDR_ENV=1 and its own IDs in the environment. The skill checks that first, so an agent outside Herdr never tries to control it.
printf '%s\n' "$HERDR_WORKSPACE_ID" "$HERDR_TAB_ID" "$HERDR_PANE_ID"
# w1
# w1:t1
# w1:p1The CLI has two layers. Pane commands control raw terminals, so an agent can run tests or a server in a pane and read the output. Agent commands control a recognized coding agent in a pane, with its state (idle, working, blocked, done) as the thing to wait on.
# Split next to the caller, keep focus where it is
herdr pane split --current --direction right --cwd "$PWD" --no-focus
# Start a named agent in the new pane
herdr agent start coder --kind codex --pane w1:p2
# Send work and wait for idle, done, or blocked
herdr agent prompt coder "Implement the plan in docs/plan.md" --wait --timeout 600000
# Read what it wrote
herdr agent read coder --source recent-unwrapped --lines 120--kind accepts claude, codex, grok, cursor, opencode, copilot, and more. Run herdr agent start --help for the list, and herdr --help for every command group.
What you can do with it
- Delegate. One agent plans, a second one implements, and the first one reviews the diff.
- Run things on the side. An agent starts the dev server or the test suite in a split and reads the output from its own pane.
- Get a second opinion. An agent starts a reviewer from a different harness and waits for its report.
- Handle questions. When the second agent blocks on a question, the first one reads the screen and answers it, or asks you.
The skill only activates when you mention Herdr. A prompt looks like this.
Use Herdr to start a codex agent named coder in a split next to you.
Give it the plan in docs/plan.md and wait until it is done.
Then review the diff and report what needs to change.The first agent splits the pane, starts the second, and the sidebar shows both. When the second one asks a question, it turns blocked and moves to the top of the sidebar.
Safety rules in the skill
The skill tells agents to use --no-focus for background work, to never close panes they did not create, and to never stop the server. Read it with herdr --skill.
Check
Ask an agent in a Herdr pane to run herdr agent list and report the result. It should answer with JSON that lists itself.