As you work longer with Antigravity, you might notice "agent responses are getting slower" or "the UI freezes intermittently." This guide walks through the five main causes and practical fixes for each.
Five Main Causes of Antigravity Performance Degradation
1. Project Context Too Large
Antigravity sends all project files as context to the AI for accurate responses. As files accumulate, context size explodes, dramatically increasing API processing time.
Common culprits:
- Projects with 1,000+ files
- Complete
node_modulesfolder included (typically 50,000+ files) - Build output folders (
dist/,build/) in context - Cache files, logs, and temp directories
The fix:
Create an .antigravityignore file to exclude unnecessary folders:
node_modules/
.git/
dist/
build/
.next/
out/
*.log
.DS_Store
.env
__pycache__/
*.pyc
coverage/
.pytest_cache/
Or extend your .gitignore:
cp .gitignore .antigravityignore
echo "dist/" >> .antigravityignore
echo ".next/" >> .antigravityignoreThis single change often cuts response time by 50% or more.
2. Too Many MCP Servers Enabled
Multiple MCP (Model Context Protocol) servers consume resources—Antigravity must maintain and verify connections to each, slowing everything down.
Signs:
- New agent initialization takes 30+ seconds
- Slow responses even for non-MCP queries
- Crashes when running multiple agents simultaneously
Solution:
Disable MCPs you're not actively using:
- Antigravity Settings → MCP Configuration
- Toggle off MCPs you don't need
- Or rotate: enable only the 3–5 you use most
Most workflows use just 3–5 MCPs (GitHub, Figma, custom APIs). More than that signals over-configuration.
3. Wrong AI Model Selection
Antigravity offers multiple models. Powerful models are slower and consume more credits.
Model breakdown:
- Claude 3.5 Sonnet (Pro): High accuracy, slower (5–30s responses)
- Claude 3.5 Haiku (Flash): Lightweight, fast (1–5s responses)
- Claude Opus: Highest accuracy, slowest (10–60s responses)
Smart selection:
- Initial research: Haiku
- Code generation & debugging: Sonnet
- Complex logic & strategy: Opus
Example setup:
Default Agent: Claude 3.5 Haiku
Complex Tasks: Claude 3.5 Sonnet
Switching to Haiku as default cuts average response time by 40%.
4. High Browser Memory Usage
Antigravity consumes increasing browser memory over time. UI becomes sluggish, especially with multiple tabs or windows open.
Check memory (Chrome):
- Menu → More tools → Task Manager
- Find Antigravity process
- Check Memory column (>1GB = warning sign)
Fix it:
- Memory leak: Restart Antigravity
- Extension conflicts: Temporarily disable other extensions
- Multiple projects: Limit to one project at a time
Also try Antigravity Settings → Performance → lower "Cache Size."
5. Network Latency or VPN
High-latency connections naturally increase API response times.
Test latency:
ping api.antigravity.cloud
# Or measure with curl
curl -w "@curl-format.txt" -o /dev/null -s https://api.antigravity.cloud/healthSolutions:
- VPN: Switch servers or temporarily disable
- Corporate network: Request faster routing from IT
- Region selection: Choose closest region in Antigravity settings
When Agents Stop Responding
If an agent gets stuck "thinking":
Diagnostic Checklist
- Network: Verify internet (ping 8.8.8.8)
- Browser console: F12 → Console for errors
- API status: Check Antigravity status page
- Credits: Account → Billing (zero credits = disabled)
Recovery
- Stop agent: Escape or "Stop" button
- Restart Antigravity
- Clear cache: Ctrl+Shift+Delete (Chrome) or Settings → Clear cache
- Reload project
When Code Output Gets Cut Off Mid-Way
Slow responses and truncated output look similar but have different causes. When a function ends without its closing }, or you get import statements with no body, the issue isn't speed—it's running out of output tokens. The fix is different.
Sort the symptom into one of three patterns first:
- A: Code stops mid-function or mid-class — the model exhausted its output tokens and gave up.
- B: Asking it to "continue" makes it forget earlier context — the chat history grew long and pushed older context out.
- C: An explicit "file too long" error appears — the clearest case; your input is too large.
When it gets cut, start a fresh session instead of continuing
Rather than asking for more inside a long session, open a new one and paste only the part you need.
# Inside a long session (prone to truncation)
"Add authentication to the code from earlier"
# In a fresh session (recommended)
"Add JWT auth to the function below. Only auth.ts changes.
export function checkAuth(req: Request) { /* ... */ }"
For managing context, see Context Window management for large codebases.
"Return only the changed code" frees up output budget
Adding one line to your request cuts the preamble and full-file restatement, leaving more tokens for actual generation.
"Add error handling to fetchUserData.
Return only the changed function—no other functions or explanation."
As an indie developer, I kept getting cut off trying to fix long files in one shot. Once I switched to extracting just the target function and asking for "that function only," truncation almost disappeared. Ask narrow, ask often—that is what works.
.gitignore vs .antigravityignore
Two separate tools, two separate purposes.
.gitignore
- Excludes files from version control
.antigravityignore
- Excludes files from Antigravity context
- Can be more aggressive
Recommended template:
# Dependencies
node_modules/
.venv/
env/
vendor/
# Build output
dist/
build/
out/
.next/
.nuxt/
# Development tools
.git/
.vscode/
.idea/
*.log
# OS files
.DS_Store
Thumbs.db
# Caches
.cache/
.pytest_cache/
.eslintcache/
# Binaries
*.zip
*.tar.gz
Planning Mode vs Fast Mode
Two execution strategies:
Planning Mode (Thinking):
- Complex logic, multi-step reasoning
- 30–120 second response
- High credit consumption
- Highest accuracy
Fast Mode (Quick):
- Simple questions, research
- 5–15 second response
- Low credit consumption
- Good accuracy
When to use each:
Task | Mode
New project architecture | Planning
Small bug fix | Fast
Multi-module design review | Planning
Library documentation lookup | Fast
Default to Fast Mode, switch to Planning when needed.
Memory and Storage Optimization
Clean Up Projects
Periodically remove unnecessary files:
# Find large files
find . -size +10M -type f | grep -v node_modules
# Remove old logs and caches
rm -rf logs/
rm -rf .cache/
# Check overall size
du -sh .Exclude Generated Files
echo "generated/" >> .antigravityignore
echo "*.generated.js" >> .antigravityignoreReview Auto-continue Settings
Auto-continue lets agents continue tasks automatically. Convenient but risky—more errors, higher credit consumption.
Configuration:
Antigravity → Agent Settings → Auto-continue
- Disabled (recommended): You verify each step
- Enabled: Automatic progression (high credit use, possible surprises)
If performance suffers, disable it temporarily.
Save Credits While Keeping Speed
Optimize Model Selection
Routine work | Haiku (¥0.5/1M tokens)
Design & complex logic | Sonnet (¥3/1M tokens)
Research & analysis | Opus (¥15/1M tokens)
80% Haiku, 20% Sonnet keeps quality high while reducing spend by 30%.
Compress Context
// Bad: broad scope
"Include all project files"
// Good: precise files
"Files: /src/main.ts, /api/routes.ts"
Explicit file selection reduces API payload by 50% in many cases.
Batch Tasks
Combine multiple small tasks into one prompt:
// Inefficient: 4 separate calls
1. Fix bug
2. Add tests
3. Update docs
4. Draft PR comment
// Efficient: 1 call
"Fix bug, add tests, update docs, draft PR comment"
Performance Improvement Checklist
Try in this order:
- [ ] Exclude
node_modulesin.antigravityignore - [ ] Disable unused MCPs
- [ ] Set default model to Haiku
- [ ] Disable Auto-continue
- [ ] Clear browser cache
- [ ] Restart Antigravity
- [ ] Measure network latency
Quick Wins Summary
Immediate (5 minutes):
- Create
.antigravityignorewithnode_modules/ - Set Haiku as default model
- Disable Auto-continue
Short-term (30 minutes):
- Clear browser cache
- Disable unused MCPs
- Review and compress project size
Ongoing:
- Regularly clean old files
- Monitor browser memory
- Adjust model selection per task
Related Resources
10 Essential Antigravity Productivity Tips shares broader efficiency techniques beyond speed alone.
Wrapping up
Slow Antigravity performance almost always traces back to oversized context, too many MCPs, or wrong model selection. Excluding node_modules and defaulting to Haiku solves most cases. Paired with regular maintenance and task-appropriate mode selection, you'll enjoy fast, efficient workflows.