Repository navigation
fix(team): prevent Antigravity CLI coordination hangs - #1032
Open
harrytuckerr wants to merge 25 commits into
Open
harrytuckerr wants to merge 25 commits into
harrytuckerr wants to merge 25 commits into
Conversation
WS-5: write "timeout": CALLBACK_TIMEOUT + 20s into the hooks.json handler, from one shared constant in aionui-api-types, so agy's 30s handler default (hooks.md:132-133) no longer kills the hook while the permission card is still open; the hook now always answers for itself with a fail-closed denial. The callback wait itself is unchanged at 240s. WS-6: on Windows install .agents/aionui-permission-hook.cmd and point hooks.json at its bare name (agy sets the handler cwd to the hooks.json directory, hooks.md:129-133); the wrapper carries the dunce-canonicalized binary path, and a canonicalization failure is propagated rather than silently replaced by the original path, which may be the \\?\ verbatim form the wrapper exists to keep out (#4095, reporter-observed). remove_hooks_json removes the wrapper with hooks.json. The Unix command form is unchanged. Sources: hooks.md (installed agy-customizations docs); argv.rs --print-timeout 1h; ~/aion/protocols/samples/agy/1.4.2/root-probe-help.txt for agy's own default 0. Windows runtime not exercised (no tester); wrapper format is pinned by a cross-platform test.
write_hooks_json canonicalizes the binary before embedding it in the Windows wrapper (ed69d303), so tests handing it placeholder /opt paths would fail on Windows by design. Create a real temp stub file instead.
Record the result status token, outcome class, failed-step count, whether a result frame arrived, and the process exit. Do not change how a missing or present result is classified as success or failure.
Warn with status, outcome, and wire_error when an error TurnResult is processed, instead of waiting for stdout EOF. After EOF, log the immediate watcher state and one 200ms follow-up without inventing an exit code. Absent results now log result_status=absent and exit_state. Wire classification is wire_success or wire_error. The append_delta rustdoc stays on append_delta. Synthesis mapping is unchanged. Checks not run: ENOSPC.
…store Move the wrapper file name into AntigravityHookConfig so the session layer can name it without depending on aionui-ai-agent, and expose prepare_wrapper_body: None off Windows, Some(contents) on Windows, canonicalization errors propagate (never a fallback to the original path, which may be the \\?\ verbatim form #4095 is about). The antigravity factory prepares that wrapper beside permission_hook_body and carries it through SessionBuildInputs and SessionConfig. Prepared only — a full-auto session still installs no gate, and nothing here writes a file. conn.rs is untouched; the mode-switch sync consumes the field in a follow-up.
needs_runtime=false commands still called enhance_process_path, which blocks up to 3s on a login shell before stdin. Gate that probe to the server, doctor, and prepare-managed-resources. Helpers keep the inherited PATH. No helper command spawns an agent, so none stays on the enrichment path. Tests not run: root compiles.
Build helper-vs-runtime cases with Cli::try_parse_from so the test does not name arg-struct fields that integrated WS-1 adds. Selection behavior is unchanged. Tests not run: root compiles.
The mode-switch path rewrote only hooks.json, so on Windows a session that left full auto restored a hooks.json naming a wrapper that was never written. sync_permission_hook now manages both files: full auto removes hooks.json and the wrapper (NotFound ignored on each); leaving full auto writes the prepared wrapper FIRST and aborts on failure, so hooks.json is never published pointing at a missing file, and a failed wrapper write is logged as such instead of claiming the gate was restored. The wrapper file name moves to aionui-common and is re-exported on AntigravityHookConfig, because aionui-session deliberately depends only on aionui-common + aionui-process and could not otherwise name the file. Tests: Windows lifecycle (both files restore/delete), Unix wrapper-free restore, and a cross-platform failure test proving a failed wrapper write leaves hooks.json unpublished. Source for the cmd/handler contract: the installed agy-customizations/docs/hooks.md, "Hook Handler Fields".
hooks.md documents that agy runs handlers through cmd /c; it does not prove a quoted absolute path is mangled. Attribute that to the reporter-observed #4317 stderr (a regression of the #4095 verbatim-path fix) instead of the doc.
harrytuckerr
marked this pull request as draft
October 20, 2026 23:46
harrytuckerr
marked this pull request as ready for review
October 20, 2026 23:46
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.
Team CLI commands could wait indefinitely for stdin EOF, preventing an Antigravity teammate from reporting its result. This change bounds input reads, documents foreground helper calls, and translates team permission selections per backend.
Changes:
{}config updates; normalize UTF-8/UTF-16 BOMs; report only safe input metadata. Source:crates/aionui-app/src/commands/json_input.rsand the command handlers.crates/aionui-team-prompts/src/team_tool_usage.rs,crates/aionui-app/src/commands/team_capabilities.rs, andcrates/aionui-app/src/main.rs.crates/aionui-session/src/backend/antigravity/conn.rsandcrates/aionui-team/src/session.rs.crates/aionui-team/src/service.rsandcrates/aionui-session/src/backend/antigravity/argv.rs.crates/aionui-ai-agent/src/antigravity_hook.rsandcrates/aionui-session/src/backend/antigravity/conn.rs.crates/aionui-session/src/backend/cli_version.rs. The prompt transport remains unchanged.Validation:
just pushgate onbfc8235c: migration immutability, workspace lint/fixes, formatting and 9,439 tests passed (52 skipped).Limits:
Protocol sources were inspected locally. Raw captures, logs, account details and machine-specific evidence paths are intentionally omitted from this public PR.
Related: AionUi #4322, #4317, #4294, #4095.