Repository navigation
[Feature]: Add herdr integration #516
Description
Product or interface
CLI - interactive TUI
Use case and problem
Herdr (https://herdr.dev) is a terminal workspace/server that keeps long-running coding agents visible and resumable across disconnects and server restarts. Herdr can already show an agent's idle / working / blocked state in its sidebar, notify on completion, and drive automation such as herdr agent wait.
Herdr supports many coding agents today (Pi, Claude Code, Codex, GitHub Copilot CLI, Devin CLI, Droid, Kimi Code CLI, OpenCode, Kilo Code CLI, Hermes Agent, Qoder CLI, Qwen Code, Letta Code, Cursor Agent CLI, MastraCode, Antigravity CLI, Grok CLI) — but MiniMax Code (mcode) is not among them, and Herdr's screen-manifest detection cannot derive state from the MCode TUI reliably.
That leaves three gaps for MCode users:
- No agent state. Herdr cannot show that an MCode turn is
working, is waiting for a permission decision (blocked), or isidleand ready for input. Automation that waits on agent state cannot target MCode. - No notifications. There is no "agent finished / needs a decision" notification from MCode inside a Herdr session.
- No native session restore. After a Herdr server restart, a pane can be reopened in the same directory, but there is no way to bring the same MCode session back. Users must re-find and re-open it manually.
Herdr explicitly supports a vendor-neutral path for this: an agent can report its own state and resume command through the Herdr CLI, with no pull request to Herdr required (https://herdr.dev/docs/add-herdr-support/). Herdr's own docs state that agents whose vendors don't ship an integration should own it themselves, so the integration can be fixed on the MCode release schedule.
Desired behavior
MiniMax Code should report its lifecycle to Herdr when it detects it is running inside a Herdr-managed pane, and register a resume command so the exact session can be restored.
Platform
Multiple platforms
Alternatives and additional context
What exists today
- Herdr's built-in screen-manifest detection does not recognize the MCode TUI, so no agent state is reported for MCode panes.
- A user can hand-write a MiniMax Code Plugin that shells out to
"$HERDR_BIN_PATH" pane report-agent, but this is undocumented in the MCode repo, has no supported way to discover the current session id for restore, and gives no guarantee that state transitions are reported exactly once. - Herdr also ships a reusable agent skill file (
https://github.com/herdrdev/herdr/blob/v0.9.5/skills/herdr/SKILL.md, installable withnpx skills add herdrdev/herdr --skill herdr -g). That skill lets an agent control Herdr from inside a pane; it does not report the agent's own lifecycle state or register a resume command. Shipping it as a bundled/official MCode skill would be a nice complement to the native integration, but it is not a substitute.
Why this belongs in MCode rather than in Herdr
Herdr's guidance for agents whose vendors do not ship an integration is that the agent vendor should own it: the integration then improves on the MCode release schedule instead of waiting on a Herdr release, and MCode can fix regressions in its own hook/lifecycle layer directly.
Notes for implementation
- The Plugin Hook event set already covers every transition this needs:
SessionStart,SessionEnd,UserPromptSubmit,PermissionRequest,Stop(seepackages/agent-modules/plugin-hooks/src/contracts.ts,PLUGIN_HOOK_EVENTS). - The hook input already carries
sessionId,model,permissionMode, andcwd, which is what the resume command needs. The exact stdin payload shape for command hooks should be confirmed while implementing. - The natural implementation is a first-party, user-installable MCode Plugin (or a built-in integration behind an opt-in flag) that maps those events to the Herdr commands above.
- Reference for the protocol and the full CLI surface: https://herdr.dev/docs/add-herdr-support/ and https://herdr.dev/docs/integrations/.
Activity
bhxch commentedon Oct 20, 2026
did you mean something like this https://github.com/bhxch/mcode-herdr
lucidfrontier45 commentedon Oct 20, 2026
@bhxch
Yes I think so.
I have also vibe-coded my own version. https://github.com/lucidfrontier45/minimax-code-herdr-integration
It also supportes Windows. Detailed comparison is attached.
mcode-herdr-comparison.md
Anyway, it's better that user can let herdr recognize mcode out of box or with one command, e.g.
mcode install-herdrFor example
Pi-Bolt (a pre-compiled Pi) ships its own herdr integration out of box.
https://github.com/opensec-git/Pi-Bolt#herdr