# Antigravity swarm lifecycle capture

Linux Electron app, built separately from base a1b9e1cc8709d50190bf8e1f50e94257ce206525 and head 99461bb66a3edcb2b5ae920ec104da04cfcc4601. Both use a fresh isolated T3 home, synthetic git project, light theme, and 1100×780 app viewport. No production database was copied.

The generic replay scenario runner cannot exercise provider-specific swarm behavior, so these captures use real Claude Haiku 5.5 and Antigravity Gemini 4 Neon (Low). Antigravity uses Gemini API-key mode through the supplied test hub. The actual executable is managed agy 1.5.13, installed from T3 settings. A launcher adds `--dangerously-skip-permissions` to `acp` invocations on both sides. Without this flag, an initial head attempt reached worker command approval timeouts rather than executing the sleeps. The flag is a setup difference from the report's default runtime, and is disclosed rather than treating that first attempt as a pass.

## Setup performed on each side

1. Install dependencies with `vp i -- --package-import-method=copy` and build with `vp run --filter @t3tools/desktop build:bundle`.
2. Fetch Electron with `node node_modules/electron/install.js` from apps/desktop.
3. Start Electron under `headless-desktop`, with an isolated `T3CODE_HOME`, `T3CODE_DEV_SEED=0`, the supplied `GOOGLE_GEMINI_BASE_URL`, separate XDG directories, `--no-sandbox --disable-gpu`, and a separate remote debugging port.
4. Enable built-in Antigravity, choose Gemini API key, provide a non-empty synthetic key, and connect. Install managed runtime 1.5.13 from its provider settings. Set its binary path to the following launcher (AGY_MANAGED is the managed executable's path):

```sh
#!/bin/sh
if [ "$1" = acp ]; then exec "$AGY_MANAGED" "$@" --dangerously-skip-permissions; fi
exec "$AGY_MANAGED" "$@"
```

5. Initialize an empty synthetic git project and add it through `node apps/server/src/bin.ts project add --base-dir .t3 --title 'Swarm lifecycle demo' "$WORKSPACE"`.
6. Start a Claude thread using `thread start --base-dir .t3 --provider claudeAgent --model claude-haiku-5-5 --title 'Swarm lifecycle retry' --json "$WORKSPACE" "$PROMPT"`.

Exact prompt used on both compared runs:

> Use the T3 delegate_task tool to delegate one task to built-in Antigravity using Gemini 4 Neon (gemini-4-neon), full-access runtime, shared isolation. Ask the coordinator to launch exactly two real Antigravity swarm workers. Each worker must run sleep 120, then write its own file worker-a.txt or worker-b.txt with a completion message, then report to @coordinator. Coordinator must end its initial prompt after launching workers, then give a final report when both finish. Do not use shell background jobs instead of swarm workers. Permissions are preapproved in the provider runtime. Wait for final completion. Do not launch any native agents. This is an authorized lifecycle reproduction.

The head thread needed a follow-up after correcting the launcher's filename to `agy`, which T3 requires for executable detection: "The executable is now repaired. Refresh capabilities and run the same authorized reproduction exactly as requested." The base ran after that correction. Claude also made an unwanted no-op native placeholder call on the base; it finished with no work and was not used as a swarm worker.

7. Open the Claude thread using its environment/thread URL, then open the delegated Antigravity thread through the task link. Observe its status after the coordinator's launch message and through the workers' expected finish time.
8. Capture through CDP with the attached scripts. `PROOF_CHECKOUT` locates the checkout and `CDP_PORT` selects the desktop instance. `public-drive.mjs` supports text, eval, click, fill, press, goto, and shot. `public-record.mjs OUTPUT_DIR` captures 150 frames roughly one second apart plus screenshot overhead. Videos encode these frames at 3 fps for accelerated playback; the app's elapsed labels retain their real values. `public-still.mjs OUTPUT_PNG` saves only after screenshots 500 ms apart are byte-identical.
9. Inspect screenshots and video contact sheets before upload. Compare the actual workspace files and the real provider's transcripts, without uploading private profile paths.

Observed: base completes at 19 seconds with only the launch message and no completion files. Head remains active while worker transcripts contain background sleep tasks, receives worker board messages, verifies both files, and completes at 2m 56s with the coordinator's final report and a two-file diff.
