Repository navigation
fix(herdr): point herdr's native integrations at the attaching pane - #4
Merged
Merged
Conversation
An agent under tmux inherits the tmux server's global env, copied from the terminal that started the server, so HERDR_PANE_ID named a herdr pane long closed. herdr's own integrations (codex, opencode, hermes, cursor, and the claude/pi ones) reported there and failed with pane_not_found, which left every wrapped agent but cc and pi with no way into herdr. Set the HERDR_* env with `new-session -e` on every session the wrapper creates: the attaching pane for an agent herdr reports natively, empty for claude and pi (hwip reports those itself; a second source on the pane replaces hwip's label and its release drops both), for a detached launch and outside herdr. tmux older than 3.2 has no `new-session -e` and gets none, as before. The pi extension resends an unchanged state once herdr has restarted (its socket is newer), and no longer trims an empty pane option away, which read the socket path as the pane.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
무엇이 문제였나
tmux 안의 에이전트는 tmux 서버 global env 를 상속한다 — 서버를 처음 띄운 터미널의 값이라
HERDR_PANE_ID가 이미 닫힌 herdr pane(w1Y:pM)을 가리켰다. herdr 네이티브 통합(codex·opencode·hermes·cursor·claude·pi)이 그 pane 으로 보고해pane_not_found— cc·pi 외 래핑 에이전트는 herdr 에 들어갈 길이 없었다.변경
src/wrapper.tsherdrEnvArgs: wrapper 가 만드는 모든 세션에new-session -e HERDR_*=7개.claude·pi(hwip 자체 보고 —config.tsHERDR_SELF_REPORTING_KINDS), detached, herdr 밖: 빈 값. 한 pane 에 두 source 가 보고하면 나중 label 이 이기고 한쪽 release 가 둘 다 지운다(herdr 0.9.3 측정).new-session -e가 없어(tmux CHANGES) 생략, 기존 동작 그대로.src/templates.ts): herdr 재시작(socket mtime) 뒤 같은 state 재보고.trim()이 빈 pane 필드를 지워 socket 을 pane 으로 읽던 결함 수정. 틀린 주석("tmux does not pass HERDR_*") 정정.검증
npm test199 files / 5209 passed,npm run buildok,sync-from-plugin --checkok.gone:pX)로 띄운 격리 tmux 서버에서 codex 세션HERDR_PANE_ID=live:p1, claude 세션 빈 값.한계
herdr integration install <agent>로 herdr 통합이 설치돼야 인식.짝 PR: hwipit/plugin#1
🤖 Generated with Claude Code