Repository navigation
Name agent rows by session and let the state choose their second line - #99
Merged
Merged
Conversation
…y both to the header, search and Recent Panels The row title ladder becomes chat title, name token, Herdr agent name, task, workspace label; the summary token and MISSING_SUMMARY are gone. sidebar.rs picks the second line from the group: rows that still concern the operator keep the status word and show expected_reply or progress, working rows show progress alone, read rows show nothing more. The result rides SidebarAgentSnapshot.detail and status_word_visible, the agent chip, and a new StripTabSnapshot.agent_identity that names a tab holding exactly one agent. The shell draws the second line at caption size, spreads the header into name, word and sentence with ViewThatFits dropping the sentence first above a new paneHeaderSentenceMinWidth token, titles search results by identity while matching the pane id, and names Recent Panels rows after their one agent.
The watcher derives a session name from Claude's ai-title record (first human turn while it is missing, logged once) or Codex's first human turn, renames the agent when Herdr accepts the name and otherwise sends it as the name token, and relabels a tab it alone occupies when the label is Herdr's own or the plugin's. A second pane.report_metadata carries name, progress and expected_reply; expected_reply is asked for as a 40-character imperative sentence and cut there, republished from persisted state after a restart, and cleared when the agent works again. An operator's agent name or typed tab label is never touched.
The status model, DESIGN.md and the plugin README carry the identity ladder, the per-state second-line table, the one-line pane header rule, the search and Recent Panels rules, and the plugin's name and tab ownership. The Projects board's raised rows, the search and Recent spec rows and the Conversation headers are redrawn on the shared agent identity master, and the header sentence minimum width is mapped as a canvas token. The search sheet falls back to the rolling task before the status word, so the core now serializes task.
A pane Herdr has not attached a session to reads the newest transcript in its directory, which is another pane's when two agents share a cwd; a live check saw a fresh pane's tab take the neighbouring Codex session's name. Names now wait for the pane's own session; the sentence tokens still flow.
The fake Herdr socket lived under std::env::temp_dir(), and a harness that points TMPDIR into its run directory pushes that path past SUN_LEN, so the bind failed before the test began. The socket now binds under the short system root, as the hide-herdr-client socket tests already do.
…t, tidy a comment The hide-agent-hooks report test now removes the /tmp socket it binds; the CoreAgentChip convenience initializer defaults status_word_visible to true like its decoder; the search subtitle comment says once what the code does.
This was referenced Sep 18, 2026
yansfil
added a commit
that referenced
this pull request
Sep 18, 2026
#100) ## Summary 한 checkout 안에 Claude pane이 둘 있으면, 조용한 쪽 pane이 30초 뒤부터 바쁜 쪽 pane의 transcript로 읽혔습니다. `SessionLocator::locate`가 Herdr가 보고한 session id의 파일이 30초 이상 조용하면 같은 cwd의 가장 최신 파일로 갈아탔기 때문입니다. PR #99 배포 검증 중 새 pane `w7J:p34`가 처음엔 제 이름(`README.md 첫 줄 요약`)을 받았다가 곧 이웃 세션의 이름과 task로 덮어써지는 것으로 발견했습니다(watcher 로그의 `input_chars=4044`가 이웃 세션 파일을 읽었음을 보여줌). 바꾼 것: 보고된 id의 파일이 있으면 그 파일을 무조건 씁니다. newest-by-cwd 탐색은 보고된 id가 없거나 그 파일이 없는 pane에만 남습니다. `REPORTED_SESSION_FRESHNESS`와 `is_recent`는 쓰는 곳이 없어져 삭제했습니다. ## Related - PR #99 (agent-row-identity) 배포 후 발견. - `plugins/agent-context-labels/README.md:291`의 "세션을 기록하지 않은 pane은 이름을 붙이지 않는다"는 규칙과 같은 이유입니다. ## Review focus - **사람이 판단할 것**: freshness 규칙이 원래 막으려던 케이스가 있는지. 제가 찾은 답은 "pane 안에서 세션이 바뀌면(`/clear`, `--resume`) runtime hook이 새 id를 다시 보고하므로 stale id는 hook 경로로 이미 갱신된다"입니다. 그 가정이 틀린 경로가 있으면 알려주세요. - **위험한 파일**: `hide-session/src/lib.rs` `locate`의 분기 하나뿐입니다. ## Risk surface - **Failure path**: 보고된 id의 파일이 없으면 이전과 같이 `SessionFileMissing` → cwd 탐색으로 내려갑니다. 변경 없음. 이외 항목(mutex, wire, ownership, contract, high-frequency)은 해당 없음: 이 코드는 플러그인 watcher 프로세스와 usage fallback에서만 돌고 `Mutex<Runtime>` 밖입니다. ## Evidence - **확인한 것**: 새 테스트 `a_reported_session_is_kept_when_a_neighbour_in_the_same_cwd_is_newer` - 보고된 파일 mtime을 10분 전으로 두고 같은 디렉터리에 더 새 파일을 만들어도 보고된 파일이 돌아오고, id 없이 물으면 여전히 최신 파일이 돌아옴. `scripts/verify-cargo.sh test` 전체 통과(hide-session 11, 워크스페이스 합계 0 실패), `scripts/verify-cargo.sh lint` 통과. - **확인하지 못한 것과 그 이유**: 실기기에서 두 pane이 같은 cwd에 열린 상태의 재현은 머지 후 플러그인 재설치(`herdr plugin install ... --yes`) 뒤에 확인합니다. 워크트리에서 빌드한 watcher를 운영 소켓에 붙이면 지금 도는 watcher와 lock이 충돌합니다. ## AI tooling - [ ] 사람이 직접 작성 - [ ] 일부를 AI 도구로 작성 - [x] 대부분을 AI 도구로 작성 **손으로 확인한 것**: 검증 pane의 토큰이 시간차로 바뀌는 것을 `herdr pane read`로 두 번 관찰했고, watcher 로그의 input_chars로 어느 파일을 읽었는지 대조했습니다.
yansfil
added a commit
that referenced
this pull request
Sep 18, 2026
…ird line (#101) ## Summary Needs You / Done 행의 둘째 줄에서 `Question`, `Done` 단어가 문장 앞에, 프로젝트 qualifier(`ct › master`)가 문장 뒤에 붙어 정작 읽어야 할 문장이 잘렸습니다. 마크와 그룹 제목이 이미 그 단어를 말하고 있으므로, 상태 단어는 모든 그룹에서 "문장이 없을 때만" 그립니다(빈 둘째 줄 방지 역할만 남김). prominent 행의 qualifier는 셋째 줄(micro, muted)로 내렸습니다. pane header는 같은 `status_word_visible` 플래그를 따르므로 `name · sentence`로 읽히고, 접근성 라벨에는 단어가 그대로 남습니다. ## Related - PR #99 (agent-row-identity) 배포 후 실사용 피드백. - `DESIGN.md`, `docs/status-model.md`의 둘째 줄 표와 `design/hide.pen`의 `Screen / Sidebar / Agent row states` 보드를 같이 갱신했습니다. ## Review focus - **사람이 판단할 것**: 문장이 있는 행에서 `?` 마크 + 밝은 문장만으로 "질문 대기"가 충분히 읽히는지. PR #99 때는 마크만으로 약하다고 봐서 단어를 남겼는데, 실사용에서 단어가 자리를 더 많이 차지해 뒤집었습니다. - **위험한 파일**: `herdr-core/src/sidebar.rs` `agent_second_line` 한 함수. 다른 표면(header, ⌘K, Pet dashboard)은 이 플래그를 그대로 받습니다. ## Risk surface - **Snapshot wire**: 새 필드 없음. 기존 `status_word_visible`의 값만 달라집니다. 이외(mutex, ownership, contract, failure path, high-frequency)는 해당 없음: 스냅샷 투영 시 순수 함수 하나의 분기입니다. ## Evidence - **확인한 것**: `scripts/verify-cargo.sh test`/`lint` 통과(둘째 줄 규칙 테스트 갱신), `scripts/verify-swift.sh test` 435개 통과(행/헤더/⌘K fixture를 코어가 실제로 내는 상태로 갱신), `node scripts/check-design-contract.mjs` 통과(캔버스 보드 4행에서 단어 슬롯 끄고 위치 슬롯 켬). - **확인하지 못한 것과 그 이유**: 설치 앱에서의 실제 렌더. 운영 중인 앱을 교체하지 않으려고 머지 후 재설치 때 확인합니다. - **화면 증거**: 머지 후 재설치 시점에 첨부 예정. ## AI tooling - [ ] 사람이 직접 작성 - [ ] 일부를 AI 도구로 작성 - [x] 대부분을 AI 도구로 작성 **손으로 확인한 것**: 사용자가 설치 앱 스크린샷으로 지적한 두 문제(단어가 자리를 차지함, qualifier가 문장을 밀어냄)를 그대로 반영했습니다.
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.
Summary
에이전트 행이 무엇을 하는지(
summary)가 아니라 누구인지(세션 이름)로 불리고, 둘째 줄은 상태가 고른 한 문장만 보인다.사이드바 행, pane 헤더, ⌘K 검색 행, ⌃Tab Recent Panels 행, lineage chip, Overview 에이전트 줄이 전부 코어의
identity_label하나를 쓴다.sidebar.rs): laddername 토큰 → Herdr 에이전트 이름 → task → 워크스페이스 라벨.summary읽기와MISSING_SUMMARY("Check agent-context-labels settings") 삭제. 둘째 줄은 그룹으로 정해(Needs You·안 본 Done = 상태 단어 +expected_reply(없으면progress), Working =progress만, Seen = 없음)detail/status_word_visible로 내려보낸다. 에이전트 pane이 하나인 탭은StripTabSnapshot.agent_identity를 얻는다.AgentRow가 둘째 줄을 그리고(caption medium 상태색 단어 + caption regular 문장, tail truncation, 툴팁),PaneHeaderTitle은이름 · [단어] 문장한 줄을ViewThatFits로 문장→단어 순서로 떨군다.HideSearchView는 정체성 제목 + 문장 부제(pane id는 매치·접근성에만),RecentNavigation은 한 에이전트 탭을 정체성 + 상태 마크로 그린다.agent-context-labels): 세션 이름을 Claude Code의ai-title(없으면 첫 Human 턴,session_title_missing한 번 로그) 또는 Codex의 첫 Human 턴에서 한 번 정해agent.rename(Herdr 규칙[a-z][a-z0-9_-]{0,31}을 통과할 때) 또는name토큰으로 쓰고, 에이전트 하나뿐인 탭의 Herdr 생성형 라벨을tab.rename한다. 두 번째pane.report_metadata로name/progress/expected_reply(40자 명령형)를 발행하고 재시작 시 상태 파일에서 다시 붙인다. 이름은 Herdr가 기록한agent_session이 있는 pane에만 쓴다.hide-session:ai-title레코드를ParsedSession.title로 파싱.docs/status-model.md상태별 둘째 줄 표, DESIGN.md 행·헤더·검색·Recent 규칙, 플러그인 README "Session names",design/hide.pen의 Projects·Agent row states·Header states·Conversation·Search/Recent 보드.아래 "Changed Paths"는 PRD base(b9d5d74) 기준 목록이라 사이에 머지된 main(#96, #97, #98)의 파일이 섞여 있다. 이 PR이 main에 더하는 diff는 45개 파일이다.
Result
Approval/Question단어와 사용자가 할 일 한 문장, 일하는 행은 회색 진행 문장만, 본 뒤 쉬는 행은 제목 한 줄이다. 문장이 없는 행은 예전처럼 상태 단어만 남고 둘째 줄이 통째로 비는 행은 없다.! ❋ 결제 멱등키 PR … · Approval A/B 중 하나를 선택하고 …한 줄이고, 좁아지면 문장, 그다음 단어가 빠진다.summary발행)과 새 코어를 섞으면 제목은 Herdr 이름 또는 워크스페이스 라벨, 둘째 줄은 상태 단어만이다. 경고는 없다(B13).expected_reply의 길이·어미뿐이다. 설치된/Applications/hide.app과 운영자의 watcher는 이 PR이 바꾸지 않는다(업그레이드는 운용 후속).Screenshots / Demo
화면 증거 6장은 로컬 run 디렉터리(
agents/runs/agent-row-identity/evidence/live/, 저장소 규칙상 커밋하지 않음)에 있고, 무엇이 보였는지는 아래 Evidence 섹션에 적었다.GitHub user-attachments 업로드는 브라우저 UI가 필요해 이 PR 본문에는 인라인 이미지가 없다. 이미지가 필요하면 그 디렉터리의 01~06을 이 섹션에 끌어다 놓으면 된다.
Human Review Focus
증거가 이미 증명한 것: 코어 ladder·둘째 줄·헤더 문자열·검색·Recent(단위 테스트 + 라이브 스크린샷), 플러그인 이름 도출·소유권·두 번째 보고·재시작 재발행(단위 테스트 + 격리 서버에서 실제 Claude Code/Codex 세션으로 이름·탭 확인), 세 게이트 PASS.
사람이 판단할 것:
primary, working 행secondary. 실제 사이드바에서 두 회색이 구분되는지(D-07은 세 번째 회색을 버렸다).hari-x)가 한 줄에 놓여 문장이 먼저 잘린다(스크린샷 01). qualifier를 유지할지, 문장에 자리를 더 줄지.agent_session없는 pane은 이름을 쓰지 않음(PRD 밖의 추가 규칙): 같은 cwd의 이웃 세션 이름을 빌려 탭에 쓰는 것을 라이브에서 봤고, 그 pane은 자기 세션이 기록될 때까지 워크스페이스 라벨/task로 보인다.plugins/agent-context-labels/src/lib.rs의sync_names(Herdr에 쓰는 유일한 경로:agent.rename,tab.rename)와report_if_changed(보고 수만큼 revision을 미리 더해 자기 이벤트를 걸러내는 가정),herdr-core/src/runtime.rs::sync_strip_agent_identity(세 패스에서 호출).Layout.paneHeaderSentenceMinWidth(120pt)를 받을지. D-07의 "새 토큰 없음"은 행 타이포에 대한 말이었고, 헤더가 문장을 먼저 자르고(D-08) 그다음 떨구려면 최소 폭이 필요했다.Related
agents/prd/agent-row-identity/prd.md(run 중 한 번 amend: D-03 name-token fallback, D-15/D-16, B17/B18)Risk surface
sync_strip_agent_identity(strip 항목 × 탭 × 에이전트 walk)와token_text문자열 cut뿐. 서브프로세스·블로킹 I/O 없음.SidebarAgentSnapshot에detail,status_word_visible,task추가,summary제거;PaneSnapshot.summary → identity_label;AgentChipSnapshot.detail: Option+status_word_visible;StripTabSnapshot.agent_identity. 셸 디코더는 빠진 키를 기본값으로 읽는다(status_word_visible없으면true).agent.rename,tab.rename,tab.get,pane.report_metadata,agent.list의name/tab_id. 전부contracts/herdr-api.schema.json(v0.9.1)에 있다. 에이전트 이름 패턴은 스키마에 없어 로컬 검사 + 서버 응답 두 겹으로 처리.agent_rename_failed/tab_rename_failed/session_title_missing이events.jsonl에 한 줄씩 남는다.reported_revisions에 보고 수를 더해 자기 이벤트를 걸러낸다(watcher_deduplicates_reports_and_its_own_revision_bump).Evidence
verify-cargo.sh test(코어 542 + 플러그인 80 + hide-session·hide-agent-hooks 등 전 워크스페이스),verify-swift.sh test470개,verify-cargo.sh lint(fmt + clippy -D warnings),check-design-contract.mjs(check-pen 포함) 모두 PASS at 2aee3c8. 라이브: 격리 Herdr 세션hari에서 실제 Claude Code pane이ai-title"README.md 생성"으로name토큰 + 탭 라벨을 얻고, 실제 Codex pane이 첫 턴 30자로 이름·탭 라벨을 얻는 것을herdr agent list/tab list/pane get과 watcherdisplay-state.json으로 확인. 스크린샷 6장: 사이드바 4상태(Approval 30자 이름·40자 문장…잘림, Done + progress, Done 단어만, working progress만), 헤더 한 줄, 3분할 좁은 헤더(문장·단어 탈락), ⌘K 시트와 pane id 매치, ⌃Tab Recent Panels.agents/runs/agent-row-identity/evidence/live/01~06. 저장소 규칙(evidence는 커밋 금지)으로 본문 인라인 없음.AI tooling
손으로 확인한 것: 스크린샷 01~06을 눈으로 대조(행 제목·둘째 줄·헤더·검색·Recent),
herdr agent list/tab list출력, 격리 watcher의events.jsonl과display-state.json, pen 보드 export 5장.Product And Scope Result
Actual Tests
bash scripts/verify-cargo.sh test(cwd: ., exit 0)bash scripts/verify-swift.sh test(cwd: ., exit 0)bash scripts/verify-cargo.sh lint(cwd: ., exit 0)Actual Observations
Deterministic Verification
Agent Review: Fix Now
hide-agent-hooks/src/report.rs테스트가/tmp에 소켓 디렉터리를 남김. 9977880에서 소켓 파일과 디렉터리를 지우도록 고침(같은 커밋에서CoreAgentChip편의 init의statusWordVisible기본값을 디코더와 같은true로 맞추고,HideSearchView.agentSubtitle의 겹친 doc comment 정리).expected_reply는 정확히 40자(len()으로 재고 발행)이며 둘 다…로 잘려 보인다.Agent Review: Follow-up Improvements
report_if_changed가 보고 수(0~2)만큼 revision을 미리 더한다. Herdr가 내용이 바뀐 보고마다 revision을 정확히 1 올린다는 가정이며, 어긋나면 불필요한 fullprocess()가 한 번 더 도는 정도(멱등)다. 고정 Herdr 계약으로 이 의미를 확인하는 것이 후속.sync_strip_agent_identity가 상태·strip 재구성·lineage 세 패스에서 각각 돈다. pane·tab 수에 비례하는 작은 walk지만 한 사이클에 두 번 겹칠 수 있다.herdr_subscription_lost(cursor=0, event_gap)가 수십 번 반복되고 나서 resume됐다. 이 PR과 무관한 기존 재구독 동작이지만 로그 소음이 크다.HXWFK에 raised 행의 trailing qualifier 슬롯이 없어 Projects 보드 행은 qualifier를 생략했다. 검색 시트·Recent Panels의Screen /보드는 없어서 Component spec 보드만 갱신했다.agent.rename/tab.rename/tab.get/agent.list의name·tab_id는 v0.9.1 스키마에 있다. v0.9.1 서버에서 이름 거부(invalid_agent_name)와 토큰 null 클리어 동작을 한 번 더 보는 것이 후속.MAX_SESSION_NAME_CHARS(80)가 Claude Codeai-title에만 적용되고 첫 턴 기반 이름은normalize_task의 30자 예산을 따른다는 점을 doc comment에 적음(2aee3c8).Delivery Staging
Changed Paths Planned For This PR
Risks, Rollback, And Human Review
summary토큰을 더 읽지 않는다. 운영자의 watcher가 옛 플러그인이면 행 제목은 Herdr 이름/워크스페이스 라벨, 둘째 줄은 상태 단어만이다(B13, 경고 없음). 플러그인 clone을 갱신하고 watcher를 재시작하면 이름·문장이 붙는다.display-state.json의 새 필드는serde(default)라 옛 상태 파일이 그대로 읽힌다. 프롬프트 스키마 버전은context_label.v3.agent.rename과tab.rename을 호출한다. 소유권 규칙(이름 없는 에이전트 또는 플러그인이 마지막에 쓴 이름, Herdr 생성형 라벨 또는 플러그인이 쓴 라벨, 에이전트 하나인 탭)을 벗어나면 쓰지 않고, 실패는agent_rename_failed/tab_rename_failed한 줄 로그 후 재시도 없음.summary를 다시 읽고 플러그인은 세 토큰을 발행하지 않는다. 이미 바뀐 Herdr 에이전트 이름과 탭 라벨은 Herdr 세션 상태에 남는다(herdr agent rename/herdr tab rename으로 되돌릴 수 있다)./Applications/hide.app을 교체한 확인은 하지 않았다(운영자 앱·서버·watcher를 건드리지 않는 규칙). 워크트리 번들(me.grab.hide.agent-row-identity)을 격리 Herdr 서버와 격리 watcher(HOME 분리, 자동 요약 끔)에 붙여 확인했다. (2) 질문·working 행의progress/expected_reply는 provider 분석을 끈 상태라 플러그인이 쓰는 토큰 이름으로 손으로 발행해 화면을 확인했고, 실제 provider 응답 → 40자 cut은 단위 테스트로만 확인했다. (3) upstream v0.9.1 서버에서의 라이브 재확인(위 후속). (4) 닫힌 pane의tab_agent_counts·상태 정리는 기존 pane 수명 경로를 따르며 별도 라이브 확인은 없다.