Herdr Pane Topic Sync banner
danbuhler danbuhler

Herdr Pane Topic Sync

Development community

Description

herdr plugin: auto-name panes & tabs after each agent's live topic (Claude Code, Codex, …) instead of 1, 2, 3.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Pane Topic Sync

A [herdr](https://herdr.dev) plugin that auto-names your panes and tabs after what each agent is actually working on — no more tabs labeled `1`, `2`, `3`.

On every relevant herdr event it:

  1. Renames each agent pane to its live topic — the terminal_title_stripped that Claude Code (and other agents) emit via the terminal title. With show_agent_labels_on_pane_borders = true in your herdr config, that topic shows right on the pane border.
  2. Renames each tab to the topic of its first pane (top-left, reading order). If the first pane is a plain shell, the first agent pane's topic is used instead, so a tab is never named after a shell prompt.

Plain (non-agent) shell panes are left untouched.

How it works

  • Subscribes to pane.* / tab.focused / workspace.focused events (see herdr-plugin.toml). The key trigger is pane.agent_status_changed, which fires when an agent flips idle↔working — i.e. when it sets a fresh topic.
  • Deliberately does not subscribe to *.renamed events, so its own renames can't feed back into a loop.
  • Gates all writes through a state file ($HERDR_PLUGIN_STATE_DIR/pane-topic-sync-state.json), so rename is only called when a topic actually changed — no churn. The same file records the last few labels the plugin wrote for each pane and tab, so manual renames survive (see Manual renames are respected).
  • herdr fires several subscribed events at once, so copies of the script overlap routinely. Each run merges its histories with whatever reached the state file since it started and swaps the file in atomically, so overlapping runs can't clobber each other's bookkeeping.
  • "First pane" is resolved from herdr pane layout rect coordinates, sorted by (y, x), so it's the visually top-left pane regardless of split order.

Install

Local (development):

git clone  ~/repos/herdr-pane-topic-sync
herdr plugin link