Skip to content

fix(herdr): report hwip cc to herdr again and survive its restarts - #1

Merged
tak-bro merged 1 commit into
mainfrom
fix/herdr-agents
Oct 18, 2026
Merged

tak-bro merged 1 commit into
mainfrom
fix/herdr-agents

Conversation

@tak-bro

@tak-bro tak-bro commented Oct 18, 2026

Copy link
Copy Markdown
Member

무엇이 문제였나

  • hwip cc pane 이 herdr 사이드바에 한 번도 뜨지 않았다. tmux 3.5a display-message -p 가 \x1f 를 리터럴 \037 로 출력해 세 옵션이 한 값으로 들어오고, socket 이 비어 hook 이 매번 보고 전에 exit 0.
  • herdr 가 재시작하면 보고를 잃는데, hook 은 같은 state 를 다시 보내지 않아 idle 에이전트가 계속 빠져 있었다.

변경

  • hooks/hwip-herdr.sh: 옵션을 한 줄에 하나씩 읽음(빈 필드 보존). state 파일에 socket 경로를 기록하고 socket 이 마지막 보고보다 새로우면(herdr 는 시작 시 socket 재생성) 같은 state 도 재보고 — builtin test -nt, fork 없음.
  • tests/test-hwip-herdr.sh: tmux stub 이 실 tmux 처럼 제어문자를 이스케이프(기존 stub 은 raw 로 넘겨 결함을 가렸다 — 픽스 전 12건 red) + herdr 재시작 3행(픽스 전 red).
  • docs/HOOKS-EXPLAINED.md 갱신.

검증

  • tests/run-all.sh 16/16 suites.
  • live: 픽스 hook 을 실제 hwip cc pane 에서 실행 → herdr agent list 에 hwip cc working.

짝 PR: hwipit/cli (herdr 네이티브 통합의 죽은 pane env).

🤖 Generated with Claude Code

tmux 3.5a's `display-message -p` prints a unit separator as the literal
`\037`, so the three herdr options arrived as one value, the socket read
as empty, and the hook exited before every report: no `hwip cc` pane
ever showed in herdr. Read the options one per line instead, and make
the test's tmux stub escape control characters the way tmux does.

herdr forgets every report when it restarts, and the hook skips a state
equal to the last one it sent, so an idle agent stayed missing. herdr
recreates its socket on start: keep the socket in the state file and
resend when it is newer than the last report (a `test -nt`, no fork).
@tak-bro
tak-bro merged commit 07bec29 into main Oct 18, 2026
2 checks passed
@tak-bro
tak-bro deleted the fix/herdr-agents branch October 18, 2026 11:44
tak-bro added a commit that referenced this pull request Oct 19, 2026
Ship the herdr fix (#1) to existing installs; Claude Code only
refreshes a plugin when its version changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant