Repository navigation
fix(antigravity): launch POSIX hooks through an explicit shell - #21635
Conversation
|
Independent verification update:
Scoped verdict: Approve after CI for explicit |
|
Independent verification (2026-09-20):
Verdict: approve after CI, stacked on #21634, for explicit |
|
Fresh CI rerun: green. ELI5: POSIX hooks now run through the shell they need, so valid hook scripts do not fail because Orca launched them the wrong way. Scoped tests and CI are green; merge verdict: approve scoped hook behavior. |
|
This run was cancelled 🛑 The workflow was cancelled before completion. Please check the link below for details. |

Latest verification — 2026-09-20: Authenticated local generation now succeeds; the earlier 401 is resolved. Real captured hook payloads pass the branch POSIX script. Actual Zed/ACP recovery and live Linux/SSH wrapper execution remain unverified; do not infer them from the process tests. All checks at the unchanged PR head are green. Earlier screenshots and test notes below describe their original runs.
ELI5
Some Antigravity hosts launch a hook as a program. Orca gave them a command starting with the shell keyword
if, so the hook could not start and tool calls were denied. Orca now explicitly starts the shell that understands that command.What Changed
Antigravity's local and remote POSIX installers wrap the existing guarded command in
/bin/sh -c. The missing-script permission response, quoting, and current environment guard are preserved. Other agent installers and Windows commands keep their existing behavior.This takes over the approach from @maxmilian's #16222 onto current code, preserving the newer environment guard and adding executable tests for missing environment, missing/non-executable files, and unusual paths. Stacked on #21634.
Why
Using an explicit shell works with both direct program launchers and callers that already invoke a shell. Launching the script directly would lose the guard and permission response when the script has been removed.
Linked Issue
Addresses #16087; continuation of #16222. No issue closure claimed until actual ACP integration is verified.
Visual Proof
Real Python
shlex.splitand subprocess execution, using generated hook scripts inside a hidden Orca terminal. The lower comparison uses this rebased source. Before: direct execution fails withENOENT: if. After: both launch paths return{"decision":"ask"}, with the script present or missing. Paths include spaces, quotes, dollar signs, backticks, and Unicode.The terminal is an earlier renderer build hosting newly generated scripts. This proves the command-launch behavior; it is not a successful Zed/ACP tool-call demonstration.
Testing
macOS: 41 tests pass across the executable wrapper, Antigravity service, and remote installer suites. Full
pnpm tcpasses after adding the inherited bounded-reader CLI project entry and using the typed async process runner in the executable tests. Changed-code quality gate and pre-commit lint cover the changed files. Full build and other platforms remain for CI.Review
Actual Zed/ACP recovery remains unverified. Installed agy has no advertised ACP subcommand. Authenticated generation now succeeds (see latest verification above). Linux/SSH execution and actual Windows regression testing remain pending. Remote installer tests verify generated commands, not a live SSH host. The missing-script fallback still expects EOF; #21634's bounded reader applies when the managed script exists.
Agent skill upstream boundary
Checklist