Parallel Full-Stack Upgrades with /swarm in Antigravity CLI

Run multiple Antigravity CLI agents in parallel with Gemini 4 Neon using Git worktrees and a shared message board.

Nov 25, 2026 · 7 minutes read · [Generative AI] [Gemini] [Antigravity] [Multi-Agent]

Illustration showing the Antigravity icon orchestrating three parallel worker lanes converging into a single verified merge.

Google Antigravity recently released /swarm (in preview) alongside Gemini 4 Carbon, letting you run a group of agents together directly from the Antigravity CLI and app. Shortly after, Gemini 4 Neon rolled out as a faster, lower-cost model built for everyday coding tasks.

In a previous post, we looked at how parallel subagents in Antigravity CLI can speed up unit test generation on a single file. Upgrading an entire full-stack repo across backend, frontend, tests, and docs is a different story. When a single agent works through a long list of changes step by step, it takes much longer, fills up its context window, and leaves you with one giant diff to review.

I wanted to see how /swarm and Gemini 4 Neon behave, so I tried a full-stack upgrade on my Pet Shelter App (Angular 21, Express, and Firebase). Using Gemini 4 Neon (Medium) across the whole swarm, six agents split the work through a shared message board and separate Git worktrees. In about 12 minutes, they updated more than 40 files and got 31 tests passing with zero merge conflicts.

In this post, let’s look at how /swarm works, how we divided the files so agents would not edit the same code, and how Git worktrees kept the final Pull Request clean.

The Architecture: Coordinator, Shared Board, and Worktrees

A /swarm session is organized around a Coordinator and a group of Workers, each running in its own conversation:

  • Coordinator. The only agent that talks directly to you. It breaks down the work, assigns tasks, tracks progress, and decides what runs next without editing files itself.
  • Shared Message Board. Every task assignment, update, and completion note shows up as a numbered message (#1, #2, up to #12). When a worker has nothing to do, it pauses at zero token cost until another agent mentions it by name (like @verifier). In the Antigravity CLI, you can also open the live terminal board anytime with /swarm board or Alt + S to follow messages and tool activity in real time.
  • Separate Worktrees. Workers that edit code at the same time each get their own isolated Git worktree automatically. Workers that only review diffs or handle the final merge run directly in your main workspace.
Swarm architecture diagram showing the User and Coordinator connected to the Shared Message Board, coordinating parallel workers in isolated Git worktrees (backend, frontend-core, frontend-ui) and main-workspace workers (verifier, integrator, monitor).
How the Coordinator, Shared Message Board, isolated Git worktrees, and main-workspace workers fit together

Step 1: Reviewing the Project and Splitting File Ownership

Before starting a swarm, let’s ask the agent to inspect the project right inside the Antigravity CLI:

Antigravity CLI session showing the initial prompt: Analyze this project and see if it can be upgraded/improved
Asking Antigravity CLI to review the repository before starting a swarm

The agent checks both client/ and server/ and comes back with a four-part upgrade plan:

  1. Bugs and inconsistencies. Duplicate GET /api/pets/:id requests, a mismatch where description was required on the server but optional in the form, hardcoded .png uploads, and unclosed Chrome Prompt API sessions.
  2. Angular 21 updates. Replacing RxJS and ChangeDetectorRef boilerplate with Signals, enabling router View Transitions, and adding Vitest.
  3. Web platform and accessibility. Font preconnect, the native Popover API for dropdowns and toasts, and cleaner form and link markup.
  4. Backend, security, and DevOps. Express 5, TypeScript 5.8, ESLint 9, Helmet/CORS/rate-limiting, Dockerfile cleanup, and server tests.

Now, with that plan in the chat history, let’s start the swarm right from the Antigravity CLI composer:

Antigravity CLI terminal window showing the 4-part upgrade summary and the composer prompt: /swarm handle all changes needed on those areas. We should work on a new branch.
Starting the /swarm session in Antigravity CLI right after reviewing the four-part upgrade plan

The main rule when running coding agents in parallel is simple: make sure no two agents edit the same file. The coordinator turns those four upgrade areas into five initial workers, giving each one a clear set of files:

  • backend (isolated worktree). Owns everything under server/** (Express 5, security middleware, upload and concurrency fixes, Dockerfile, and server tests).
  • frontend-core (isolated worktree). Owns client/package.json, main.ts, services, and core components (app, pet-list, pet-detail, add-pet) for Signals, bug fixes, accessibility, and Vitest.
  • frontend-ui (isolated worktree). Owns index.html, global_styles.css, pet-card, user-widget, toast components, and README.md for font preconnect, Popover API, and View Transitions.
  • verifier (main workspace). Read-only reviewer that checks diffs, confirms each worker stayed in its assigned files, and runs builds, lints, and tests.
  • monitor (main workspace). Watches the board in the background and only steps in if the swarm gets stuck.

Pay attention to how shared features work without touching the same files. Both frontend-core (pet-detail) and frontend-ui (pet-card) needed to support CSS View Transitions so clicking a pet card smoothly animates its image into the detail page. Instead of letting two workers edit the same files, the coordinator simply gave both workers the same naming rule (view-transition-name: pet-image-<id>) in their task descriptions, so each one updated its own template safely.

Also, keep in mind that every worker starts with a blank chat. It only sees the instructions the coordinator gives it, so being explicit about which files to edit, which files to leave alone, and how to verify the changes keeps agents from wandering outside their scope.

Here is what the live /swarm board view looked like in the Antigravity CLI right after the coordinator posted those initial assignments. As you can see, all six members are running on Gemini 4 Neon (Medium), the three coding workers are actively working in parallel, and posts #2 through #5 spell out the exact file rules for each role:

Antigravity CLI Swarm board showing 6 members on Gemini 4 Neon (Medium), with backend, frontend-core, and frontend-ui working in parallel while coordinator, monitor, and verifier wait, alongside initial task assignment posts #1 through #5.
The live Antigravity CLI /swarm board after the coordinator assigns file ownership across the workers

Step 2: Parallel Work in Isolated Git Worktrees

Not every agent in a swarm needs its own Git worktree. Only the workers that edit files and run builds at the same time need one.

When the coordinator starts the three coding workers, the Antigravity CLI creates a separate Git worktree from main for each one automatically. Because every worktree has its own working directory, all three workers install packages, compile code, and run tests at the same time without locking node_modules or overwriting each other’s edits.

Each worker creates its own branch, commits its changes, and posts @verifier [done] on the shared board:

  • backend. Updated 16 files under server/ on feat/backend-upgrades, with build, lint, and 22/22 tests passing.
  • frontend-ui. Updated 9 files (README.md and UI components) on feat/frontend-ui, with ng build passing.
  • frontend-core. Updated 15 files under client/ on feat/frontend-core, with ng build and 9/9 Vitest tests passing.

Pay attention to one detail: Git worktrees branch from HEAD, so they do not copy uncommitted changes sitting in your main workspace. Any changes you want parallel workers to see should be committed first.

Diagram showing the shared .git repository connecting the main workspace (with verifier, integrator, and monitor workers) and three isolated Git worktrees (backend, frontend-core, frontend-ui) so commits are visible without pushing.
All isolated Git worktrees share the same .git repository, so main-workspace workers can inspect commits right away

Step 3: Independent Verification and Clean Integration

As each worker finishes, verifier checks the diffs right away. Because all Git worktrees share the same .git repository, verifier can read those branches immediately without pushing or pulling anything. Once all three branches pass review, build, lint, and tests, verifier notifies the coordinator.

Next, the coordinator starts a sixth worker, integrator, directly in the main workspace. The integrator creates the target branch and cherry-picks the three verified worker branches on top:

git checkout -b feat/full-stack-upgrades
git cherry-pick feat/backend-upgrades feat/frontend-core feat/frontend-ui

Then integrator runs the full verification suite (npm ci, npm run build, npm run lint, and npm test) across both server/ and client/.

Once all commits are safely on feat/full-stack-upgrades and the tests are green, the coordinator shuts down the finished workers and cleans up their worktrees. Always make sure work is merged or cherry-picked before stopping a worker, since removing a worker permanently deletes its worktree folder.

Git commit flow diagram showing main branching into three isolated worktree branches (backend, frontend-core, frontend-ui) that are cherry-picked cleanly onto feat/full-stack-upgrades.
Verified commits from the three isolated worktrees are cherry-picked onto a single clean branch

Step 4: The Final PR

With a clean commit history and passing tests across the stack, we push the branch and open a Pull Request with three focused commits:

feat(frontend-ui): font preconnect, view transitions, native popover API, and docs
feat(client): modernize to Angular 21 signals, fix bugs, a11y, view transitions, and add Vitest
feat(server): upgrade Express 5/TS/ESLint, fix bugs, add security middleware & tests

As you can see, each commit focuses on one part of the app, so the Pull Request is much easier to review.

Conclusion

Running multiple coding agents in parallel works well when each agent owns a clear set of files and has its own worktree to build and test safely. With /swarm and Gemini 4 Neon in the Antigravity CLI, I upgraded an Angular and Node.js app in about 12 minutes without dealing with a single merge conflict. If you have a backlog of refactoring or upgrade tasks waiting in a repo, give /swarm a try.

You can follow me on Twitter and GitHub to see more about my work.

Thank you for reading!
— Luis Aviles

tweet Share