Repository navigation
[Bug]: Custom Antigravity binary fails with wrapper scripts (.cmd/.bat) due to rigid localharness_external sibling check #12752
Description
Activity
Triage
Confirmed against shipping v0.0.42 and current
main. This is a real Windows custom Antigravity binary limitation, not a desktop-only bug, not a missing managed install, and not the Linux aarch64 custom-path tickets.The filed copy matches the server:
Not found— The custom Antigravity executable or its localharness_external sibling is missing or not executable.Unavailable— Antigravity could not complete its local health check.
Area is
apps/server, notapps/desktop. Desktop only hosts the server that resolves and spawns the ACP pair.What the code does
1. Custom
binaryPathis a same-directory pair. There is no managed-harness fallback.Resolution lives in
apps/server/src/provider/AntigravityInstallation.ts(fromExternal— there is noresolveSiblingExternalBinary). For an override it:- Requires the custom path to be a real file (
agy-wrapper.cmdcounts as a file on Windows; execute-bit is not checked). - Requires
localharness_external.exein that same directory. - Otherwise fails immediately with the sibling error above. It does not fall back to the managed tool dir or to
PATH.
That pairing is intentional. Docs say to extract
agy_acp_serverandlocalharness_externalinto the same directory, at the same version. Tests assert an override without a sibling fails and does not fall back (honors explicit paths and reports invalid overrides without falling back).A placeholder
localharness_external.cmdstill fails resolve: the Windows harness name islocalharness_external.exe. A copied real.exenext to the wrapper does pass resolve.2. Passing resolve and then hanging is the Windows
.cmdACP spawn path.Spawn is
buildAntigravityAcpSpawnInput→AcpSessionRuntime→resolveSpawnCommand(packages/shared/src/shell.ts). On Windows,.cmd/.batis routed withshell: true(cmd.exe /c). ACP is JSON-RPC over stdin/stdout; that shell hop commonly breaks or stalls the handshake.On v0.0.42 the provider probe still spawned, so this showed up as the generic health-check line. On
main(#12008) the probe is disk-only and does not spawn. Symptom shift:Setup v0.0.42 mainWrapper, no localharness_external.exesiblingSibling resolve error Same Wrapper + copied/real .exesiblingHealth-check hang / generic unavailable Disk probe can pass; session / sign-in still spawn and can hang 3. Mixing a custom wrapper with the managed harness is not free.
ANTIGRAVITY_HARNESS_PATHis injected from the resolved sibling. Falling back to the managedlocalharness_externalwhen the wrapper is a different release can fail or hang worse than the current hard reject. Same-version pairing is the constraint, not just “file lives next door.”Related, not duplicates
Work Why it does not close this #12477 / #12490 Linux aarch64 custom/managed health check. Different host and cause. #12722 Expands ~/and directory custom paths so a CDN extract of the real pair resolves. Does not accept wrappers or a missing sibling.#10932 agyCLI vs ACP runtime. This path already found a custom file.#12008 Probe no longer spawns. Changes where the .cmdhang appears; does not fix resolve or spawn.Unique combination: Windows + custom wrapper /
.cmdpath + rigid sibling check (and ACP stdio throughcmd.exeonce a sibling exists).Workaround (supported)
Point Binary path at the raw unpacked
agy_acp_server.exein the directory that also containslocalharness_external.exe(managed install, or a same-version manual extract). Do not point it at a.cmd/.batwrapper or atagy.Env / temp isolation the wrapper was meant to provide is already applied by T3 (
prepareAntigravityProfile, per-processTMPDIR). Prefer that over an intermediate launcher.Suggested fix
Keep the same-directory pair as the documented custom install.
- Bug: ACP spawn on Windows must keep stdin/stdout when
binaryPathis.cmd/.bat(unwrap to a real.exe, or avoidcmd.exe /cfor this protocol). Claude already unwraps npm.cmdshims for a similar reason. - Enhancement (optional, careful): if the custom file exists but has no harness sibling, fall back to the same-version managed
localharness_externalonly. Do not pair a wrapper with a different harness.
No extra logs needed to place this. A redacted
server.trace.ndjsonaroundAntigravityInstallation.resolve/AcpSessionRuntimespawn would still help confirm the.cmdhang on a real session start.- addedbugSomething is broken or behaving incorrectly.Something is broken or behaving incorrectly.acceptedfeature request acceptedfeature request acceptedvia-triageFiled through npx t3 triageFiled through npx t3 triage
on Sep 20, 2026 I'd like to take this — I'll prepare a focused fix and regression coverage.
Before submitting
Area
apps/desktop
Steps to reproduce
agy-wrapper.cmdor a proxy executable) to wrapagy_acp_server.exe(e.g., to set custom environment variables or isolate temp directories).binaryPath) to this wrapper.The custom Antigravity executable or its localharness_external sibling is missing or not executable.localharness_external.cmdor copy is placed alongside it, the health check fails or hangs with:Unavailable · Antigravity could not complete its local health check.Expected behavior
localharness_external.exeto reside in the exact same directory (e.g., fall back to the managed tool directory forlocalharness_external)..cmdor proxy executables.Actual behavior
resolveSiblingExternalBinarycheckspath.join(path.dirname(binaryPath), "localharness_external" + ext). If missing, it immediately rejects the binary. If present, standard I/O pipe inheritance through Windowscmd.exe /cbreaks the ACP JSON-RPC handshake.Impact
Minor bug or occasional failure
Version or commit
0.0.42 (and main)
Environment
Windows 11 x64, T3 Code Desktop 0.0.42
Logs or stack traces
Workaround
Must invoke the raw unpacked
agy_acp_server.exedirectly from its directory withlocalharness_external.exepresent alongside it; cannot use wrappers or intermediate launchers.Suggested Fix
localharness_externalresolution check the bundled/managed tool directory as a fallback whenbinaryPathis a custom path without its ownlocalharness_external.binaryPathhas a.cmdor.batextension.