Setup and context
Using Antigravity's AI agent features can sometimes result in unresponsive agents, interrupted code generation, multi-agent failures, and other issues. This beginner-friendly FAQ covers 7 common agent-related problems and their solutions in Q&A format.
:::info This FAQ is based on the official Antigravity Agent API documentation and actual user support cases. :::
Q1: Agent Unresponsive / Timeout
Symptoms
- Running an agent command produces no output
- "Agent request timed out" error appears
- Nothing displays on screen after waiting several minutes
Root Causes and Solutions
Cause 1: Default Timeout is Too Short
Antigravity's default timeout is 30 seconds. Complex operations may exceed this limit.
Increase the timeout in your Antigravity config file (~/.config/antigravity/config.json):
{
"agent": {
"requestTimeout": 120000, // Increase to 120 seconds
"retries": 3
}
}Restart Antigravity afterward:
# Kill existing process
pkill -f claude-code
# Restart
claude-codeCause 2: API Rate Limit Reached
Your Claude API or integrated service may have hit rate limits.
# Check API usage
curl -H "Authorization: Bearer $ANTHROPIC_API_KEY" \
https://api.anthropic.com/v1/account/info
# Or check Antigravity logs
tail -f ~/.config/antigravity/logs/agent.log | grep -i "rate"If rate-limited, try these solutions:
- Wait a few minutes before retrying
- Verify
ANTHROPIC_API_KEYis set correctly - Consider upgrading your API plan
Cause 3: Unstable Network Connection
Network disruption during agent execution causes timeouts.
# Check network connectivity
ping -c 5 api.anthropic.com
# Verify DNS resolution
nslookup api.anthropic.com
# If on WiFi, try wired connection or reset WiFiEnable retry logic for network instability:
{
"agent": {
"networkRetry": {
"enabled": true,
"maxRetries": 5,
"delayMs": 2000
}
}
}Cause 4: System Resources Exhausted
Memory or CPU exhaustion causes agent processing delays.
# Check resource usage
# macOS/Linux
top -b -n 1
# Windows (PowerShell)
Get-Process | Sort-Object WorkingSet -Descending | Select-Object -First 10Close unnecessary processes and increase Node.js heap size:
NODE_OPTIONS="--max-old-space-size=4096" claude-code:::tip Large operations consume more CPU and memory. Close extra browser tabs and applications to free up resources before execution. :::
Q2: Code Generation Stops Midway
Symptoms
- Agent starts generating code but stops partway through
- "Generation interrupted" error appears
- Only partial code is generated
Root Causes and Solutions
Cause 1: Reached Token Limit
Claude's context window has a limited number of available tokens. Processing large files can exhaust this limit.
Check current token usage in logs:
# Check Antigravity logs
tail -f ~/.config/antigravity/logs/agent.log | grep -i "token"If token limit is reached, try these solutions:
- Split files: Divide large files into smaller, more manageable pieces
- Clear history: Remove previous conversation history
- Simplify prompts: Use shorter, more specific instructions
# Clear conversation history
# UI: Menu → Clear Conversation HistoryCause 2: Memory Exhaustion During Processing
Analyzing large projects requires significant memory.
# Check memory usage
# macOS
ps aux | grep claude-code | grep -v grep
# Increase memory and restart
NODE_OPTIONS="--max-old-space-size=8192" claude-codeCause 3: Agent Context Management Error
If referenced files are deleted or moved during processing, generation stops.
# Verify files still exist during processing
ls -la src/
ls -la tests/Cause 4: Plugin or Integration Failure
External plugins (linters, formatters) failing causes generation interruption.
# List installed skills
claude skills list
# Uninstall problematic skill
claude uninstall skills.sh/skill-name:::warning Don't manually edit project files while code generation is running. This confuses the agent and may interrupt generation. :::
Q3: Agent Edits Wrong File
Symptoms
- Agent modifies files you didn't specify
- File in
src/gets edited inlib/instead - File paths are misinterpreted
Root Causes and Solutions
Cause 1: Ambiguous File Paths
When multiple files share the same name, the agent may pick the wrong one.
# Find duplicate filenames
find . -name "component.tsx" -type f
# Example output:
# ./src/components/component.tsx
# ./lib/components/component.tsxAlways use complete file paths in instructions:
"Edit ./src/components/Header.tsx"
Cause 2: Relative Path Interpretation Mismatch
Antigravity and the actual filesystem may interpret relative paths differently.
# Check current working directory
pwd
# Check Antigravity logs
tail -f ~/.config/antigravity/logs/agent.log | grep -i "working directory"Always use absolute paths or relative paths from project root:
// Good
"$PROJECT_ROOT/src/utils/helper.ts"
// Avoid
"../../../utils/helper.ts" // Ambiguous
Cause 3: Agent Scope Not Restricted
If you want to limit agent workspace, specify allowed directories:
{
"agent": {
"workspace": {
"allowedDirs": [
"src/",
"lib/",
"tests/"
],
"excludeDirs": [
"node_modules/",
".git/",
"build/"
]
}
}
}Add this to ~/.config/antigravity/config.json.
Cause 4: File Index Cache is Stale
Large projects may have outdated file mappings in cache.
# Clear cache
rm -rf ~/.config/antigravity/cache/file-index
# Restart Antigravity
pkill -f claude-code
claude-code:::info Antigravity creates a file index on first startup. Large projects may take several minutes. :::
Q4: Multi-Agent Processing Doesn't Run Concurrently
Symptoms
- Multiple agent processes run sequentially instead of in parallel
- No concurrent processing occurs
- Performance is unexpectedly slow
Root Causes and Solutions
Cause 1: Multi-Agent Feature Disabled
Multi-agent processing may be disabled by default. Enable it in config:
{
"agent": {
"multiAgent": {
"enabled": true,
"maxConcurrent": 4,
"queueStrategy": "priority"
}
}
}Increase maxConcurrent to allow more simultaneous agents.
Cause 2: Insufficient System Memory
Multiple concurrent agents consume significant memory.
# Check memory availability
free -h # Linux
vm_stat # macOSIf low on memory:
- Close unnecessary applications
- Reduce
maxConcurrent(e.g., 4 → 2) - Increase Node.js heap size
NODE_OPTIONS="--max-old-space-size=6144" claude-codeCause 3: API Rate Limiting Enforces Sequential Execution
Claude API rate limits may force sequential execution despite settings.
# Check API status
curl -s -H "Authorization: Bearer $ANTHROPIC_API_KEY" \
https://api.anthropic.com/v1/account/info | jq .
# Check logs
tail -f ~/.config/antigravity/logs/agent.log | grep -i "concurrent\|rate"Cause 4: Unresolved Dependencies Between Agents
When multiple agents target the same file, Antigravity auto-switches to sequential execution.
# Check for dependency issues in logs
tail -f ~/.config/antigravity/logs/agent.log | grep -i "dependency\|lock"If dependencies exist, explicitly specify execution order.
:::tip When running multi-agent processes, adding slight delays between agents improves stability. :::
Q5: Context Too Long, Agent Gets Confused
Symptoms
- Agent misses important details when processing large files
- Agent output is illogical or contradictory
- "Context too long" warning appears
Root Causes and Solutions
Cause 1: Files Too Large for Context
Agent context window has limits (Claude 3 Opus: 200K tokens). Split large files:
# Check file size
wc -l src/main.ts
# Split large file into chunks
split -l 500 src/main.ts src/main_part_
# Or use specialized tools
csplit src/main.ts '/export/ {*}'Cause 2: Unnecessary Information in Context
Verbose prompts dilute important instructions.
Keep prompts concise:
# Bad (too long)
"Look at src/main.ts, create handleSubmit in LoginComponent.
By the way, this project uses React and TypeScript and..."
# Good (concise)
"Add handleSubmit to LoginComponent in src/main.ts.
Requirements: form validation then API call"
Cause 3: Conversation History Accumulation
Extended conversations fill context window quickly. Periodically reset:
# Use UI "Clear Conversation" option
# Or CLI
claude clear-conversationCause 4: Too Many Reference Files
Passing multiple files at once exhausts context. Use only necessary files:
# Bad
"View all files in src/components/*.tsx and src/utils/*.ts..."
# Good
"Reference src/components/Button.tsx and src/utils/validator.ts..."
:::warning When context is near capacity, agent output quality degrades significantly. Keep context usage below 70% by splitting files and conversations. :::
Q6: Agent Responds in English Only
Symptoms
- Agent responds in English despite Japanese instructions
- Code comments appear in English
- Explanations are only in English
Root Causes and Solutions
Cause 1: Antigravity Default Language Set to English
Check and change Antigravity's language setting:
// ~/.config/antigravity/config.json
{
"language": "en",
"agent": {
"systemPrompt": "You are a helpful assistant. Always respond in the user's language."
}
}Restart Antigravity:
pkill -f claude-code
claude-codeCause 2: Agent System Prompt in English Only
Update the agent system prompt to support your language:
{
"agent": {
"systemPrompt": "You are a helpful assistant. Always respond in the user's language."
}
}Cause 3: Language Model Optimized for English
Some Claude models lean toward English. Explicitly request your language:
Example:
"Create the following component. Respond entirely in Japanese.
Requirements: Button component, TypeScript, React"
Cause 4: Mixed Languages Causing Default to English
Mixed language usage defaults to English. Use one language consistently.
:::info Claude supports multiple languages, but explicit requests improve reliability. :::
Q7: Unexpectedly High API Usage
Symptoms
- Claude API bill spikes suddenly
- Large number of API calls in short time
- Monthly usage exceeds budget
Root Causes and Solutions
Cause 1: Debug Mode Enabled
Debug mode creates extensive logging, causing many API calls. Disable for production:
{
"debug": false,
"agent": {
"verbose": false,
"logAllRequests": false
}
}Cause 2: Excessive Retry Logic
Frequent errors trigger retries, increasing API calls.
{
"agent": {
"requestRetry": {
"maxRetries": 2, // Default: 3
"delayMs": 1000
}
}
}Cause 3: Repeated High-Token Operations
Repeatedly analyzing or refactoring large files increases token usage. Use caching:
# Save and reuse agent results to reduce repeated calls
# Cache agent output for similar requestsCause 4: Simultaneous Multi-Agent Execution
Parallel agents significantly increase API calls.
{
"agent": {
"multiAgent": {
"maxConcurrent": 1 // Limit to sequential
}
}
}Cause 5: Unnecessary API-Dependent Features Enabled
Verify no unneeded integrations are active:
# List active integrations
claude integrations list
# Disable unused ones
claude integrations disable integration-name:::tip Monitor API usage regularly:
- Check Claude API dashboard statistics
- Review Antigravity logs for API calls
- Track monthly usage trends :::
Summary
Most Antigravity agent issues are resolved with these approaches:
| Issue | Common Causes | Solutions |
|---|---|---|
| Unresponsive/Timeout | Short timeout, API rate limit | Extend timeout, enable retry logic |
| Code generation stops | Token limit, memory exhaustion | Split files, increase memory |
| Wrong file edited | Ambiguous path, stale cache | Use full paths, clear cache |
| Multi-agent fails | Feature disabled, low memory | Enable multi-agent, increase memory |
| Context confusion | Large files, history buildup | Split files, clear conversation |
| English-only responses | Language set to English | Change to desired language |
| High API costs | Debug enabled, excessive retries | Disable debug, adjust retry settings |
If issues persist, check logs and contact support:
# View agent logs
cat ~/.config/antigravity/logs/agent.log | tail -100