Subject: antigravity-cli — install/update always produces an empty package (binary missing), traced to two bugs in the consolidate pipeline Diagnosis and workaround below were prepared with Claude Code (Anthropic's CLI agent), running on this box under the aicliagents plugin itself — it traced the failure through the plugin's own logs and source rather than me guessing. Plugin version: 2026.09.15.08 Agent affected: antigravity-cli (curl_install source) Symptom: After updating or reinstalling antigravity-cli via the Store card, the workspace fails to launch with: [Agent Binary Missing] The agent binary was not found. Expected: .../agents/.versions/antigravity-cli/agent_antigravity-cli_consolidated_.../home/.local/bin/agy What was found (via lifecycle.log / debug.log and reading the plugin source): 1. Side-by-side install runs for a curl_install agent, which AgentHandler.php itself documents as unsupported. AgentHandler::sideBySideInstallBlocker() (includes/handlers/AgentHandler.php:253) explicitly states curl_install agents aren't ready for side-by-side installs because their vendor script "lands its binary inside a captive home directory inside the agent's own tree." Despite that, lifecycle.log shows an antigravity-cli upgrade going side-by-side anyway: [MOUNT] Agent antigravity-cli: generation ...0001... is still in use — installing ...0002... alongside it (no session closed). 2. The real breakage: consolidate_layers's pre-bake mount refresh wipes the writable layer before packaging it. In src/scripts/storage/storage_ops.sh, the block labeled WP #1246 remounts the overlay ("refresh... before reading the merged view") right before mksquashfs runs. For antigravity-cli, this refresh was confirmed to empty the writable (zram) upper directory: the real agy binary was manually installed (via Google's own https://antigravity.google/cli/install.sh, HOME/PREFIX pointed at the live generation dir) and verified working (agy --version → 1.2.8, 207MB on disk). Running the plugin's own install-bg.php afterward (which re-invokes consolidate_layers) baked a new squashfs at 4096 bytes — i.e. it discarded the populated upper dir and shipped an empty layer, same as every prior attempt. Confirmed via atomic_write_layer log lines (bytes=4096) on every one of 3 separate install attempts across two plugin versions (1.2.4 upgrade, 1.2.8 fresh install, 1.2.8 re-consolidate). Trace IDs for reference: 938fcf06 (upgrade attempt), d1918f1e (fresh install attempt). Impact: Every install/update of antigravity-cli on this system has produced an unusable agent since upgrading to 2026.09.15.08. A workaround (running the vendor install script by hand into the live mount, without letting the plugin's own consolidate re-run) gets it working again, but it only lives in the RAM-backed overlay and is wiped on reboot or the next Store-card action that triggers consolidate. Ask: Could someone check storage_ops.sh's WP #1246 pre-consolidate refresh path for curl_install-sourced agents (or specifically agents that were side-by-side-installed) — it looks like the refresh isn't preserving the correct upper dir before mksquashfs runs. --- Root-cause tracing and the working-again fix above were done end-to-end by Claude Code — reading lifecycle.log/debug.log, walking through AgentHandler.php/CurlInstallSource.php/storage_ops.sh, and reproducing the byte-for-byte empty-package result three times before landing on the actual mechanism. Happy to have it dig further if a maintainer wants more specific repro data. Just the human here wanting to say that I really enjoy this plugin so thanks! Matt UPDATE: (2026-09-27): This just reproduced again on a real update — not just my own reinstall testing. I updated antigravity-cli through the Store card as usual (not manually), and it hit the identical failure: lifecycle.log shows the same signature (old_size_mb: 0 → a 4096-byte consolidated .sqsh), this time on generation agent_antigravity-cli_consolidated_0000000005_20260926T231458Z, going from 1.2.8 → the then-latest 1.2.11: 2026-09-26T23:14:48Z | installer | agent_install_target_resolved | {"agent":"antigravity-cli",...,"version":"1.2.11","fallback":false,"explicit":true} 2026-09-26T23:14:57Z | StorageMountService | consolidate_start | {"type":"agent","id":"antigravity-cli","old_size_mb":0} 2026-09-26T23:14:59Z | atomic_write_layer | atomic_write_ok | {...,"final":"agent_antigravity-cli_consolidated_0000000005_20260926T231458Z.sqsh","bytes":4096} So this is now confirmed across 5 separate installs (2 plugin versions, 2 antigravity-cli target versions, both explicit-version and "latest" upgrade paths) — it's not something specific to how I was triggering it initially. Every single install/update of antigravity-cli since the 2026-09-17 plugin upgrade has produced an empty package on this system. Reapplied the same manual workaround (installing the real vendor binary directly into the live generation mount, without letting the plugin's consolidate step touch it) and it's working again (agy 1.2.12). Update (2026-09-28): Confirmed and fixed for good — not just patched in RAM this time. Had Antigravity run the actual repair itself, using the exact fix it identified: it called the plugin's own atomic_write_layer() function, but passed it agent_mount_real("antigravity-cli") (the already-resolved real directory) instead of the buggy symlink path the plugin's own op_consolidate normally uses. Result — verified independently on my end too: - New persisted layer: agent_antigravity-cli_consolidated_0000000006_20260927T212043Z.sqsh, 45,555,712 bytes (vs. the previous 4,096-byte empty dummy) - unsquashfs -l confirms it actually contains home/.local/bin/agy, VERSION, and the full directory tree — a real package this time - Plugin's own storagectl.sh status reports "outcome":"ok", "mounted":true, layer registered correctly in layer_manifest.json with checksum - Old broken 4KB layer was cleanly removed So antigravity-cli is now genuinely working and should survive a reboot — this was hand-applied outside the Store UI (since the UI's own install/update path still has the underlying bug), but it proves the one-line fix works cleanly with zero side effects on the plugin's own manifest/mount bookkeeping. tl;dr for whoever picks this up: storage_ops.sh line ~1600 just needs $MNT_POINT swapped for $_MOUNT_POINT_REAL (or the equivalent agent_mount_real "$ID" call) before it's handed to atomic_write_layer. Everything downstream of that already works correctly once it's given a real path instead of a symlink.