Operational tribal knowledge, hidden internals, quirks, and runbooks for Google Antigravity / Antigravity 2.0 that the assistant does not natively know about itself. Covers persistent scheduled tasks (sidecars), browser automation (/browser) CDP boot-up and security quirks, application runtime lifecycle, profile architectures, and process quirks.
“Schedule a persistent sidecar task that runs every weekday at 9am.”
“Why did my /schedule background timer disappear after restarting Antigravity?”
“Connect to the Antigravity browser via CDP and inspect open tabs.”
A living repository of tribal knowledge, runtime architecture, hidden internals, and operational runbooks for Google Antigravity / Antigravity 2.0 that the agent does not natively know about itself from default prompt instructions.
Whenever you encounter behavior where Antigravity’s host environment differs from standard prompt assumptions, refer to and update this skill.
1. Scheduled Tasks: Ephemeral /schedule vs. Persistent Sidecars
The Pitfall
When a user asks to “schedule a recurring prompt” or runs /schedule cron="...", agents typically default to calling the conversational schedule tool.
What happens: The agent spins an ephemeral in-conversation background timer (<conversation-id>/task-N).
Why it breaks: It does not appear in the left-hand navigation under Antigravity > Scheduled Tasks, and any server restart, app reload, or machine sleep terminates it permanently.
The Reality: Scheduled Tasks are Sidecars
Persistent, app-level scheduled tasks in Antigravity are implemented via the built-in Sidecar subsystem.
(The projectId maps to a registered project in ~/.gemini/config/projects/<uuid>.json).
Runtime Characteristics
Immediate Detection: Antigravity’s internal Go scheduler daemon (schedule.go) watches config.json. The moment a sidecar is registered or enabled, it starts a scheduler thread.
Timezone: The 5-field cron expression is evaluated in the machine’s local time (e.g. SGT / UTC+8).
Jitter: The scheduler automatically calculates a jitter offset (e.g. 1–10 minutes) so tasks don’t stampede the agent API at the top of the hour.
Verification Logs: Checked at ~/.gemini/antigravity/sidecar_data/<task-name>/logs/<timestamp>.log.
Management CLI Utility
Use the included helper script:
# List all taskspython scripts/task_manager.py list# Add a persistent taskpython scripts/task_manager.py add \ --name "morning-standup-brief" \ --display-name "Morning Standup Brief" \ --cron "15 8 * * 1-5" \ --prompt "Review my calendar and unread notifications and draft a standup summary."# Check daemon status & next fire timepython scripts/task_manager.py status --name "morning-standup-brief"
2. Server Restarts & Background Task Lifecycle
When Antigravity reloads or restarts its backend server, it emits a system notice:
[Notice] All your subagents and background tasks have been stopped due to server restart.
When a user issues the /browser slash command, Antigravity spawns an autonomous subagent with typeName: "browser" (Role: Browser Automation Agent).
The agent connects over Chrome DevTools Protocol (CDP) at http://127.0.0.1:9222 to attach to open windows, capture screenshots, evaluate DOM selectors, and inspect network traffic.
4.2 The Critical Pitfall: Chrome’s Silent Security Suppression
When booting Chrome for remote debugging, agents and developers frequently run:
chrome.exe --remote-debugging-port=9222
Why it fails silently:
Chrome’s Chromium security sandbox refuses to open --remote-debugging-port on the default user profile directory (%LOCALAPPDATA%\Google\Chrome\User Data).
If another standard Chrome window is already open under that profile, or if launched without an explicit isolated profile directory, Chrome simply attaches to the existing process.
To protect saved credentials, personal cookies, and OAuth tokens from local malware, Chrome silently suppresses --remote-debugging-port.
A normal browser window appears, but port 9222 remains closed (Connection refused). Diagnostic checks (Test-NetConnection -Port 9222 or curl http://localhost:9222/json) fail completely.
4.3 The Solution: Mandatory --user-data-dir
Chrome strictly mandates an isolated profile directory to activate remote debugging:
Process Isolation: Spawns an independent process tree that binds 127.0.0.1:9222 immediately.
Session Persistence: Because $HOME\.chrome-debug is persistent on disk, logins (e.g. store admin dashboards, SaaS apps) completed inside this window are preserved across sessions. You only need to authenticate once.
4.4 The Antigravity Subagent Discovery Hook: DevToolsActivePort
Antigravity’s built-in chrome_devtools tool in the browser subagent does not rely solely on probing http://127.0.0.1:9222. On Windows, it performs filesystem discovery by reading:
C:\Users\<user>\AppData\Local\Google\Chrome\User Data\DevToolsActivePort
When you run Chrome Beta, or run Chrome with an isolated profile (--user-data-dir="~/.chrome-debug"), Chrome does not write DevToolsActivePort to standard Google\Chrome\User Data.
When launched with an explicit port like --remote-debugging-port=9222, Chrome does not dynamically write this file.
If AppData\Local\Google\Chrome\User Data\DevToolsActivePort is missing or contains a stale browser session UUID, the subagent’s chrome_devtools tool immediately fails with:
Could not find DevToolsActivePort for chrome at C:\Users\<user>\AppData\Local\Google\Chrome\User Data\DevToolsActivePort
The Fix: The active port and live browser context path from http://127.0.0.1:9222/json/version must be synchronized into DevToolsActivePort in %LOCALAPPDATA%\Google\Chrome\User Data (handled automatically by python scripts/browser_debug.py sync or launch).
4.5 Binary Selection: Chrome Beta vs. Chrome Stable
In many developer environments, Chrome Beta is preferred for debugging and testing to keep developer tools and experimental configurations separate from standard browsing:
Always verify which binary the user intended to use. Never launch Chrome Stable if the user has requested Chrome Beta.
4.6 Anti-Patterns & Common Traps
Never Create Symlinks in Chrome or DevTools Directories:
DevTools Protocol is built natively into the Chromium binary.
Creating filesystem junctions or symlinks (e.g. trying to link devtools folders) risks breaking auto-updates and corrupting Chrome’s installation.
chrome://inspect URL Trap:
The correct Chrome internal URL for inspecting remote targets and devices is chrome://inspect/#devices.
Navigating to chrome://inspect/#remote-debugging produces an empty or invalid view.
Orphan Background Processes:
If port 9222 remains locked after closing the visible browser window, a background Chrome child process or headless worker may still be lingering. Check with Get-Process chrome or netstat -ano | findstr 9222.
4.7 Verification Runbook
# 1. Verify port 9222 is listeningGet-NetTCPConnection -LocalPort 9222 -ErrorAction SilentlyContinue# 2. Check CDP metadata endpoint(Invoke-RestMethod -Uri "http://localhost:9222/json/version").Browser# 3. List inspectable open tabs(Invoke-RestMethod -Uri "http://localhost:9222/json/list") | Select-Object title, url
4.8 Helper CLI Script (browser_debug.py)
Use the included helper script under scripts/:
# Check if CDP port is open and report connected browser infopython scripts/browser_debug.py status# Synchronize live WebSocket context path into DevToolsActivePort for Antigravity subagentpython scripts/browser_debug.py sync# List inspectable pages and tabspython scripts/browser_debug.py list-tabs# Scan for installed browser binaries across systempython scripts/browser_debug.py find-browsers# Launch Chrome Beta with isolated profile, verify port, and auto-sync DevToolsActivePortpython scripts/browser_debug.py launch --channel beta
5. File Locks & Safe Operations
Locked Files: While the Antigravity desktop application is running, SQLite .db files and agyhub_summaries_proto.pb are write-locked by Electron. Direct writes to these files will fail with OS sharing violations (os error 33).
Profile Merging / Syncing: If copying or merging conversations across profiles, refer to sync-antigravity-conversations and execute only when the app is closed or via an external terminal.
6. Custom Agent Frontmatter (~/.gemini/config/agents/*.md) vs. Claude Code (~/.claude/agents/*.md)
6.1 The Pitfall: Opposite Tool-Palette Defaults & CustomAgentSpec Persistence
When sharing custom agent personas (master.md, broker.md, worker.md, reviewer.md, breaker.md) across Antigravity (agy) and Claude Code (claude), two silent traps occur:
Opposite tools: Defaults:
Antigravity (agy): A custom .md agent file that omits an explicit tools: list in its YAML frontmatter defaults to the read-only subagent toolset (view_file, search_web, call_mcp_tool), silently stripping run_command, write_to_file, replace_file_content, invoke_subagent, and run_workflow.
Claude Code (claude): A custom .md agent file that omitstools: inherits all native Claude tools (Read, Edit, Write, Bash, PowerShell, Glob, Grep, Agent, Workflow). Conversely, if tools: is present and contains Antigravity tool names (view_file, run_command), Claude filters against that list, matches 0 tools, and refuses to start the agent!
Per-Conversation CustomAgentSpec Persistence in agy:
When a conversation is created with agy --agent <role>, Antigravity serializes a CustomAgentSpec into the conversation’s trajectory metadata (CortexTrajectoryMetadata.static_config).
Resuming that conversation later with agy --conversation=<uuid> (even without--agent) reloads the saved static_config from creation time. If the conversation was created while the agent was read-only, resuming it remains permanently read-only; start a fresh agy conversation and point it at ~/.gemini/antigravity/brain/<old-uuid>/.system_generated/logs/transcript.jsonl to recover context.
view_file, write_to_file, replace_file_content, run_command, invoke_subagent, define_subagent, manage_subagents, run_workflow, send_message, ask_question, search_web, search_marketplace, schedule, manage_task, generate_image(MCP tools call_mcp_tool, list_resources, read_resource are auto-inherited via inheritMcp — do NOT list them in tools:)
Defaults to Read-Only (strips run_command & write_to_file!).
Crashes with unknown component: tool "Read" not found in registry.
Matches 0 tools→ refuses to start the custom agent!
6.2 The Solution: Canonical AGY Source + sync-agents.ps1 Dual-Harness Compilation
Keep the canonical .md files in yclian/machines/.agents/agents/*.md with the explicit Antigravity tools: and agents: YAML frontmatter.
Run yclian/machines/.agents/agents/sync-agents.ps1 whenever updating personas:
Copies the full file (with tools: and agents:) into ~/.gemini/config/agents/ for agy.
Automatically strips ^(tools:|agents:| - ) when writing into ~/.claude/agents/ so claude inherits its full native tool palette.
7. Adding New Knowledge to This Skill
When you discover new quirks or internal behavior not covered in system prompts:
Document the misconception vs. the actual implementation.
Provide file paths and reproduction evidence.
If applicable, add or update a CLI script under scripts/.
related skills & references
in this collection
sync-antigravity-conversations - Synchronize and merge Antigravity conversations, transcripts, brain artifacts, project configurations, and summary databases from a source profile or backup archive into a target profile directory.