Kataoka Katsuki d66c39d5c5 fix(server): transfer handoff descriptors in batches (#3411)
Live handoff refused any session with more than 64 panes. The pane count
was checked twice against MAX_FDS_PER_HANDOFF, and the transfer itself put
every pane's pty master into one SCM_RIGHTS control message, so the guard
was the only thing keeping the send inside the kernel's per-message limit.
A session past the limit could only be updated by closing panes or by a
normal restart, which ends every pane process.

Send the descriptors in batches of 64 instead and drop both guards. The
receiving side accumulates across recvmsg calls until the expected count
arrives, bounds every SCM_RIGHTS payload it reads by the control bytes the
kernel returned, rejects a batch that carries more descriptors than it
asked for, and closes the descriptors it already holds on any failure. A
session of 64 panes or fewer still produces one batch, so the bytes on the
wire are unchanged and HANDOFF_VERSION stays at 1.

refs #3393

Co-authored-by: kataokatsuki <kataokatsuki@users.noreply.github.com>
Co-authored-by: JJ Liebig <jonathan.liebig@gmail.com>
2026-09-13 15:52:29 +02:00
2026-07-16 17:57:10 +03:00
2026-09-07 22:12:53 +03:00
2026-09-07 22:12:53 +03:00
2026-09-07 22:12:53 +03:00
2026-09-07 22:12:53 +03:00
2026-05-09 23:16:24 +03:00

herdr

herdr

herdr.dev · install · quick start · docs

English · 简体中文

Apache 2.0 license total GitHub release downloads GitHub stars latest stable release Homebrew version follow @herdrdev on X


https://github.com/user-attachments/assets/043ec09f-4bdd-41d5-aee0-8fda6b83e267

the runtime your coding agents live on.

  • detach without stopping work — herdr keeps terminals running in a background server when you close the client or lose your SSH connection. after a server or machine restart, herdr restores the saved layout and can resume supported agent sessions; the original processes do not survive. session state →
  • several machines, one window — keep local work and saved ssh machines together, with a combined agent list and independent reconnects. remote machines →
  • never hunt for the stuck one — every pane is marked working, blocked, or idle. when an agent stops and needs an answer, herdr says so.
  • agent-native — agents drive herdr through the cli and socket api: they can spawn panes, prompt each other, and wait until another agent is genuinely blocked. agent skill →
  • runs what you already run — claude code, codex, cursor, opencode, grok and the rest. herdr doesn't wrap or replace them; it owns their terminals.
  • keyboard and mouse, both first-class — tmux-style prefix keys and click, drag, split. pick per moment, not per tool.
  • plugins — extend panes and workflows. browse the marketplace →
  • one rust binary, no electron — runs in whatever terminal you already use.

install

curl -fsSL https://herdr.dev/install.sh | sh

or brew install herdr · mise use -g herdr · windows: powershell -ExecutionPolicy Bypass -c "irm https://herdr.dev/install.ps1 | iex" · endpoint-protected Windows · binaries

then start it where the work lives:

herdr

run your agents, split panes, walk away. ctrl+b q detaches, herdr reattaches. quick start →

docs

everything lives at herdr.dev/docs: quick start · concepts · supported agents · keyboard · configuration · session state · connecting machines · remote · integrations · plugins · socket api

thanks

every past sponsor and backer is listed in SPONSORS.md — thank you 🐑

enterprise / partnership: hey@herdr.dev

agent instructions

if you are an ai agent helping with this repository, read AGENTS.md before making changes and read CONTRIBUTING.md before opening issues or PRs.

development

git clone https://github.com/herdrdev/herdr
cd herdr
cargo build --release

just test        # unit tests
just check       # formatting, tests, and maintenance checks

license

Herdr is licensed under the Apache License 2.0.

S
Description
herdr: Control Herdr, a terminal multiplexer for coding agents. Use only when the user explicitly mentions Herdr or asks to use Herdr to inspect or control panes,…; herdr: Control Herdr, a terminal multiplexer for coding agents. Use only when the user explicitly mentions Herdr or asks to use Herdr to inspect or control panes,…
Readme Apache-2.0 61 MiB
Languages
Rust 94.9%
Python 2.1%
PowerShell 1.1%
TypeScript 0.9%
Shell 0.5%
Other 0.4%