Loading0%
Skip to content

Herdr tracks one agent per pane. I had nine hiding in mine.

Details

Published
Updated
Language
English
Reading
5 min

Running herdr with Neovim: how to hide, show or zoom a herdr pane, and how NvSinner reports nine AI agent columns from inside one pane.

HerdrNeovimAI agentsdeveloper tools

Before Herdr, running four or five CLI coding agents at once meant a pile of terminal panes with no order to them. Which one was still working, which one had been waiting on me for ten minutes, which one had quietly finished a while back, all of that lived in my head instead of on the screen, and keeping it there is exactly the kind of bookkeeping that falls apart under real work.

Herdr is a terminal multiplexer built for that specific problem. It wraps real terminal panes in workspaces and tabs, keeps them running on a background server so closing the client never kills the agent inside, and tracks each pane as idle, working, blocked, done or unknown, the one thing plain tmux has no concept of. The state comes from a lifecycle hook when the CLI reports one, or from matching the pane's live output against a screen manifest when it does not. Blocked detection is deliberately strict: it only fires when the screen matches a known approval or permission prompt, so a false blocked is rare and a miss just falls back to idle.

What a few weeks actually changed

Day to day the change is not dramatic. It is organization: the panes stop being an undifferentiated stack, and I can see which one wants a decision without tabbing through six terminals to find it. It is focus: I work the pane that needs me instead of hunting for it. And it adds up to getting to whatever I am building faster, for the boring reason that less of the day goes to figuring out where I left off.

An API, not a dashboard

I already write my own editor from a Lua core rather than configure someone else's, so the first thing I check in a new tool is not the feature list. It is how far past the feature list I can go before hitting a wall the product built on purpose. Herdr's answer is a documented extension surface, not a closed dashboard: a pane report-agent command and the socket calls under it, gated behind one environment variable so the whole thing is a no-op anywhere else.

"$HERDR_BIN_PATH" pane report-agent "$HERDR_PANE_ID" \
  --source custom:my-agent --agent my-agent --state working

That is open enough that I did not need Herdr's source to teach it about NvSinner, my Neovim distro for AI agents (source on GitHub). Why the AI there lives in terminal columns instead of a plugin is its own note; what matters here is that it runs up to nine CLI agents as live columns inside one Neovim process, and from outside, that whole editor is a single pane running an editor. Nine agents Herdr cannot see, count, or tell you are blocked.

Rolling nine columns into one pane

The integration talks to the same protocol (herdr 0.9.1, protocol 22, herdr api schema prints it) over the AF_UNIX socket Herdr injects into every pane it owns as $HERDR_SOCKET_PATH: newline delimited JSON, one connection per call.

  1. pane.report_agent says what state the pane is in
  2. pane.report_metadata attaches the per-column detail
  3. pane.release_agent hands the authority back

A source field is the whole security model. While mine is reporting, Herdr stops guessing from the screen, and only that same source can let go again.

Herdr keys one agent per pane, so nine columns have to become one answer. The rule is attention wins: any column waiting on me makes the pane blocked, otherwise any column working makes it working, otherwise idle. Which CLI is running in which column, and its own status, rides along separately as metadata tokens named j1 through j9. It is event driven rather than polled, an autocmd fires on a state change and a 200 millisecond timer coalesces a burst of them into one frame, and the one detail I would not have guessed going in: token values are silently truncated at 80 characters, so Neovim's own socket path, itself past 100, cannot travel as one. It rides instead in a small per-instance file, so a pane elsewhere can resolve which editor this is to which socket to talk to it on.

Hiding, showing and zooming a pane

Herdr itself has no command that hides a pane. What it has is zoom: herdr pane zoom with --toggle, --on or --off, aimed at a pane id or at --current, makes one pane fill its tab and hands the space back to the others when you turn it off. That is the way to get every other pane out of view while one agent needs your full attention.

herdr pane zoom --current --toggle

Inside NvSinner the hiding happens one level down, in the columns. <leader>j toggles the first column and <leader>j2 through <leader>j9 toggle the others; hiding one never kills the CLI running in it, so the agent keeps working out of sight. <leader>jh hides every open column at once. From another Herdr pane, nvsinner-herdr list shows each column as shown or hidden, and nvsinner-herdr focus 3 opens or focuses column 3 without touching the editor.

Driving it from outside

The part that actually gets used day to day is the other direction. nvsinner-herdr is a small companion command that lets another pane, including one running an agent, reach into those columns from outside the editor.

nvsinner-herdr list
nvsinner-herdr send 3 "review the diff"

send never appends a submit. The text lands in that column's input for me to press Enter on myself, the same rule I already keep in Midas: the agent can compose, the human commits. I did not plan for the two to share a rule. I built them months apart and only noticed afterward.

One thing I have not turned into an argument, more a feeling than a claim: how fast this exact corner of software moves. I wired this against a documented protocol this month, and nothing guarantees the protocol, or Herdr, or the whole idea of an agent aware terminal still looks like this by the time anyone reads this note. Whether that is just the pace this era runs at, or something worth worrying about, is its own subject. This is not that note.