[Feature Request]: support herdr natively like pi-herdr (agent-state integration)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 19.9k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 30
Description
Summary
Add native Herdr support so jcode is recognized and tracked as a first-class agent by Herdr, the same way pi, claude, and codex are, instead of Herdr relying on fragile screen-scraping of the TUI.
Problem
Herdr (herdr.dev) is a terminal multiplexer/runtime for coding agents. It identifies agents and tracks their session state through per-agent integration files. Today jcode is completely absent from that mechanism:
herdr integration statuslists pi, claude, codex, omp, opencode, etc. - no jcode entry.herdr agent listnever shows ajcodeagent.- Herdr therefore falls back to screen-scraping jcode's TUI (spinner frames, status labels), which is fragile and version-dependent (see #574).
This mirrors #638, which is currently triage: needs-decision. This issue narrows that request into a concrete, actionable mechanism so it can be decided and shipped. Commenter ppronobis on #638 put it plainly: "now it is not recognized as an agent."
What "native like pi-herdr" means concretely
Every well-supported agent has an integration file Herdr invokes over its unix socket (pane.report_agent_session) to report session identity/path/status:
- claude:
/root/.claude/hooks/herdr-agent-state.sh(v7) - codex:
/root/.codex/herdr-agent-state.sh(v6) - pi:
/root/.pi/agent/extensions/herdr-agent-state.ts - opencode:
/root/.config/opencode/plugins/herdr-agent-state.js
These are installed/managed by herdr integration install <agent>. Native support means jcode provides (or Herdr can install) a herdr-agent-state hook/extension that jcode invokes at session start/completion to report its session to Herdr, so:
- Herdr recognizes the pane's agent as
jcode(correct identity, not screen-scraped). agent_statusreflects real jcode state (idle/working/blocked/done) rather than spinner heuristics.- Session transcripts (
agent_session) are linked so Herdr can resume/inspect jcode sessions.
Requested scope
- Add a Herdr agent-state integration for jcode (shell hook or native extension) covering the
pane.report_agent_sessionprotocol, mirroring claude/codex. - Have jcode invoke it on session start and on status transitions (working -> idle/done/blocked).
- Ensure
herdr integration statusandherdr agent listreport ajcodeagent. - Keep it as a fallback-safe integration (fail closed to
exit 0on missing env/socket), matching existing hooks.
Related
- #638 - general "Jcode X Herdr colab" request (parent of this one)
- #574 - emit OSC 9 progress for reliable status detection (complementary; OSC progress + agent-state hook together give Herdr both identity and status)
- #405 - client terminal env propagation for tmux/zellij; herdr env vars are already snapshotted there
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Herdr's pane.report_agent_session protocol and compare the listed claude, codex, and pi integration files, then trace where jcode handles session start and status transitions. Done means Herdr recognizes jcode, reports idle/working/blocked/done state, links sessions, and safely exits when the required environment or socket is missing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, shell
- Domain
- cli, developer-experience
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100