You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Custom Antigravity binary fails with wrapper scripts (.cmd/.bat) due to rigid localharness_external sibling check #12752
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/desktop
Steps to reproduce
Create a custom wrapper script on Windows (e.g., agy-wrapper.cmd or a proxy executable) to wrap agy_acp_server.exe (e.g., to set custom environment variables or isolate temp directories).
Point Antigravity's custom binary path (binaryPath) to this wrapper.
Observe health check failure: The custom Antigravity executable or its localharness_external sibling is missing or not executable.
If a placeholder localharness_external.cmd or copy is placed alongside it, the health check fails or hangs with: Unavailable · Antigravity could not complete its local health check.
Expected behavior
T3 Code should allow custom binaries/wrappers without strictly requiring localharness_external.exe to reside in the exact same directory (e.g., fall back to the managed tool directory for localharness_external).
Windows process spawning for ACP should reliably handle standard I/O pipes (stdin/stdout) when invoking .cmd or proxy executables.
Actual behavior
resolveSiblingExternalBinary checks path.join(path.dirname(binaryPath), "localharness_external" + ext). If missing, it immediately rejects the binary. If present, standard I/O pipe inheritance through Windows cmd.exe /c breaks 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
Not found: The custom Antigravity executable or its localharness_external sibling is missing or not executable.
# Or:
Unavailable: Antigravity could not complete its local health check.
Workaround
Must invoke the raw unpacked agy_acp_server.exe directly from its directory with localharness_external.exe present alongside it; cannot use wrappers or intermediate launchers.
Suggested Fix
Make localharness_external resolution check the bundled/managed tool directory as a fallback when binaryPath is a custom path without its own localharness_external.
Ensure stdio options and process spawning on Windows correctly pipe stdio when binaryPath has a .cmd or .bat extension.
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, not apps/desktop. Desktop only hosts the server that resolves and spawns the ACP pair.
What the code does
1. Custom binaryPath is a same-directory pair. There is no managed-harness fallback.
Resolution lives in apps/server/src/provider/AntigravityInstallation.ts (fromExternal — there is no resolveSiblingExternalBinary). For an override it:
Requires the custom path to be a real file (agy-wrapper.cmd counts as a file on Windows; execute-bit is not checked).
Requires localharness_external.exe in 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_server and localharness_external into 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.cmd still fails resolve: the Windows harness name is localharness_external.exe. A copied real .exe next to the wrapper does pass resolve.
2. Passing resolve and then hanging is the Windows .cmd ACP spawn path.
Spawn is buildAntigravityAcpSpawnInput → AcpSessionRuntime → resolveSpawnCommand (packages/shared/src/shell.ts). On Windows, .cmd / .bat is routed with shell: 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
main
Wrapper, no localharness_external.exe sibling
Sibling resolve error
Same
Wrapper + copied/real .exe sibling
Health-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_PATH is injected from the resolved sibling. Falling back to the managed localharness_external when 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.”
Probe no longer spawns. Changes where the .cmd hang appears; does not fix resolve or spawn.
Unique combination: Windows + custom wrapper / .cmd path + rigid sibling check (and ACP stdio through cmd.exe once a sibling exists).
Workaround (supported)
Point Binary path at the raw unpacked agy_acp_server.exe in the directory that also contains localharness_external.exe (managed install, or a same-version manual extract). Do not point it at a .cmd / .bat wrapper or at agy.
Env / temp isolation the wrapper was meant to provide is already applied by T3 (prepareAntigravityProfile, per-process TMPDIR). 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 binaryPath is .cmd / .bat (unwrap to a real .exe, or avoid cmd.exe /c for this protocol). Claude already unwraps npm .cmd shims 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_external only. Do not pair a wrapper with a different harness.
No extra logs needed to place this. A redacted server.trace.ndjson around AntigravityInstallation.resolve / AcpSessionRuntime spawn would still help confirm the .cmd hang on a real session start.
Activity
juliusmarminge commentedon Sep 20, 2026
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:agy-wrapper.cmdcounts as a file on Windows; execute-bit is not checked).localharness_external.exein that same directory.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:mainlocalharness_external.exesibling.exesibling3. 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
~/and directory custom paths so a CDN extract of the real pair resolves. Does not accept wrappers or a missing sibling.agyCLI vs ACP runtime. This path already found a custom file..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.
binaryPathis.cmd/.bat(unwrap to a real.exe, or avoidcmd.exe /cfor this protocol). Claude already unwraps npm.cmdshims for a similar reason.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.cestercian commentedon Sep 21, 2026
I'd like to take this — I'll prepare a focused fix and regression coverage.