Repository navigation
fix(antigravity): stop waiting on abandoned hook input - #21634
Conversation
|
Independent verification update:
Scoped verdict: Approve after CI, for bounded POSIX hook input and payload handling. Native loading of the replacement POSIX script, Linux/SSH execution, and Windows regressions remain unverified. |
|
Independent verification (2026-09-20):
Verdict: approve after CI for bounded POSIX hook input and payload handling. Native replacement-script loading, Linux/SSH, and Windows execution remain outside this local proof; #21635 should follow in stack order. No merge performed. |
|
Fresh CI rerun: green. ELI5: if agy's hook stops talking, Orca stops waiting instead of hanging forever. Scoped tests and CI are green; merge verdict: approve scoped hook behavior. |
|

Latest verification — 2026-09-20: Authenticated local generation now succeeds. A real tool turn emitted seven hook payloads, replayed byte-for-byte through the branch POSIX script. Native loading of the replacement POSIX script remains unverified. The earlier 401 was an authentication limitation and is resolved. All checks at the unchanged PR head are green. Earlier screenshots and test notes below describe their original runs.
ELI5
An Antigravity hook can keep waiting forever if its caller leaves the input pipe open. This lets it finish once a complete message arrives, or stop waiting after five seconds of silence. A timed-out partial message is discarded instead of being sent as a broken status update.
What Changed
The POSIX hook reuses the existing JSON reader with stricter incomplete-input handling. With Python available, complete JSON does not require the caller to close stdin. Without Python, a five-second EOF reader bounds the wait and cleans up its reader/watchdog processes. Existing offline event storage and Windows behavior are preserved.
Why
Testing #15821 found its one-second cutoff truncated a message delivered in two writes 1.5 seconds apart; its older implementation also lacked current offline event storage. This change keeps delayed complete messages and the existing replay path. It extends the shared reader while retaining its existing Grok defaults.
Linked Issue
Related: #15117, #11549. Revised approach to #15821; no issue closure claimed. Stacked on #21628 to keep this diff focused.
Visual Proof
Real generated hook scripts executed inside a hidden Orca terminal, posting to a loopback HTTP receiver.
currentis the original script;revisedis this branch. The original abandoned-input probe was killed after three seconds; the revised script exited normally in 5.08 seconds. Both preserved delayed JSON and offline storage.The terminal hosts external scripts generated from this source; the renderer is an earlier validation build. This is direct hook-process evidence, not proof of a successful installed-agy turn or a live agy hang recovery.
Testing
macOS: eight real-process payload tests pass, covering large Unicode JSON, open stdin, delayed chunks with/without Python, timed-out incomplete input, abandoned input, offline storage, stderr, and descendant cleanup. Shared reader/service/lifecycle regression run: 39 passed, two skipped; remote installer suite: 24 passed. Full
pnpm tcpasses after adding the bounded reader to the CLI project file list. Focused oxlint and changed-code quality gate passed. Full build and remaining platform coverage are left to CI.Installed agy loads the managed hook bundle, but generation returns HTTP 401
ACCESS_TOKEN_TYPE_UNSUPPORTED; actual event execution after successful generation remains unverified. No user authentication or global hooks were changed.Review
Without Python, complete JSON still requires EOF within five seconds; an open pipe times out and drops the event. Python mode uses a five-second idle timeout, not a total deadline. Real Linux/SSH execution and Windows regression checks remain pending. Remote installation keeps using the same generated POSIX script; no protocol change.
Agent skill upstream boundary
Checklist