fix(code): pass hook-fix and review prompts via argv, not stdin - #11
Merged
Conversation
TUI-first harnesses (Grok Build, Kimi, Goose, Qwen, Antigravity, Pi) open an interactive session when no prompt flag is set, then exit with ENXIO / "Device not configured" when stdin is a pipe. Positional CLIs (Codex, Cursor, Opencode) never saw the piped prompt either. The main implementation path already used buildPromptArgs. Hook fixer, address-review, auto-review, and the webhook review runner now share the same headless argv + ignored-stdin spawn. Signed-off-by: Daniil Pokrovsky <daniil.pokrovsky@gmail.com>
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
devintern DAN-6committed successfully, then died while auto-fixing the pre-push hook:That is ENXIO. Grok Build (and other TUI-first CLIs) open an interactive session unless the prompt is passed as a flag (
grok -p,kimi --prompt,goose -t, …). The hook fixer still piped the prompt on stdin withstdio: ["pipe", "pipe", "pipe"], so Grok tried to attach a TTY and crashed.Does this affect other harnesses? Yes.
Device not configured/ hang-pThe main implement / clarity / estimate path was already fixed (CHANGELOG 2.1.0). This PR updates the leftover spawn sites:
address-review--auto-review)All four now share
buildHeadlessAgentArgs+ ignored stdin.Test plan
bun test packages/code/tests/agent-spawn.test.ts packages/code/tests/git-hook-fixer.test.ts-pinstead of crashing immediatelydevintern address-review <pr-url>withAGENT_HARNESS=grok