Files
herdr/docs/next
JJ Liebig 101ccc20d3 fix(windows): prefer pwsh for the default pane shell (#4297)
* fix(windows): prefer pwsh for the default pane shell

Windows panes launched Windows PowerShell 5.1 (powershell.exe) whenever [terminal] default_shell was unset, ignoring PowerShell 7 even when pwsh.exe resolved on PATH. Resolve the unset default against PATH and prefer pwsh.exe, falling back to the inbox powershell.exe. An explicit default_shell still wins.

* fix(windows): validate pwsh before using it as the default shell

portable-pty resolves the configured shell with Path::exists and passes that path to CreateProcessW, which does not fall through to later PATH entries. Selecting an invalid pwsh.exe would therefore break new panes instead of falling back. Only prefer a pwsh.exe that starts with the PE MZ magic, and return its path so the validated binary is the one launched.

* fix(windows): validate the full PE header before preferring pwsh

Checking only the DOS MZ signature still accepted truncated images, DLLs, and foreign-architecture binaries. Because portable-pty passes the resolved path straight to CreateProcessW without trying later PATH entries, validate the PE signature, the COFF header (machine, executable-image bit, not a DLL, section count), and the optional header before preferring pwsh.exe.

* fix(windows): accept native ARM64 pwsh and validate the section table

Herdr ships an x64 Windows build that also runs on Windows ARM64 under x64 emulation, so cfg!(target_arch) cannot tell whether a native ARM64 pwsh.exe is launchable. Accept every executable machine type Windows supports instead of rejecting ARM64 on the x86_64 build. Also bound-check the section table (40 bytes per declared section) after the optional header so a truncated table falls back instead of being selected.

* fix(windows): detect the native host machine for pwsh compatibility

Machine compatibility was derived from cfg!(target_arch), which reports the emulated x64 process on Windows ARM64, and then briefly accepted ARM64 on every host. Read the native machine with IsWow64Process2 in the platform layer instead: ARM64 Windows accepts ARM64/x64/x86 images, x64 accepts x64/x86, and x86 accepts only x86.
2026-09-17 17:45:07 +02: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.