Repository navigation
fix: read Grok's suggestion and Windows marker as an empty composer - #1517
Merged
Merged
Conversation
…composer Grok 1.0.52 draws the next prompt it predicts after a turn as italic ghost text in the empty composer, and draws its prompt arrow as '>' on a console it takes for Windows' legacy one, as a Herdr pane on Windows is. The declaration read the suggestion as typed text and found no composer on Windows. Italic (SGR 3) is now a placeholder style, a declaration may name more than one marker, and Grok's empty composer is nothing or italic text only.
The journey's composer cell sends 8 Backspaces before each screen read and gave the whole step 30 s. Codex and Antigravity keep a 12-line paste as 275 characters of text, which took 35 reads; a macOS read takes about a second, so the clear stopped at 248 Backspaces and failed. The 30 s now counts from the last key the step sent.
…ste that submits The cell pasted its twelve lines with LF breaks, a form Hide's terminal never sends: xterm.js turns each break into CR. Grok 1.0.52 on Windows took the LF paste as eleven prompts, which spent its request budget and failed later cells with no word of the cause. The cell now pastes with CR breaks, and Hide's reader counts the session's prompts after each step, so keys that start a turn fail the cell at that step.
yansfil
added a commit
that referenced
this pull request
Oct 21, 2026
Closes #1520 ## Summary On Windows, starting an agent could tie up Hide for minutes, and every other spawn on the machine was refused `spawn_busy` meanwhile. Herdr refuses a start while anything besides the shell runs in the pane. On Windows that means any child process of PowerShell, but Herdr's process reading (which Hide checks first) only names children that are agents. So Hide kept seeing "ready" and re-sent the start with no pause: 5,613 times in 30 s for one start on CI, while holding the machine's spawn lock. What changes: after Herdr refuses a start as busy, Hide asks again once every 100 ms inside the same 30 s wait. When the wait ends, it logs `agent_start` / `pane_busy.timeout` and the spawn answers a new refusal, `pane_busy`, with nothing typed and a next action: let that program finish or end it, then run the same command with the same intent, which starts in the same pane. A refused spawn in the agent journey now records the processes under the pane's shell (pid, parent, name), the one record of what held the pane. 스크린샷 없음: no screen changes; the start path, a CLI refusal code and the journey's evidence. ## Review - **판단해 주세요**: a new CLI refusal code, `pane_busy`, for a spawn whose pane Herdr kept refusing. The alternative was the existing `agent_not_started`, but that one means a start was typed and ended, and its next action asks for a new intent. - **조심해서 볼 파일**: `herdr-core/src/agent_start.rs` - the start's wait loop; the failure path and the spawn lock's hold time (bounded by the same 30 s, now about 300 Herdr calls at most instead of thousands). - **조심해서 볼 파일**: `contracts/hide-cli.json` - the contract digest changes because `agent spawn` gains a refusal. - **질문**: why PowerShell has a non-agent child for minutes in a Hide-made pane on Windows is not known yet. The journey's new evidence names it the next time a spawn is refused. ## Evidence - **확인한 것**: Windows journey runs 39640248449 (two attempts, Codex then OpenCode refused) and the Herdr log of attempt 1: one start (`request_id="spawn-11"`) sent 5,613 `agent.start` calls about 8 ms apart, all refused. Each journey retry got `spawn_busy` or `request_timeout` for the whole 150 s. - **확인한 것**: Herdr v0.9.5's Windows source: `available_pane_shell_from_snapshot` refuses a shell with any descendant, while `select_pane_foreground_job_from_snapshot_with_runtime_inspection` returns the shell unless a descendant identifies as an agent. - **확인한 것**: `a_pane_herdr_keeps_refusing_as_busy_is_asked_once_a_poll_until_the_deadline` fails without the pause and passes with it; 27 `agent_start` tests, 467 hided lib tests, the hided contract tests, clippy, fmt and the agent-journey script tests pass. - **확인한 것**: fake-model journey run https://github.com/with-hide/hide/actions/runs/39647927197 (head b403134, with #1517): green on Linux, macOS and Windows; on Windows all 7 agents pass every declared cell and every spawn answered on its first try. - **확인한 것**: in that Windows run Herdr refused no spawn's `agent.start` (the 10 refused calls are paced wake retries waiting for a name), and Herdr's log is 133 KB, where one spinning start had filled its 1 MiB cut. - **확인하지 못한 것**: this run never met the busy state, so it proves the lane and no regression, not the paced wait under a held pane; that is the unit test's claim. Which PowerShell child held the pane before is still unknown; the new evidence names it if a spawn is refused again. <details><summary>Verification record</summary> </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.
Related: #1504
Summary
The release candidate run 39630167240 fails the agent journey's
composercell on every system, so no candidate can pass.Two separate causes:
>instead of❯, so Hide found no composer at all.What changes: italic text now counts as Grok's empty-composer placeholder (typed text and the paste chip are never italic), Grok's marker may be
❯or>, and the cell's 30 s wait now starts after the last key it sent.The cell also pastes the way Hide's terminal does (CR between lines, not LF): the LF form, which Hide never sends, made Grok on Windows submit each line as a prompt. A step after which the session holds a new prompt now fails the cell there.
스크린샷 없음: no screen changes; the composer parser and the journey check only.
Review
ghost_text_style(dim + italic) on every system; voice-capture interim words are also italic and would read empty. Accept?hide-agent-adapter/src/declarations.rs- Grok's declaration decides when a held letter may go in (failure path: a wrongemptyrings over the operator's draft).hide-agent-adapter/src/composer.rs-markeris now a list; Claude Code, Codex, omp and agy keep one marker each, OpenCode and Pi none.scripts/agent_journey/composer.py- the step's 30 s counts from the last key; an erase can now take up to 50 reads plus 30 s.Evidence
pane read --format ansi: the suggestion is SGR 3 + (88,88,88), typed text (225,225,225) plain, the paste chip plain (200,200,200) on (17,17,17).GROK_FORCE_LEGACY_CONSOLE=1(the console Grok picks on Windows) draws>and the same italic suggestion; 14 captures are new fixtures, judged ingrok_reads_its_suggestion_as_empty_on_either_console.cargo test -p hide-agent-adapter(composer: 4 tests), clippy, fmt, the 161 agent-journey script tests, the workstation identity scan.>was reproduced through Grok's own override on macOS, and the journey run below is what proves Windows.composerpasses for every agent that started, Grok's every cell included.[Pasted]chip and starts no turn (the LF form in run 39635682277 submitted 11 prompts).startfailed withspawn_busyin each attempt (Codex in attempt 1, OpenCode in attempt 2), each passing in the other attempt. Flaky, outside this diff, filed as Flaky check: an agent journey start on Windows is refused spawn_busy while its first start loops on agent_pane_busy #1520 with the cause found so far (a start loop that re-sendsagent.startwithout pause onagent_pane_busywhile holding the spawn lock).Verification record