As an indie developer (Hirokawa, running the Dolice apps), my iOS / Android codebase has been growing since 2014. It now weighs in at over 12 GB and roughly 3.8 million files even after I exclude node_modules, and the apps that ship out of it have crossed 50 million combined downloads on the App Store and Google Play. The first few times I opened this monorepo in Antigravity, the workspace indexer spinner in the bottom right kept turning for forty minutes, and any attempt to ask the agent to read ./apps/wallpapers/src/store/category.ts came back with "still indexing workspace."
I want to share the reasoning I use to triage Antigravity's workspace indexing when it stalls, and the order in which I try fixes that have actually worked. Setup at the time of writing is macOS 15.4, Antigravity v0.34, M2 Pro 32 GB.
Telling the symptoms apart
The first thing is to decide whether the indexer is slow, blocked, or looping. The three look identical from the sidebar, but their fixes are completely different.
Slow: CPU is sustained at 200–400%, memory is flat, disk IO is constant. This will finish if you wait.
Blocked: CPU is near idle, the antigravity-helper (Renderer) thread shows Wait in Activity Monitor, and Console.app is full of EAGAIN or EMFILE. Something external is starving the indexer.
Looping: CPU is pegged, but the file count refuses to advance. The output log shows the same paths over and over. That points to a symlink cycle or a fight between the file watcher and the re-indexer.
The sidebar spinner alone cannot tell you which case you are in. Always open Antigravity → View → Output → Antigravity Indexer and read the last few dozen lines.
Cause 1: caches that aren't excluded
Antigravity respects .antigravityignore and .gitignore, but only when they live at the workspace root. In my repo, I had ./build/DerivedData set up as a symlink to ~/Library/Developer/Xcode/DerivedData, holding 4.2 GB and around 900k files. None of it was excluded, so the indexer was patiently reading every byte.
The fix is to drop a root-level .antigravityignore that takes out the usual suspects:
cat << 'IGNORE' > .antigravityignore
# Build artifacts
build/
dist/
out/
.next/
.turbo/
.cache/
# Native build outputs
DerivedData/
.gradle/
.cxx/
Pods/
android/.cxx/
android/app/build/
ios/build/
ios/Pods/
# Dependency caches
node_modules/
.pnpm-store/
.yarn/cache/
.yarn/install-state.gz
vendor/
.bundle/
# Media that won't help the agent
assets/raw/
assets/originals/
*.psd
*.sketch
*.fig
*.mp4
*.mov
# Database & coverage
*.sqlite
*.duckdb
coverage/
playwright-report/
test-results/
IGNOREAfter saving the file, restart Antigravity or run Antigravity: Reindex Workspace from the command palette (⌘⇧P). Without a restart, the in-memory index may stay live and mask the improvement.
Cause 2: symlink cycles
If you have hand-rolled symlinks to share node_modules across projects, or a pnpm workspace configuration that points at unexpected paths, the indexer can walk the same directory tree forever.
The fastest check is find at the workspace root:
# List every symlink
find . -type l -not -path "./node_modules/*" -not -path "./.git/*" \
-exec ls -la {} \; 2>/dev/null
# Surface ones that look cyclic
find . -type l -not -path "./node_modules/*" \
-exec sh -c 'realpath "$1" 2>/dev/null | head -c 200; echo " <- $1"' _ {} \;Delete the unnecessary ones, or add them to .antigravityignore. In my case I dropped a ./shared -> ../shared-lib link and reconfigured pnpm's workspaceRoot instead. The indexer's progress became predictable, and as a bonus the agent's reasoning on import statements got noticeably better.
Cause 3: file descriptor limits
EMFILE: too many open files is a common failure mode for Antigravity's indexer on macOS. The default ulimit -n is 256, which is nowhere near enough for a monorepo.
ulimit -n
# → 256 means you'll hit EMFILEThe permanent solution is ~/Library/LaunchAgents/limit.maxfiles.plist followed by a reboot, but I usually start with a per-shell override to validate the hypothesis:
# Bump it for this shell
ulimit -n 65536
# Launch Antigravity from this shell
open -a "Antigravity" .On my machine that single change cut the indexer from 24 minutes to 3 minutes. As a side effect, the agent's read_file tool stopped hanging too — both symptoms shared the same root cause.
Cause 4: backup and anti-malware software competing for the same files
If Time Machine, Backblaze, or a corporate EDR agent is sweeping the same directory tree, files get locked the moment the indexer finishes reading them, the indexer notices the change and re-reads, and CPU burns without progress.
The fix is to add the repository root to the exclude list of whichever tool is running. For Time Machine that's System Settings → General → Time Machine → Options → Exclude these locations. Whether you can safely exclude the entire project root depends on your company policy, but development directories that change every few minutes are usually a poor fit for hourly backups anyway.
Cause 5: GPU embedding failing to initialize
Since v0.32, Antigravity generates local embeddings for whole-workspace semantic search. When Metal initialization fails, it silently falls back to CPU, which is excruciatingly slow. Look for a line like Failed to acquire Metal device, falling back to CPU in Output → Antigravity Indexer.
The workaround is to flip Settings → Antigravity → Indexer: Embedding Provider from Local (Metal) to Remote (Google), or to Disabled if you'd rather skip semantic search entirely. I run with Disabled when I'm on a flaky connection, which forces me to point the agent at files explicitly (read this file: <path>). Search recall goes down, but latency becomes predictable, and total wall-clock time for a session usually comes out shorter.
A staged recovery routine
Distilled to a checklist, here is the order I work through:
- Run
Antigravity: Reindex Workspaceonce (clears transient inconsistencies). - Open
Output → Antigravity Indexerand read the last 50 lines. - Check that
.antigravityignoreexists at the repo root; drop the template above if not. - Enumerate symlinks with
find -type land exclude any that look cyclic. - Check
ulimit -n; if it's still 256, raise to 65536 and relaunch Antigravity from that shell. - Add the repository root to Time Machine / backup tool exclusions.
- Switch Embedding Provider to
RemoteorDisabled. - As a last resort, delete
~/Library/Application Support/Antigravity/Indexes/<workspace-hash>and let it rebuild from scratch.
Step 8 means waiting tens of minutes for a fresh build, so I save it for nights or before stepping away from the desk.
Preventive habits
The single thing that helps me most is dropping the .antigravityignore template into every new project before I let Antigravity touch it. Build artifacts don't need to be read by a human or an agent, and excluding them often cuts indexing time by an order of magnitude.
The second is, when I'm working on a corporate-issued Mac with an EDR running, I switch the Embedding Provider to Remote immediately. Watching the indexer burn CPU on a Metal fallback because the device isn't allowed to acquire the GPU is a mistake I've made more than once.
Further reading
- Antigravity docs: Indexing performance tips
- Apple Developer:
limit.maxfiles.plistfor macOS - Related: Performance tips for large monorepos in Rork
I revisit this checklist whenever the same shape of problem comes up. If even one step here saves you some time, that makes me happy.