Support herdr as a terminal host (unified terminal runtime / attachable sessions)
What I'd like
Today TerminalHostKind is 'tmux' | 'zellij' | 'windows_console'. I'd like herdr — a terminal workspace manager built for AI coding agents — to be selectable as a Terminal host for the Claude unified terminal runtime and for tmux-style attachable app-started sessions.
Why
I (and others running herdr) already manage all local agent panes in herdr. Sessions started or taken over from the Happier app end up in a separate tmux server, so they are invisible from the workspace where the rest of my agents live. happier attach inside a herdr pane works, but it nests tmux in herdr and the session does not show up as a first-class herdr pane (no herdr agent status, notifications, layout, etc.).
Why it looks feasible
herdr exposes a local socket API and CLI (herdr pane ...) whose primitives map closely onto TerminalHostAdapter:
TerminalHostAdapter |
herdr |
|---|---|
createOrAttachHost |
herdr pane split / tab + herdr pane run <cmd> |
injectUserPrompt |
herdr pane send-text + send-keys |
interruptTurn |
herdr pane send-keys (Escape / C-c) |
captureInputState |
herdr pane read |
evaluateLiveness |
herdr pane get / process-info |
dispose |
herdr pane close |
| attach | herdr pane focus (herdr session attach) |
herdr also has report-agent / report-agent-session, so Happier could register the pane as an agent pane.
Environment
- Happier CLI 0.2.12 (stable), self-hosted relay
- WSL2 (Ubuntu) + macOS, herdr as the daily terminal multiplexer
Happy to test a preview build. If you'd accept a PR for this, I'd appreciate a pointer on the preferred shape (new adapter under integrations/terminalHost, how the kind should be added to settings/schemas).
Thank you @Mizkino, that's a great suggestion!
Herdr integration has been implemented and is available in the current development source. It is not released yet.
How it works
Install stable Herdr 0.9.2 or newer on the machine running your agents, then select Settings -> Session -> Terminal host for new sessions -> Herdr. You can override this choice per machine.
- Create sessions from Happier: supported interactive sessions appear automatically in Herdr. Codex App Server and OpenCode open their native TUI against the same server/session Happier controls - you can interact through the terminal and Happier simultaneously.
- Start sessions inside Herdr: run
happier claude,happier codex, orhappier opencodein a pane. Happier registers the session normally and reuses that pane, including Claude unified mode, rather than creating a second controller/provider pane. - Open Herdr:
happier herdrstarts or connects to Herdr and opens its terminal interface. Inside Herdr, use its existing pane controls instead of nesting another client. - Attach later:
happier attach <session-id>reconnects to the existing terminal or reopens the same-session native client. It does not create another agent conversation. - Detach versus Stop: for shared-control Codex/OpenCode sessions, closing the managed TUI or choosing Detach terminal leaves Happier control running. Stop ends the session and cleans up its owned processes. Borrowed shell panes are preserved.
- Claude SDK: its existing local/remote switching remains intact; Herdr hosts that experience without changing it into simultaneous shared control.
- Headless agents: ACP and other runtimes without an interactive terminal remain headless - no artificial TUI is created.
Herdr receives agent activity and a Happier-owned resume command. Resume uses the appropriate release-channel executable (happier, hprev, or hdev) and preserves the original local runtime context. That executable must remain available in the restored shell.
The integration reuses Happier's terminal-host, attachment, provider-control and lifecycle owners; it does not introduce a separate session-sync system.
Authenticated Linux QA covered session continuity, native read-only permissions after resume, detach with continuing remote control, Stop cleanup, and preservation of borrowed panes. Native macOS/Windows certification remains outstanding; native Windows Herdr attachment is unsupported.
The issue remains open pending integration and release availability.
Posted by Codex on behalf of @leeroybrun.
Thanks for the request. This is now available in CLI 0.2.16 and app 0.2.17: install Herdr 0.9.2 or newer and choose it as your terminal host; native Windows attachment is not supported.
Please reply or reopen with your component versions if you cannot use this feature after updating.
Posted on behalf of @leeroybrun.