Repository navigation
fix: never check a composer version over input Hide just typed - #2144
Merged
Merged
Conversation
The composer version check took the end of a pane's last turn as a known-empty composer even after Hide typed a bell, a mission answer, a brief retype or a hand-off's words there, so it read Codex's composer holding the bell as not_empty and waited a minute. The pane now records when Hide last typed into it, and a hook moment before that is no known-empty moment.
HyunjunJeon
pushed a commit
to HyunjunJeon/hide
that referenced
this pull request
Nov 9, 2026
…one that never lands (with-hide#2159) Closes with-hide/hide-private#587 Related: with-hide#2114, with-hide#2144 ## Summary 막 시작한 에이전트에 Hide가 친 브리프가 입력창에 닿지 않으면, 누가 그 화면에 답하기 전에는 다시 치지 않았고, 끝까지 안 닿아도 실패로 알리지 않았습니다. 이제 세 경우를 처리합니다. - 입력창이 비어 있고 그 뒤로 에이전트 상태가 전혀 움직이지 않았으면(시작 중에 글을 떨어뜨린 경우), 키를 읽는 프로그램에 다시 칩니다. - 입력창에 에이전트 자신의 붙여넣기 표시가 브리프와 같은 줄 수로 남아 있으면(예: OpenCode `[Pasted ~18 lines]`), 빠진 Enter만 누릅니다. - 세 번 다 받지 않으면 부모에게 실패와 이유를 알리고, 한 번 `input.undelivered` 로그를 남깁니다. 알림 첫 두 줄: ``` worker did not get its brief: Hide tried 3 times and the agent recorded none of them, so Hide does not type it again. Read its screen with `hide pane read <pane>`; `hide agent show` names what it waits on. Once its screen shows its input box, type it there yourself with `hide pane send <pane> <text> --enter`, or stop the agent and start the work again. ``` (한 번의 시도는 다시 치기이거나, 입력창에 남은 브리프에 누른 Enter입니다.) ## Review - **판단해 주세요**: "움직이지 않음"은 기존 상태만 봅니다(Herdr 상태와 core 턴의 마지막 변경 시각, 마지막 working 시작 시각을 `typed_at`과 비교). 그 사이 상태가 바뀌었는데 아무도 답하지 않았으면 예전처럼 기다립니다(`moved_unanswered`). - **판단해 주세요**: omp는 붙여넣기 표시(`📄 #1`)에 줄 수가 없어 표시를 선언하지 않았습니다. 붙여넣기를 글 그대로 보여 주는 에이전트(Codex CLI)는 필요 없습니다. - **조심해서 볼 파일**: `herdr-core/src/delivery/typed.rs` - `retype_due`/`unmoved_since_typing`. 받은 글을 두 번 넣지 않는 조건이 여기 있습니다(working을 읽었거나 상태가 움직이면 다시 치지 않음, 기록 출처가 없는 에이전트는 예전처럼 다시 치지 않음). - **조심해서 볼 파일**: `hide-agent-adapter/src/composer.rs` - `Composer::holds`가 붙여넣기 표시를 읽습니다. 입력창 영역에 그 표시 한 줄만 있고 줄 수가 맞을 때만 참입니다. - **조심해서 볼 파일**: `herdr-core/src/runtime/typed_input.rs` - runtime mutex 안에서 실패 판단과 로그 한 번(`plans.input_undelivered`, 열린 입력 수로 상한). I/O 없음. - 범위: `agents.rs`의 `Live::started`는 건드리지 않았습니다. 새 시계 없음. 작업 첫 프롬프트(`type_first_prompt`)와 편지 알림 벨은 그대로입니다(편지는 자기 마감 상태가 실패를 알립니다). ## Evidence - **확인한 것**: Windows fake journey 41951563729의 OpenCode spawn-48이 실제 사례입니다. 화면은 `[Pasted ~18 lines]`, 로그에 `input.retype_held composer_not_empty`가 두 번 찍혔습니다. 그 화면 캡처를 픽스처로 넣었고 새 판단은 Enter를 누릅니다. - **확인한 것**: doorbell 테스트 `a_brief_a_starting_agent_dropped_is_typed_again_and_one_it_holds_as_a_paste_gets_its_enter`(가짜 엔진, 실제 ledger store)에서 빈 입력창(Codex CLI)은 `prompt_agent` 1번으로 다시 치고, 붙여넣기 표시(Claude Code)는 `send_keys` Enter 1번만 누릅니다(타이핑 0번). 고치기 전 조건으로 되돌리면 `Err("moved_unanswered")`로 실패합니다. - **확인한 것**: 상태가 움직인 경우(답 없으면 안 침, 답하면 침)와 working을 읽은 경우(안 침)는 runtime 테스트로, 세 번 다 쓴 경우의 실패 알림 문구와 `input.undelivered` 1번은 `a_brief_whose_typings_are_spent_tells_its_parent_it_failed_and_logs_it_once`로 확인했습니다. 붙여넣기 표시는 다섯 에이전트 캡처로 맞는 줄 수만 참, 다른 줄 수는 거짓입니다. - **확인한 것**: macOS에서 `cargo test -p herdr-core -p hide-agent-adapter` 전부 통과(herdr-core 3932, adapter 8 + 41), `clippy -D warnings`, `fmt-check`, attribution과 workstation identity 검사 통과. - **확인하지 못한 것**: 격리 후보로 실제 시작 중 드롭을 재현하지 않았습니다. 확인은 CI journey 산출물과 단위/doorbell 테스트까지입니다. Linux와 Windows 레인은 이 PR의 CI에 맡깁니다(변경은 플랫폼 공통 core와 adapter 코드). - **확인하지 못한 것**: 끝 줄바꿈이 있는 붙여넣기를 어떻게 세는지 Claude Code 쪽에서 실측하지 않았습니다(캡처는 끝 줄바꿈 없는 12줄). 틀리면 표시가 맞지 않아 예전처럼 `composer_not_empty`로 기다릴 뿐 잘못 치지는 않습니다. - **확인하지 못한 것**: 로컬 `verify-cargo.sh test`가 워크스페이스 전체를 돌릴 때 hide-holder 테스트가 실패했습니다. test xterm이 설치되지 않은 환경 문제이고 이 PR은 그 crate를 건드리지 않습니다. <details><summary>Verification record</summary> - base: main `9fd114863`, head: `c427f0b52` - 재현 근거: run 41951563729 fake windows `hided.log` spawn-48 / pane `hD:p2`; run 42076471627 agy spawn-84는 외부 편집기가 글을 받은 경우라 범위 밖. </details>
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.
Closes with-hide/hide-private#600
Summary
쉬고 있는 Codex에 Hide가 편지 알림을 막 친 순간, 입력창 버전 확인이 그 화면을 읽고 "입력창에 글이 있다"고 판단해 1분을 기다렸습니다.
확인이 고르는 "입력창이 비어 있는 순간"(지난 턴이 끝나고 아무 키도 없던 때)이 Hide 자신이 친 글을 모르고 있었기 때문입니다.
이제 pane은 Hide가 마지막으로 친 시각을 기억하고, 그 뒤의 hook이 연 턴이 끝나기 전에는 그 순간을 비어 있는 순간으로 고르지 않습니다.
지연이나 문자열 비교를 더하지 않고, Hide의 입력을 pane의 사실로 둡니다.
Review
herdr-core/src/runtime/delivery.rs-composer_check_due의 조건 하나와note_hide_typing, runtime mutex 안에서 시각만 적습니다.herdr-core/src/delivery/doorbell.rs- 편지 알림, 미션 답, brief 재입력/Enter가 치기 직전에 같은 lock 안에서 기록합니다.runtime/strays.rs의 마무리 맡기기도 같습니다.a_new_version_is_checked_once_at_a_known_empty_moment는 같은 pass에서 알림을 친 뒤 바뀌지 않는 가짜 화면을 확인해 통과하고 있었습니다(이 버그의 순서). 그 순간에 편지를 치지 않도록 고쳤습니다.Evidence
a_bell_hide_typed_is_never_read_as_a_known_empty_composer는 Codex 0.163.0 캡처(codex-0-empty,codex-1-typed)로 입력창을 그립니다. 고치기 전 코드에서는 CI 로그와 같은input.rung typed뒤composer.version_checked not_empty not_placeholder retry_after_ms=60000으로 실패하고, 고친 뒤 통과합니다.herdr-coredelivery/composer 단위 테스트 210개 통과,clippy -p herdr-core --all-targets -D warnings,fmt-check통과.--agents codex를 macOS에서 격리 후보로 5번 연속 실행: 5번 모두 Codex 15칸 전부 통과,letter_menu의 버전 확인은 매번empty·misses 0, 편지는 알림 한 번에 전달.Verification record
b78948d0a, head:542101140hided.log488-492줄, paneh6:p2.