Antigravity computer use

From jleechanorg/claude-commands · View interactive version

Antigravity computer use is an AI agent skill from the GitHub repository jleechanorg/claude-commands. Use Claude Code to control Google Antigravity IDE on macOS via Peekaboo. Explicitly supports targeting either the Agent Manager window or the Editor window (worktree/editor titles), plus auto routing. Covers workspaces, conversations, Knowledge/Browser/Settings panels, keyboard shortcuts, model sele

How to use this skill

Skill file

Antigravity Computer Use (macOS via Peekaboo)

For browser tasks started from Antigravity, follow the browser-control contract for context ownership, authentication, and routing. Use only a verified task-owned browser context; do not attach to personal/default Chrome or use its profile or cookies. The Antigravity Browser panel is usable only when its controlled context meets that ownership boundary.

Google Antigravity is an AI-powered, agent-first IDE (a modified VS Code fork) by Google. It has two primary views: Agent Manager ("Mission Control") and Editor (VS Code-like). This skill controls it via Peekaboo's native macOS accessibility API.

For the core screenshot-decide-act loop, see the claude-code-computer-use skill.

Official docs: https://antigravity.google/docs

CLI tool: agy


Historical operator notes — not current operating rules

Historical operator notes (reference only)

The dated notes below preserve historical observations. They are not standing

authorization, current product guarantees, or instructions to start, continue,

interrupt, or alter conversations. Apply the current task's scope and the

authorization rules below. Never click an access/approval control merely

because a dialog appeared, and never infer an active task from a spinner alone.

This is the #1 cause of stuck agents. Check EVERY time you take a screenshot.

After any screencapture, immediately run this PIL scan before doing anything else:

check_allow_dialog() {
  local IMG="$1" WIN_X="$2" WIN_Y="$3"
  python3 -c "
from PIL import Image
import numpy as np, os, sys
img = Image.open('$IMG')
arr = np.array(img)
h, w = arr.shape[:2]
for row_start in range(0, h, 20):
    region = arr[row_start:row_start+40, :]
    blue_mask = (region[:,:,2] > 130) & (region[:,:,0] < 180) & (region[:,:,2] > region[:,:,0] + 30) & (region[:,:,1] < region[:,:,2])
    if np.sum(blue_mask) > 200:
        coords = np.where(blue_mask)
        xs = coords[1]
        xs_sorted = np.sort(np.unique(xs))
        gaps = np.diff(xs_sorted)
        big_gaps = np.where(gaps > 15)[0]
        right_start = xs_sorted[big_gaps[-1]+1] if len(big_gaps) > 0 else xs_sorted[int(len(xs_sorted)*0.6)]
        cx = int((right_start + xs_sorted[-1]) / 2)
        cy = int(np.mean(coords[0][xs >= right_start])) + row_start
        scr_cx = int(os.environ.get('WIN_X',0)) + cx//2
        scr_cy = int(os.environ.get('WIN_Y',0)) + cy//2
        wx = int(os.environ.get('WIN_X',0))
        # FP zones (<workspace> window x=70,y=81,w=1684,h=900):
        if scr_cx < wx+150: continue  # gutter FP
        if abs(scr_cx-1434)<40 and abs(scr_cy-629)<40: continue  # Review Changes link FP
        if abs(scr_cx-1707)<40 and scr_cy < 840: continue  # sidebar FP (y<840 only — real Allow/Accept button appears at y≈856)
        if abs(scr_cx-1504)<30 and abs(scr_cy-769)<30: continue  # PR URL link FP
        print(f'ALLOW:{scr_cx},{scr_cy}')
        break
" WIN_X=$WIN_X WIN_Y=$WIN_Y 2>/dev/null
}

ALLOW=$(check_allow_dialog /tmp/antig_screenshot.png $WIN_X $WIN_Y)
if [[ "$ALLOW" == ALLOW:* ]]; then
  COORDS="${ALLOW#ALLOW:}"
  peekaboo click --app Antigravity --window-id "$MANAGER_ID" --coords "$COORDS"
  sleep 1
  # Re-screenshot to confirm dismissed, then re-check
  screencapture -x -R${WIN_X},${WIN_Y},${WIN_W},${WIN_H} /tmp/antig_screenshot.png
fi

When to run this check:

  1. After initial screenshot at start of any task
  2. After sending any message (wait 3s, re-screenshot, check)
  3. In every monitoring loop cycle

CRITICAL — Scan ALL windows, not just one: Every monitoring cycle MUST enumerate ALL Antigravity editor windows dynamically and scan each one. Hardcoding a single window's bounds is a bug — different workspaces open in different editor windows with different coordinates. Example:

# Get ALL Antigravity window positions (run each cycle)
ALL_WINS=$(osascript -e '
tell application "System Events"
  tell process "Antigravity"
    set wins to every window
    repeat with w in wins
      log (name of w) & "|" & (position of w as string) & "|" & (size of w as string)
    end repeat
  end tell
end tell
' 2>&1)

# Parse each window and scan it
echo "$ALL_WINS" | while IFS='|' read title pos size; do
  x=$(echo "$pos" | grep -oE '^-?[0-9]+')
  y=$(echo "$pos" | grep -oE -- '-?[0-9]+$')
  w=$(echo "$size" | grep -oE '^[0-9]+')
  h=$(echo "$size" | grep -oE '[0-9]+$')
  screencapture -x -R${x},${y},${w},${h} /tmp/antig_scan_${x}_${y}.png 2>/dev/null
  # Run PIL scan on /tmp/antig_scan_${x}_${y}.png with WIN_X=$x WIN_Y=$y
done

This was the root cause of the 2026-04-04 miss: scan was targeting only wt-task2 (x=186, y=-990) but the Allow dialog appeared in the <workspace> editor window (x=-28, y=-998) — a completely different window never scanned.

Why: Allow dialogs are web-rendered (not in A11y tree). They block ALL agent progress silently. The agent shows progress_activity spinner but never executes commands. This was a real miss on 2026-04-03 — the agent was stalled until a human flagged it. It was also missed on 2026-04-04 for the same multi-window reason.

Known False Positives — Add to FP dict

When using the PIL scan, these coordinates are recurring false positives (blue pixels from UI elements, not real Allow dialogs). Add them to a FP set and skip with SKIP_FP: prefix:

FP = {
    # Manager window: TypeScript syntax highlighting in editor panel
    '1702,-514', '1543,-479', '1447,-493',
    # Editor window (174,139): VS Code Python interpreter notification (bottom right)
    '1000,672', '640,626', '726,628',
    # Editor window: persistent bottom notification bar
    '454,715',
    # Editor window: terminal "Relocate" button
    '928,595',
    # Fullscreen editor window (0,37,1728,1080): VS Code diff/edit indicators in left gutter
    # x < 100 range = always gutter FPs in fullscreen mode
    '83,623', '83,586', '91,585',
    # win313 (x=-28,y=-998): light blue [136,201,245] code highlights — G=201 is muted/sky blue, not button blue
    '556,-742', '560,-764',
    # win319 (x=186,y=-990): blue content in $USER—list workspace — persists after click
    '547,-682', '579,-767',
    # win334 stack (x=264+,y=159+): blue UI element at 713,781 — persists; real Allow cleared at win334
    '713,781',
}

Gutter FP rule: any coord with screen x < 100 in the fullscreen window (0,37,1728,1080) is a VS Code diff/edit gutter indicator — always skip. Real Allow dialogs appear in the center-right of the window (x > 300).

Editor window left-edge rule (2026-04-05): in any editor window, cx//2 < 30 (logical x < 30) is always a VS Code diff/edit gutter indicator — add cx//2 > 30 to the PIL scan filter. This catches the recurring x≈2 FP in the editor window.

Historical detection note only: button-color detections may be false

positives. Never click to test whether a detected control is an Allow dialog.

Editor window bounds drift: When the Agent Manager window closes (agent switches to editor-only mode), PIL scan bounds must switch from Manager bounds to editor window bounds. Re-fetch with peekaboo window list each cycle — do NOT hardcode Manager bounds.


Conversation Activity Detection — Busy vs Idle

Two reliable indicators that a conversation is currently generating:

1. A11y label: `progress_activity` prefix (sidebar)

SNAPSHOT=$(peekaboo see --app Antigravity --window-id $MANAGER_ID 2>/dev/null)
# Busy conversations have "progress_activity" prefix in their label
ACTIVE=$(echo "$SNAPSHOT" | grep -c 'progress_activity.*button' || echo 0)

2. Red stop square in the input area (currently-viewed conversation only)

When a conversation is actively generating, a red stop square appears in the bottom-right of the input box (next to the microphone icon). Detect with PIL:

def is_busy_red_square(img_path, win_x, win_y):
    """Returns True if red stop button is visible in input area."""
    from PIL import Image
    import numpy as np
    img = Image.open(img_path)
    arr = np.array(img)
    h, w = arr.shape[:2]
    # Input area = bottom 15% of window
    bottom = arr[int(h*0.85):, :]
    # Red square: R>160, G<100, B<100
    red_mask = (bottom[:,:,0] > 160) & (bottom[:,:,1] < 100) & (bottom[:,:,2] < 100)
    # IMPORTANT: filter to right 80% of image to avoid left-side gutter FPs
    right_mask = np.zeros_like(red_mask)
    right_mask[:, int(w*0.8):] = red_mask[:, int(w*0.8):]
    return np.sum(right_mask) > 30  # threshold: enough red pixels for a square button

The red square appears at approximately screen (win_x + w*0.54, win_y + h*0.93) in the Manager window (right side of input box).

Known red-stop location (2026-04-05): in the editor window (x=-28, y=-998, w=1189, h=857), the red stop is at retina pixels x≈2312-2331, y≈1608-1627 (logical x≈1156, y≈804). Always filter x > 80% of image width to exclude gutter noise.

Use A11y and screenshot observations only as clues. They do not establish

conversation health or authorization; verify status against visible content and

independent task artifacts.

Interpreting activity indicators

A sidebar spinner, red stop control, model label, send arrow, or timestamp is a

UI observation, not by itself a reliable verdict about task progress. These

signals can be stale, hidden, or ambiguous. For a status claim, inspect the

selected conversation's visible content and check independent task artifacts

such as files or Git state. If those sources do not establish state, report it

as unverified and do not send a continuation, interrupt, or restart.

The red stop square may indicate generation for the currently displayed

conversation, but it does not establish whether work is progressing or belongs

to the current task. Never classify a conversation from a spinner alone.

Sidebar click reliability (2026-04-05):

Reliable input field coordinates (2026-04-05):

Opening a workspace folder closes the Manager (2026-04-05):

The old 24-hour scanner and its continuation script have been removed because

they read and message conversations unrelated to the current task. Inspect only

user-identified conversations.


Native CDP Execution (Preferred Approach)

The Antigravity runtime plugin now uses a direct Chrome DevTools Protocol (CDP) WebSocket connection as the primary driver, falling back to Peekaboo A11y only if CDP is unavailable.

Why CDP?

How it works under the hood (cdp-client.ts):


Architecture overview

| View | Purpose | Window title |

|------|---------|-------------|

| Agent Manager | Orchestrate AI agents, manage workspaces, monitor conversations | Manager |

| Editor | VS Code-like coding with AI side panel | Antigravity or worktree_* |

| Launchpad | Background/launcher window | Launchpad |

| hidden-nova | Internal background window | hidden-nova |

Toggle between views: Cmd+E or Cmd+Shift+M


Window target: Agent Manager vs Editor (explicit control)

Antigravity exposes two automation surfaces. Pick one before driving UI:

| Target | peekaboo window title(s) | Best for |

|--------|------------------------------|----------|

| Agent Manager | Manager | New conversations, Chat History, multi-workspace list, Settings from sidebar, model/planning in new-convo view (A11y-rich) |

| Editor | worktree_*, project_*, or often Antigravity | Coding with Cmd+L side panel, Cmd+I inline AI, terminal ↔ agent, current workspace only |

Environment variable (recommended):

| ANTIGRAVITY_WINDOW | Behavior |

|----------------------|----------|

| manager | Use only the Manager window. If missing, try to surface it (see below) or fail with a clear message — do not silently use Editor. |

| editor | Use only an Editor window. Prefer worktree_* / project_*, then first window whose title is not Manager, Launchpad, or hidden-nova. |

| auto or unset | Default: prefer Manager; if not found, set USE_EDITOR=1 and use Editor (same as legacy Step 0). |

Optional: ANTIGRAVITY_EDITOR_TITLE — substring or exact title to pick a specific editor window when multiple exist (e.g. worktree_myrepo).

Single resolver — run once per task; exports ANTIGRAVITY_TARGET, ANTIGRAVITY_WINDOW_ID, USE_EDITOR:

# Usage: ANTIGRAVITY_WINDOW=manager|editor|auto [ANTIGRAVITY_EDITOR_TITLE=...] source antigravity_resolve_window.sh
# Or paste inline:
antigravity_resolve_window() {
  local mode="${ANTIGRAVITY_WINDOW:-auto}"
  local json
  json=$(peekaboo window list --app Antigravity --json 2>/dev/null) || true
  ANTIGRAVITY_TARGET=""
  ANTIGRAVITY_WINDOW_ID=""
  USE_EDITOR=0

  _pick_manager() {
    echo "$json" | python3 -c "import json,sys; ws=json.load(sys.stdin).get('data',{}).get('windows',[]); m=[w for w in ws if w.get('window_title')=='Manager']; print(m[0]['window_id'] if m else '')"
  }
  _pick_editor() {
    export ANTIGRAVITY_EDITOR_TITLE="${ANTIGRAVITY_EDITOR_TITLE:-}"
    echo "$json" | python3 -c "
import json, os, sys
hint = (os.environ.get('ANTIGRAVITY_EDITOR_TITLE') or '').strip()
ws = json.load(sys.stdin).get('data',{}).get('windows',[])
if hint:
    for w in ws:
        t = w.get('window_title') or ''
        if hint in t or t == hint:
            print(w['window_id']); raise SystemExit
skip = {'Manager','Launchpad','hidden-nova'}
for w in ws:
    t = w.get('window_title') or ''
    if t.startswith('worktree_') or t.startswith('project_'):
        print(w['window_id']); raise SystemExit
for w in ws:
    t = w.get('window_title') or ''
    if t not in skip:
        print(w['window_id']); raise SystemExit
"
  }

  case "$mode" in
    manager)
      ANTIGRAVITY_WINDOW_ID="$(_pick_manager)"
      if [ -n "$ANTIGRAVITY_WINDOW_ID" ]; then
        ANTIGRAVITY_TARGET=manager
      else
        osascript -e 'tell application "Antigravity" to activate' 2>/dev/null
        sleep 1
        peekaboo press --app Antigravity --keys "cmd shift m" 2>/dev/null
        sleep 2
        json=$(peekaboo window list --app Antigravity --json 2>/dev/null) || true
        ANTIGRAVITY_WINDOW_ID="$(_pick_manager)"
        [ -n "$ANTIGRAVITY_WINDOW_ID" ] && ANTIGRAVITY_TARGET=manager
      fi
      USE_EDITOR=0
      ;;
    editor)
      ANTIGRAVITY_WINDOW_ID="$(_pick_editor)"
      [ -n "$ANTIGRAVITY_WINDOW_ID" ] && ANTIGRAVITY_TARGET=editor && USE_EDITOR=1
      ;;
    auto|*)
      ANTIGRAVITY_WINDOW_ID="$(_pick_manager)"
      if [ -n "$ANTIGRAVITY_WINDOW_ID" ]; then
        ANTIGRAVITY_TARGET=manager
        USE_EDITOR=0
      else
        ANTIGRAVITY_WINDOW_ID="$(_pick_editor)"
        [ -n "$ANTIGRAVITY_WINDOW_ID" ] && ANTIGRAVITY_TARGET=editor && USE_EDITOR=1
      fi
      ;;
  esac
}
antigravity_resolve_window
# After call: use ANTIGRAVITY_WINDOW_ID with peekaboo --window-id
# MANAGER_ID="$ANTIGRAVITY_WINDOW_ID" when ANTIGRAVITY_TARGET=manager
# EDITOR_ID="$ANTIGRAVITY_WINDOW_ID" when ANTIGRAVITY_TARGET=editor

Routing after resolve:


Step 0 — Routing: Agent Manager (preferred) → Editor (fallback)

Auto mode (ANTIGRAVITY_WINDOW=auto or unset): Prefer the Agent Manager for orchestration (new conversations, monitoring, steering). Use the Editor's Cmd+L panel when:

Explicit modes: Use the Window target resolver above instead of this block when ANTIGRAVITY_WINDOW is manager or editor.

# Step 0a: Try Agent Manager first (legacy auto — same as antigravity_resolve_window auto)
MANAGER_ID=$(peekaboo window list --app Antigravity --json 2>/dev/null \
  | python3 -c "import json,sys; ws=[w for w in json.load(sys.stdin)['data']['windows'] if w['window_title']=='Manager']; print(ws[0]['window_id'] if ws else '')" 2>/dev/null)

if [ -z "$MANAGER_ID" ]; then
  echo "Manager window not found — falling back to Editor path"
  USE_EDITOR=1
else
  echo "Manager found: window $MANAGER_ID"
  USE_EDITOR=0
fi

# Step 0b: Editor fallback — get any editor window
if [ "$USE_EDITOR" = "1" ]; then
  EDITOR_ID=$(peekaboo window list --app Antigravity --json 2>/dev/null \
    | python3 -c "
import json,sys
ws=json.load(sys.stdin)['data']['windows']
# Prefer worktree windows, then any non-Manager/Launchpad window
for w in ws:
    t=w['window_title']
    if t.startswith('worktree_') or t.startswith('project_'):
        print(w['window_id']); exit()
for w in ws:
    t=w['window_title']
    if t not in ('Manager','Launchpad','hidden-nova'):
        print(w['window_id']); exit()
")
  # In Editor mode: send message via Cmd+L panel
  # osascript -e 'tell application "Antigravity" to activate'
  # peekaboo press --app Antigravity "cmd+l"  # focus agent panel
  # peekaboo paste --app Antigravity --text "your prompt"
  # peekaboo press "Return" --app Antigravity
fi

[antig] Commit Prefix and PR Claim Convention

All commits made by Antigravity agents MUST use the [antig] prefix — analogous to [agento] for AO workers and [<project>] for other worker types.

[antig] feat(parties): add name field and owner_id schema
[antig] fix(doctor): tighten Discord guard

PR claim: Include the PR number and worktree path in every Antigravity prompt so the agent knows what it owns:

You are working in /path/to/worktree on branch feat/xxx (PR #NNN).
Use [antig] prefix for ALL commits.
Push to origin feat/xxx after each logical unit of work.

Zero-touch tracking: [antig]-prefixed merged PRs count toward the Antigravity zero-touch rate, separate from [agento] (AO workers). This lets the eloop measure Antigravity's contribution independently.

Fallback prefix: If Antigravity agent doesn't use [antig], the agent's configured git author (git config user.email) identifies it as an agent commit — but the prefix is required for zero-touch counting.



Manager window — complete UI element map (preferred path)

Use this section when ANTIGRAVITY_TARGET=manager (or auto resolved to Manager). Set MANAGER_ID="${ANTIGRAVITY_WINDOW_ID}" from the resolver; all --window-id examples below assume that ID.

Top bar

| Element label | Role | Description |

|---------------|------|-------------|

| dock_to_right / dock_to_left | text | Dock position toggle |

| Agent Manager | text | Title |

| Open Editor | text | Switch to Editor view |

| settings | text | Settings icon (top bar) |

Sidebar navigation buttons

| Element label | Role | Description |

|---------------|------|-------------|

| add Start new conversation | button | Creates new conversation (global) |

| history Chat History | button | Opens chat history panel |

| Open Workspace | button | Opens workspace picker/folder browser |

| import_contacts Knowledge | button | Opens Knowledge panel |

| chrome_product Browser | button | Opens Browser integration panel |

| settings Settings | button | Opens Settings panel |

| lightbulb Provide Feedback | button | Opens Feedback panel |

Conversation list (dynamic)

| Pattern | Meaning |

|---------|---------|

| progress_activity <Title> now | Active/running conversation (status: Running) |

| <Title> <N>m / <N>h / <N>d | Completed/idle conversation with time-ago (status: Idle) |

| See all (N) | Expand to show all conversations |

| See less | Collapse conversation list |

Conversation status indicators

Conversations have three states visible in the Manager:

| Status | Visual indicator | Meaning |

|--------|-----------------|---------|

| Running | progress_activity spinner prefix + now | Agent is actively working |

| Idle | Time-ago suffix (5m, 1h, 12h) | Agent finished or waiting |

| Blocked | May show warning icon or stalled state | Agent needs human input |

Sidebar icon prefixes (Material Icons as text)

| Prefix | Icon |

|--------|------|

| add | Plus (new conversation) |

| history | Clock (chat history) |

| import_contacts | Contacts (knowledge) |

| chrome_product | Browser |

| settings | Gear |

| lightbulb | Bulb (feedback) |

| progress_activity | Spinner (active task) |

| more_horiz | Three dots (context menu) |

| keyboard_arrow_down / keyboard_arrow_right | Expand/collapse workspace |

Workspace section elements

| Element label | Role | Description |

|---------------|------|-------------|

| worktree_<name> | other/text | Workspace header label |

| project_<name> | other/text | Project workspace header |

| Playground | other/text | Playground section header (scratch/test conversations) |

| more_horiz | text | Workspace options menu |

| add | button | Workspace-specific "+" button for new conversations (only for Playground section — workspace + icons are web-rendered) |

| info | other | Info icon (appears in Playground section) |

Conversation view controls (appear when conversation is open)

| Element label | Role | Description |

|---------------|------|-------------|

| text entry area (textField) | textField | Message input area |

| Planning / Fast | button/text | Planning mode toggle |

| Claude Opus 4.6 (Thinking) etc. | button/text | Model selector |

| Record voice memo | button | Voice input |

| Send | button | Send message |

| code Open editor | button | Open in editor |

| Use Playground | button | Switch to playground mode |

| Review | button | Review mode toggle (top-right of conversation) |

| Walkthrough | tab | Walkthrough artifact view |


Editor window — complete UI element map

Use this section when ANTIGRAVITY_TARGET=editor (or auto fell back to Editor). Set EDITOR_ID="${ANTIGRAVITY_WINDOW_ID}"; drive the agent via Cmd+L (see Editor fallback section) rather than Manager sidebar A11y.

All editor windows (Antigravity, worktree_*) share the same VS Code structure.

Sidebar tabs

| Tab label | Keyboard shortcut |

|-----------|------------------|

| Explorer | Shift+Cmd+E |

| Code Search | Shift+Cmd+F |

| Source Control | Ctrl+Shift+G |

| Run and Debug | Shift+Cmd+D |

| Remote Explorer | — |

| Extensions | Shift+Cmd+X |

| Containers | — |

| GitHub Actions | — |

AI-specific controls

| Control | How to access |

|---------|--------------|

| Agent side panel | Cmd+L (toggle/focus) |

| Inline AI command | Cmd+I (in editor and terminal) |

| @ context inclusion | Type @ in agent panel → files, dirs, MCP servers |

| / workflow invocation | Type / in agent panel → saved workflows |

| Artifacts button | Bottom-right of editor |

| "Explain and Fix" | Hover over problems |

| "Send all to Agent" | Problems panel → batch error resolution |

| Terminal output → agent | Select terminal output, press Cmd+L to send to agent |

| Tab-to-import | Auto-suggests missing dependency imports |

| Tab-to-jump | Navigates cursor to next logical code location |


Menu bar items (Antigravity focused)

Antigravity menu

File menu

Edit menu

View menu


Keyboard shortcuts

Antigravity-specific

| Shortcut | Action |

|----------|--------|

| Cmd+E | Toggle Agent Manager ↔ Editor |

| Cmd+Shift+M | Toggle Agent Manager ↔ Editor (alt) |

| Cmd+L | Toggle/focus agent side panel |

| Cmd+I | Inline AI command (editor + terminal) |

| Cmd+B | Toggle sidebar |

| Tab | Accept AI code completion |

| Esc | Dismiss AI suggestion |

VS Code inherited (selection)

| Shortcut | Action |

|----------|--------|

| Cmd+P | Quick Open (file search) |

| Cmd+Shift+P | Command Palette |

| Cmd+Shift+F | Search across project |

| Ctrl+` | Toggle integrated terminal |

| Cmd+D | Select next occurrence |

| Cmd+Shift+L | Select all occurrences |

| Opt+Up/Down | Move current line |

| Cmd+Shift+K | Delete current line |

| Cmd+/ | Toggle line comment |

| Cmd+\ | Split editor vertically |

| Cmd+1/2/3 | Focus split editor groups |

| Ctrl+G | Go to line number |

| Cmd+Click | Go to definition |

| Ctrl+- | Navigate back |


Development modes

Antigravity supports these execution modes (configured during onboarding or in Settings):

| Mode | Description |

|------|-------------|

| Agent-driven (Autopilot) | AI writes code, creates files, runs commands automatically |

| Review-driven (Recommended) | AI asks permission before actions |

| Agent-assisted | User stays in control; AI helps with safe automations |

| Secure Mode | Enhanced security restrictions |

| Custom Configuration | User-defined policy per action type |

Execution policies

| Policy | Options |

|--------|---------|

| Terminal execution | Always Proceed (with deny list) / Request Review (with allowlist) |

| Review policy (artifacts) | Always Proceed / Agent Decides (default) / Request Review |

| JavaScript execution (browser) | Always Proceed / Request Review / Disabled |


Planning modes

| Mode | Description |

|------|-------------|

| Planning | Agent builds task lists and implementation plans before executing. Use for complex tasks. |

| Fast | Agent executes directly without planning. Use for simple tasks. |

Toggle via the dropdown in the conversation input area (shows as Planning or Fast button).

A11y access: In the new conversation creation view, Planning/Fast buttons appear as A11y button elements. In active conversations, they are web-rendered. When clicking "Start new conversation", a conversation mode picker popover appears with Planning/Fast options — this popover is entirely web-rendered (NOT in A11y tree).


Model selection

Priority order (best first)

| Priority | Model | Notes |

|----------|-------|-------|

| 1 | Claude Opus 4.6 (Thinking) | Best code quality |

| 2 | Gemini 3.8 Flash (High) | Strong general purpose |

| 3 | Gemini 3.8 Flash (Low) | Same model, lower priority tier |

| 4 | Gemini 3.8 Flash | Fast but lower quality |

| 5 | Claude Sonnet 4.6 (Thinking) | Good quality, use when Opus exhausted |

| 6 | GPT-OSS 120B (Medium) | Last resort |

Checking quota before starting conversations

Before starting a new conversation, check model quota via Settings > Models:

MANAGER_ID=<MANAGER_ID>

# Step 1: Navigate to Settings
SNAP=$(peekaboo see --app Antigravity --window-id "$MANAGER_ID" --json 2>/dev/null \
  | python3 -c "import json,sys; print(json.load(sys.stdin)['data']['snapshot_id'])")
SETTINGS_ID=$(peekaboo see --app Antigravity --window-id "$MANAGER_ID" --json 2>/dev/null | python3 -c "
import json,sys; data=json.load(sys.stdin)
for e in data['data']['ui_elements']:
    if 'Settings' in (e.get('label','') or '') and e.get('role') == 'button':
        print(e['id']); break")
peekaboo click --app Antigravity --window-id "$MANAGER_ID" --on "$SETTINGS_ID" --snapshot "$SNAP"
sleep 1

# Step 2: Click Models tab
SNAP2=$(peekaboo see --app Antigravity --window-id "$MANAGER_ID" --json 2>/dev/null \
  | python3 -c "import json,sys; print(json.load(sys.stdin)['data']['snapshot_id'])")
MODELS_ID=$(peekaboo see --app Antigravity --window-id "$MANAGER_ID" --json 2>/dev/null | python3 -c "
import json,sys; data=json.load(sys.stdin)
for e in data['data']['ui_elements']:
    if e.get('label','') == 'Models' and e.get('role') == 'button':
        print(e['id']); break")
peekaboo click --app Antigravity --window-id "$MANAGER_ID" --on "$MODELS_ID" --snapshot "$SNAP2"
sleep 1

# Step 3: Screenshot the Models page to read quota bars
BOUNDS=$(peekaboo window list --app Antigravity --json 2>/dev/null | python3 -c "
import json, sys
for w in json.load(sys.stdin)['data']['windows']:
    if w['window_id'] == $MANAGER_ID:
        b = w['bounds']
        print(f\"{b['x']},{b['y']},{b['width']},{b['height']}\")")
screencapture -x -R${BOUNDS} /tmp/antig_models.png
# Read the screenshot to check which models have quota remaining

Quota bar colors: Gray filled = quota available. Yellow/orange filled = quota used. Empty gray segments = quota remaining.

Model selector in new conversation view

A11y access: In the new conversation creation view, the model selector appears as an A11y button (e.g., Select model, current: Claude Opus 4.6 (Thinking)). Click it to open the model dropdown — the dropdown options ARE A11y accessible as buttons.

PROVEN WORKING FLOW (2026-03-31):

  1. Click "New Conversation" button (A11y: add New Conversation)
  2. After view loads, find model selector: elem_66 or search for 'Select model' in label
  3. Click it — dropdown opens immediately with all models as A11y buttons
  4. Click desired model (e.g., Gemini 3.8 Flash (High) New)
  5. Verify: re-snapshot and check 'Select model, current: Gemini 3.8 Flash (High)'
MANAGER_ID=<MANAGER_ID>

# Step 1: Open new conversation
SNAP_JSON=$(timeout 12 peekaboo see --app Antigravity --window-id "$MANAGER_ID" --json 2>/dev/null)
SNAP=$(echo "$SNAP_JSON" | python3 -c "import json,sys; print(json.load(sys.stdin)['data']['snapshot_id'])")
NEW_ID=$(echo "$SNAP_JSON" | python3 -c "
import json,sys; data=json.load(sys.stdin)
for e in data['data']['ui_elements']:
    if 'New Conversation' in (e.get('label','') or '') and e.get('role') == 'button':
        print(e['id']); break")
peekaboo click --app Antigravity --window-id "$MANAGER_ID" --on "$NEW_ID" --snapshot "$SNAP"
sleep 2

# Step 2: Find and click model selector
SNAP_JSON2=$(timeout 12 peekaboo see --app Antigravity --window-id "$MANAGER_ID" --json 2>/dev/null)
SNAP2=$(echo "$SNAP_JSON2" | python3 -c "import json,sys; print(json.load(sys.stdin)['data']['snapshot_id'])")
MODEL_BTN=$(echo "$SNAP_JSON2" | python3 -c "
import json,sys; data=json.load(sys.stdin)
for e in data['data']['ui_elements']:
    if 'Select model' in (e.get('label','') or '') and e.get('role') == 'button':
        print(e['id']); break")
peekaboo click --app Antigravity --window-id "$MANAGER_ID" --on "$MODEL_BTN" --snapshot "$SNAP2"
sleep 1.5

# Step 3: Dropdown is now open — pick model from A11y buttons
SNAP_JSON3=$(timeout 12 peekaboo see --app Antigravity --window-id "$MANAGER_ID" --json 2>/dev/null)
SNAP3=$(echo "$SNAP_JSON3" | python3 -c "import json,sys; print(json.load(sys.stdin)['data']['snapshot_id'])")
# Available: "Gemini 3.8 Flash (High) New", "Gemini 3.8 Flash (Low) New", "Gemini 3.8 Flash",
#            "Claude Sonnet 4.6 (Thinking)", "Claude Opus 4.6 (Thinking)"
GEMINI_BTN=$(echo "$SNAP_JSON3" | python3 -c "
import json,sys; data=json.load(sys.stdin)
for e in data['data']['ui_elements']:
    if 'Gemini 3.8 Flash (High)' in (e.get('label','') or '') and e.get('role') == 'button':
        print(e['id']); break")
peekaboo click --app Antigravity --window-id "$MANAGER_ID" --on "$GEMINI_BTN" --snapshot "$SNAP3"
sleep 1

# Step 4: Verify
SNAP_JSON4=$(timeout 12 peekaboo see --app Antigravity --window-id "$MANAGER_ID" --json 2>/dev/null)
echo "$SNAP_JSON4" | python3 -c "
import json,sys; data=json.load(sys.stdin)
for e in data['data']['ui_elements']:
    if 'Select model' in (e.get('label','') or ''):
        print('Model now:', e['label'])"

Quota exhaustion recovery

When a conversation stalls with capacity errors ("Error You have exhausted your capacity on this model"):

  1. Do NOT try to change model in the stalled conversation — model selector is web-rendered in active/idle convos
  2. Start a new conversation using the flow above, select next model in priority order
  3. Include context from the stalled conversation in the new prompt

In active/idle conversations, the model selector is web-rendered and cannot be changed via A11y.

"Too much traffic" rate limiting

When Antigravity shows "Too much traffic — please try again in a few minutes.":

  1. Retry with backoff — wait 30s, retry the same conversation (click Retry button)
  2. After 10 retries — if still failing, switch to a different model (start new conversation with next model in priority)
  3. Do not close windows to satisfy a count. Only interact with task-owned windows.
  4. Do NOT just stop — the work items still need completion, try again when traffic subsides
  5. Switch workspace context — try starting conversation in a different workspace to route to different backend

Priority order: Claude Opus 4.6 → Gemini 3.8 Flash (High) → Gemini 3.8 Flash (Low) → Gemini 3.8 Flash → Claude Sonnet 4.6

Conversation status checks

When monitoring active Antigravity conversations:

  1. Inspect only the user-identified conversation(s); do not scan unrelated conversations.
  2. Do not close windows to meet a count. Confirm the target window before interacting.
  3. Check for errors — look for "Too much traffic", "Error", "Failed" in conversation content
  4. Retry on error — if error detected, click Retry or restart conversation with same task
  5. After 10 retries — if same error persists, switch model (start new conversation with different model)
  6. Do not impose a concurrency target; use only the user-authorized task scope.
  7. Report status — document which conversations are running, which PRs they're working on
  8. PR-Target verification (MANDATORY before sending messages):
  1. Health check for stuck agents:

hang. Check visible conversation content and independent task artifacts.

signals; require an explicit user request for that action.

Clearing the text input field

peekaboo press does NOT support modifier key combos like cmd+a or Command+a — those throw "Unknown key" errors. To clear the input field before pasting:


Artifacts system

Types: Task Lists, Implementation Plans, Code Diffs, Walkthroughs, Screenshots, Browser Recordings.

Walkthrough mode

Post-completion artifact with: summary, task list, file changes, screenshots, testing instructions. Appears as a tab in conversation view.


Configuration and customization

Rules (agent guidelines)

| Scope | Path |

|-------|------|

| Global | ~/.gemini/GEMINI.md |

| Workspace | <workspace>/.agents/rules/ |

Workflows (saved prompts, invoked with `/`)

| Scope | Path |

|-------|------|

| Global | ~/.gemini/antigravity/global_workflows/<NAME>.md |

| Workspace | <workspace>/.agents/workflows/ |

Skills

| Scope | Path |

|-------|------|

| Global | ~/.gemini/antigravity/skills/ |

| Workspace | <workspace>/.agents/skills/ |

Skill structure: SKILL.md (required, YAML frontmatter), optional scripts/, references/, assets/.

Customization access

Editor mode: (...) > Customizations


"Allow this conversation" dialog

Antigravity may show a directory-access prompt with Deny / Allow Once / Allow This Conversation. These choices grant access. Do not click an Allow option unless the user's current task explicitly authorizes access to the displayed path and scope. A prompt appearing, an agent requesting access, prior approval for another path, or a historical note is not authorization. If authorization is absent or ambiguous, leave the prompt unchanged and report the exact path and requested access.

CRITICAL: These buttons are web-rendered

The Allow/Deny buttons are web-rendered inside the conversation panel and do NOT appear in the Peekaboo accessibility tree. peekaboo see only returns native macOS accessibility elements. The Allow prompt appears every new conversation for every workspace — not just the first time.

Solution: Coordinate-based clicking via annotated screenshot

Coordinate inspection (only after access is explicitly authorized)

# Capture the authorized prompt for inspection; do not auto-click based on color.
WIN_X=832; WIN_Y=-1013; WIN_W=1025; WIN_H=904  # Manager window bounds
screencapture -x -R${WIN_X},${WIN_Y},${WIN_W},${WIN_H} /tmp/antig_allow.png
COORDS=$(python3 -c "
from PIL import Image; import numpy as np
img = np.array(Image.open('/tmp/antig_allow.png'))
blue_mask = (img[:,:,2] > 150) & (img[:,:,0] < 120) & (img[:,:,2] > img[:,:,1] + 30)
ys, xs = np.where(blue_mask)
if len(xs) > 0:
    right_mask = xs > (xs.max() - 250)
    cx, cy = int(np.mean(xs[right_mask])), int(np.mean(ys[right_mask]))
    print(f'${WIN_X}+{cx//2},${WIN_Y}+{cy//2}')
" 2>/dev/null | python3 -c "import sys; parts=sys.stdin.read().strip().split(','); print(f'{eval(parts[0])},{eval(parts[1])}')")
# Verify the displayed path and button label before any explicitly authorized click.

Screenshot-assisted inspection

Use a screenshot to locate the dialog. Pixel/color detection may help locate a

control, but it cannot determine dialog meaning or select an approval.

MANAGER_ID=<MANAGER_ID>

# Step 1: Get window bounds
BOUNDS=$(peekaboo window list --app Antigravity --json 2>/dev/null | python3 -c "
import json, sys
for w in json.load(sys.stdin)['data']['windows']:
    if w['window_id'] == $MANAGER_ID:
        b = w['bounds']
        print(f\"{b['x']},{b['y']},{b['width']},{b['height']}\")
")
WIN_X=$(echo "$BOUNDS" | cut -d, -f1)
WIN_Y=$(echo "$BOUNDS" | cut -d, -f2)
WIN_W=$(echo "$BOUNDS" | cut -d, -f3)
WIN_H=$(echo "$BOUNDS" | cut -d, -f4)

# Step 2: Capture window region (retina = 2x pixels)
screencapture -x -R${WIN_X},${WIN_Y},${WIN_W},${WIN_H} /tmp/allow_check.png

# Step 3: Inspect the screenshot and identify the dialog text and controls.
python3 -c "
from PIL import Image
import numpy as np

img = Image.open('/tmp/allow_check.png')
arr = np.array(img)
h, w = arr.shape[:2]

# Find blue button pixels (bottom half of image)
for row_start in range(h//2, h, 30):
    region = arr[row_start:row_start+30, :]
    blue_mask = (region[:,:,2] > 150) & (region[:,:,0] < 150) & (region[:,:,2] > region[:,:,0] + 50)
    if np.sum(blue_mask) > 100:
        coords = np.where(blue_mask)
        xs = coords[1]
        xs_sorted = np.sort(np.unique(xs))
        # Find gap between buttons
        gaps = np.diff(xs_sorted)
        big_gaps = np.where(gaps > 15)[0]
        if len(big_gaps) > 0:
            # Rightmost button = 'Allow This Conversation'
            right_start = xs_sorted[big_gaps[-1] + 1]
            right_end = xs_sorted[-1]
        else:
            # Single button region — rightmost 40%
            right_start = xs_sorted[int(len(xs_sorted) * 0.6)]
            right_end = xs_sorted[-1]
        cx = int((right_start + right_end) / 2)
        cy = int(np.mean(coords[0][xs >= right_start])) + row_start
        # Convert 2x retina pixels to points
        print(f'{$WIN_X + cx//2},{$WIN_Y + cy//2}')
        break
"

# Step 4: Only if explicitly authorized for this path, click the named control.

# Step 5: Verify — re-capture and check blue pixels are gone
sleep 1
screencapture -x -R${WIN_X},${WIN_Y},${WIN_W},${WIN_H} /tmp/allow_verify.png

Method 2: Visual inspection (fallback)

# Take annotated screenshot, visually identify button position
peekaboo see --app Antigravity --window-id "$MANAGER_ID" --annotate
# Read the annotated screenshot to identify coordinates
# Click by coordinates
peekaboo click --app Antigravity --window-id "$MANAGER_ID" --coords <x>,<y>

Key facts about coordinate clicking

Alternative: Antigravity Settings

This reference describes available settings. Do not change them unless the user

explicitly asks to change a named setting for a defined scope. Do not set

"Always Proceed" as a default or to bypass a pending approval:

  1. Open Settings (sidebar gear icon)
  2. Inspect the current terminal-execution policy
  3. IMPORTANT: "Always Proceed" does NOT eliminate per-conversation Allow prompts — those are separate (workspace directory access vs terminal command approval)
  4. "Always Proceed" only applies to new messages. In-progress conversations keep the policy that was active when they started. If an action is waiting for approval, do not change policy or start a replacement conversation to bypass it; inspect the requested action and follow current-task authorization.

Terminal approval stuck state — start new conversation

If a command is waiting for approval, inspect the requested action and follow the current task authorization. Do not bypass the pending approval by changing policy or starting a replacement conversation. For a status report:

  1. Do NOT try to click "Always run" — it's unreliable
  2. Inspect Settings > Terminal and report the selected policy; do not change it

to "Always Proceed" without explicit authorization.

  1. Leave the pending action unchanged unless the current task authorizes it

Agent crash recovery — start fresh

When "Agent terminated due to error" appears with Dismiss/Copy debug info/Retry buttons:

  1. These buttons are web-rendered — Dismiss clicks often land on wrong elements (Knowledge panel, etc.)
  2. Do NOT try Retry — it may restart with stale context (e.g., trying to fix already-merged PRs)
  3. If the user asked to continue the task, inspect its artifacts and start a new conversation only when that is within the authorized scope
  4. Check what the crashed agent accomplished: git log, git branch -r, gh pr list
  5. Skip completed work in the new task prompt
  6. Two conversations CAN run simultaneously — the crashed one becomes IDLE and won't block

Inspecting for an access prompt

When the task requires inspecting an access prompt, capture the target window

and read its text and displayed path. Color detection may locate a candidate

control, but cannot identify the requested permission. Do not click an Allow

control unless the user's current instruction explicitly authorizes that exact

path and access scope; otherwise leave it unchanged and report it.

Web-rendered content interaction — general technique

Antigravity uses web-rendered UI elements that don't appear in the A11y tree.

For non-approval controls within the current task scope:

  1. Capture: screencapture -x -R<window_bounds> /tmp/element.png
  2. Analyze: Use PIL/numpy to find the element by color, shape, or position
  3. Convert: Divide retina pixels by 2, add window origin for screen coordinates
  4. Click: peekaboo click --app Antigravity --window-id <ID> --coords <screen_x>,<screen_y>
  5. Verify: Re-capture and confirm the element is gone/changed

This technique may help locate non-approval controls, such as walkthrough or

artifact controls. Approval and access prompts require explicit authorization

for the displayed action before any click.

Note: peekaboo screenshot does NOT exist — use screencapture (macOS built-in) instead.


Starting a new conversation in a workspace

Method 0: `agy` CLI (FASTEST — use for new workspaces)

The agy CLI (~/.antigravity/antigravity/bin/agy) opens a workspace directly and registers it with the Manager. This is the best method for workspaces not yet visible in the Manager sidebar.

# Open workspace — creates editor window AND registers in Manager
agy /path/to/workspace

# Verify window appeared
peekaboo window list --app Antigravity --json 2>/dev/null | python3 -c "
import json, sys
for w in json.load(sys.stdin)['data']['windows']:
    print(f'{w[\"window_id\"]:6}  {w[\"window_title\"]}')"

After agy, the workspace appears in peekaboo window list but may require scrolling down in the Manager sidebar to become visible as an other element. The Manager sidebar only shows a viewport — new workspaces appear at the bottom.

Method 1: "Start new conversation" button (RECOMMENDED — tested and proven)

The global "add Start new conversation" button in the sidebar opens a new conversation creation view with full A11y support. This is the most reliable method.

How to find it: Scroll to the top of the sidebar — the button may be hidden below the fold. Use peekaboo scroll --direction up --amount 10 then check for add Start new conversation in the A11y tree.

MANAGER_ID=<MANAGER_ID>

# Step 1: Scroll sidebar to top to reveal the button
peekaboo scroll --direction up --amount 10 --app Antigravity --window-id "$MANAGER_ID"

# Step 2: Find the "add Start new conversation" button
SNAP=$(peekaboo see --app Antigravity --window-id "$MANAGER_ID" --json 2>/dev/null \
  | python3 -c "import json,sys; d=json.load(sys.stdin); print(d['data']['snapshot_id'])")
peekaboo see --app Antigravity --window-id "$MANAGER_ID" --json 2>/dev/null | python3 -c "
import json,sys; data=json.load(sys.stdin)
for e in data['data']['ui_elements']:
    if 'Start new conversation' in (e.get('label','') or ''):
        print(e['id'])"

# Step 3: Click it — opens new conversation creation view
peekaboo click --app Antigravity --window-id "$MANAGER_ID" --on <ADD_BUTTON_ID> --snapshot "$SNAP"

The new conversation view exposes these A11y elements:

| Element label | Role | Description |

|---------------|------|-------------|

| keyboard_arrow_down <workspace> | button | Workspace selector dropdown |

| text entry area | textField | Message input |

| Send | button | Send button (visible here, unlike in active conversations) |

| Planning / Fast | button | Planning mode toggle |

| Claude Opus 4.6 (Thinking) etc. | button | Model selector |

| Record voice memo | button | Voice input |

| code Open editor | button | Switch to editor |

| Use Playground | button | Switch to playground mode |

| New conversation in | other | Label text |

Important: The workspace selector dropdown (keyboard_arrow_down) is accessible in A11y but clicking it does NOT reliably open the web-rendered dropdown menu. The dropdown is web-rendered. Workaround: include the explicit workspace path in your prompt.

# Step 4: Click text field, paste prompt (include workspace path!)
SNAP2=$(peekaboo see --app Antigravity --window-id "$MANAGER_ID" --json 2>/dev/null \
  | python3 -c "import json,sys; print(json.load(sys.stdin)['data']['snapshot_id'])")

# Find text field and Send button
peekaboo see --app Antigravity --window-id "$MANAGER_ID" --json 2>/dev/null | python3 -c "
import json,sys; data=json.load(sys.stdin)
for e in data['data']['ui_elements']:
    label = e.get('label','') or ''
    role = e.get('role','')
    if label in ('text entry area','Send') or role == 'textField':
        print(e['id'], role, label)"

# Click text field, paste prompt with workspace context
peekaboo click --app Antigravity --window-id "$MANAGER_ID" --on <TEXT_FIELD_ID> --snapshot "$SNAP2"
peekaboo paste --app Antigravity --text "You are working in /path/to/worktree on branch X. <your task>"

# Step 5: Send — BOTH Return and Send button work
peekaboo press "Return" --app Antigravity
# OR: peekaboo click --on <SEND_BUTTON_ID> --snapshot "$SNAP2"

# Step 6: Verify conversation started
sleep 3
peekaboo see --app Antigravity --window-id "$MANAGER_ID" --json 2>/dev/null | python3 -c "
import json,sys; data=json.load(sys.stdin)
for e in data['data']['ui_elements']:
    label = e.get('label','') or ''
    if 'progress_activity' in label:
        print('ACTIVE:', label[:100])"

Method 2: Click workspace label in Manager sidebar

Clicking a workspace other element or "No chats yet" text expands the workspace section. After expanding, a + icon appears next to the workspace name (web-rendered, requires coordinate clicking).

Limitations: Only the currently focused workspace label appears as an other element in the A11y tree. Other workspace labels are web-rendered and not directly clickable via A11y.

Method 3: Click existing conversation to switch

Click any conversation button in the sidebar to switch to it. The conversation buttons ARE in the A11y tree (role=button, label includes title + time-ago).

⚠️ Known issues

Full flow (Method 0 + Method 1 combined — most reliable)

MANAGER_ID=<MANAGER_ID>

# Step 1: If workspace not in Manager sidebar, open via CLI first
agy /path/to/workspace
sleep 2

# Step 2: Scroll sidebar to top and click "Start new conversation"
peekaboo scroll --direction up --amount 10 --app Antigravity --window-id "$MANAGER_ID"
SNAP=$(peekaboo see --app Antigravity --window-id "$MANAGER_ID" --json 2>/dev/null \
  | python3 -c "import json,sys; print(json.load(sys.stdin)['data']['snapshot_id'])")
# Find and click the button
ADD_ID=$(peekaboo see --app Antigravity --window-id "$MANAGER_ID" --json 2>/dev/null | python3 -c "
import json,sys; data=json.load(sys.stdin)
for e in data['data']['ui_elements']:
    if 'Start new conversation' in (e.get('label','') or ''):
        print(e['id']); break")
peekaboo click --app Antigravity --window-id "$MANAGER_ID" --on "$ADD_ID" --snapshot "$SNAP"
sleep 1

# Step 3: Click text field, paste prompt with workspace path
SNAP2=$(peekaboo see --app Antigravity --window-id "$MANAGER_ID" --json 2>/dev/null \
  | python3 -c "import json,sys; print(json.load(sys.stdin)['data']['snapshot_id'])")
TF_ID=$(peekaboo see --app Antigravity --window-id "$MANAGER_ID" --json 2>/dev/null | python3 -c "
import json,sys; data=json.load(sys.stdin)
for e in data['data']['ui_elements']:
    if e.get('role','') == 'textField' and 'text entry' in (e.get('label','') or ''):
        print(e['id']); break")
peekaboo click --app Antigravity --window-id "$MANAGER_ID" --on "$TF_ID" --snapshot "$SNAP2"
peekaboo paste --app Antigravity --text "You are working in /path/to/worktree on branch X. <task>"
peekaboo press "Return" --app Antigravity

Important notes

Workspace scoping workaround — CRITICAL

The "New conversation in > [workspace]" dropdown is web-rendered and cannot be switched via A11y or coordinate clicking reliably. After 3 failed attempts to switch it, use this workaround:

Don't fight the dropdown. Include the workspace path in your prompt text instead:

# The dropdown says "agent-orchestrator" but you want <target-workspace>? Don't try to switch it.
# Just include the workspace path explicitly in the prompt:
peekaboo paste --app Antigravity --text "You are working in $PROJECT_ROOT on branch main. <your task here>"

This works because Antigravity agents resolve the workspace from the path in the prompt, regardless of which workspace the dropdown shows. The dropdown only sets the default context — explicit paths override it.

UI interaction retry cap

After 3 failed attempts at the same UI interaction (coordinate clicks, element clicks, keyboard shortcuts), STOP. Do not continue guessing. Instead:

  1. Disclose to user: "I tried X 3 times and it's not working because Y"
  2. Use a documented workaround (e.g., workspace path in prompt text)
  3. If no workaround exists, ask user for help

This prevents the failure mode where the agent spends 15+ tool calls trying coordinate variations on web-rendered elements that are invisible to A11y.

Manager window startup

The Manager window may not appear immediately after keyboard shortcuts. Reliable procedure:

  1. osascript -e 'tell application "Antigravity" to activate' — ensure Antigravity is focused
  2. peekaboo press --app Antigravity --keys "cmd shift m" — toggle Manager
  3. sleep 3 — Manager takes 2-3 seconds to initialize
  4. Check peekaboo window list for a window titled "Manager"
  5. If not found after ONE retry (total wait 6s), disclose to user: "Manager window isn't opening"

Do NOT loop Cmd+Shift+M or Cmd+E repeatedly — it toggles the window on/off.


Sending messages to active conversations

To send a follow-up message to a conversation already open in the Manager:

MANAGER_ID=<MANAGER_ID>

# Step 1: Switch to the target conversation (click its sidebar button)
SNAP=$(peekaboo see --app Antigravity --window-id "$MANAGER_ID" --json 2>/dev/null \
  | python3 -c "import json,sys; print(json.load(sys.stdin)['data']['snapshot_id'])")
# Find conversation by title substring
CONVO_ID=$(peekaboo see --app Antigravity --window-id "$MANAGER_ID" --json 2>/dev/null | python3 -c "
import json,sys; data=json.load(sys.stdin)
for e in data['data']['ui_elements']:
    if e.get('role','') == 'button' and 'your search term' in (e.get('label','') or '').lower():
        print(e['id']); break")
peekaboo click --app Antigravity --window-id "$MANAGER_ID" --on "$CONVO_ID" --snapshot "$SNAP"
sleep 1

# Step 2: Click text field to focus
SNAP2=$(peekaboo see --app Antigravity --window-id "$MANAGER_ID" --json 2>/dev/null \
  | python3 -c "import json,sys; print(json.load(sys.stdin)['data']['snapshot_id'])")
TF_ID=$(peekaboo see --app Antigravity --window-id "$MANAGER_ID" --json 2>/dev/null | python3 -c "
import json,sys; data=json.load(sys.stdin)
for e in data['data']['ui_elements']:
    if e.get('role','') == 'textField' and 'text entry' in (e.get('label','') or ''):
        print(e['id']); break")
peekaboo click --app Antigravity --window-id "$MANAGER_ID" --on "$TF_ID" --snapshot "$SNAP2"

# Step 3: Paste and send
peekaboo paste --app Antigravity --text "your follow-up message"
peekaboo press "Return" --app Antigravity

Tested behavior: Messages sent via paste+Return are received and processed immediately. The conversation auto-renames based on the first message content.

Note: In active/idle conversations, the Send button does NOT appear in A11y. Use peekaboo press "Return" instead — confirmed working.

Important: The textField may NOT appear in the A11y tree initially when switching to a conversation. It becomes accessible after clicking the input area (either via coordinates or by clicking the conversation content area first). If textField is not in the A11y tree:

  1. Click the input area coordinates (bottom of content pane, roughly y=-140 relative to Manager window)
  2. Re-snapshot — textField with label "text entry area" should now appear
  3. Then paste + Return as usual

Chat History panel

The Chat History panel shows a flat list of ALL conversations across all workspaces, with search and timestamps.

# Open Chat History
SNAP=$(peekaboo see --app Antigravity --window-id "$MANAGER_ID" --json 2>/dev/null \
  | python3 -c "import json,sys; print(json.load(sys.stdin)['data']['snapshot_id'])")
peekaboo click --app Antigravity --window-id "$MANAGER_ID" --on <CHAT_HISTORY_BUTTON> --snapshot "$SNAP"

The Chat History button is labeled history Chat History in A11y. It shows:

Use case: When you need to find a specific conversation across workspaces, Chat History is faster than scrolling through each workspace section in the sidebar.


MANDATORY: Monitor, read, and assess active conversations

This is the most important part of the skill. Starting a conversation is useless if you don't read what Gemini is actually producing and respond to it. Every interaction with Antigravity MUST include a read-assess-respond cycle.

After starting or checking a conversation, ALWAYS:

  1. Read the conversation content — conversation text is web-rendered and NOT in the A11y tree. Use screencapture + vision to read what Gemini wrote:
# Get window bounds for the Manager
MANAGER_ID=<MANAGER_ID>
BOUNDS=$(peekaboo window list --app Antigravity --json 2>/dev/null | python3 -c "
import json, sys
for w in json.load(sys.stdin)['data']['windows']:
    if w['window_id'] == $MANAGER_ID:
        b = w['bounds']
        print(f\"{b['x']},{b['y']},{b['width']},{b['height']}\")")

# Capture the conversation view
screencapture -x -R${BOUNDS} /tmp/convo_read.png

# Read the screenshot with Claude vision to extract content
# The A11y tree only gives sidebar buttons and menu items — NOT chat messages

# To scroll through long conversations:
peekaboo scroll --app Antigravity --window-id "$MANAGER_ID" --direction down --amount 10
# Or use keyboard after clicking the conversation area:
peekaboo click --app Antigravity --window-id "$MANAGER_ID" --coords <center_x>,<center_y>
peekaboo press "pagedown" --app Antigravity

IMPORTANT: peekaboo see --json on the Manager window returns sidebar elements (conversation titles, workspace labels, menu items) but NOT the web-rendered conversation content (chat messages, code blocks, progress updates). You MUST use screenshots to read what the agent is actually doing.

  1. Assess the agent's state — determine what's happening:
  1. Check for real artifacts — verify the agent actually did work:
# Check if agent pushed commits
cd /path/to/workspace && git log --oneline -5

# Check for new/modified files
git diff --stat HEAD~1
  1. Respond or redirect — if the agent is stuck or drifting:

When monitoring for someone else (e.g., a subagent or /loop):

Report these fields:

Anti-pattern: "conversation started" without reading it

NEVER declare Exit Criterion B or similar "produces output" criteria PASS based solely on:

You MUST read the actual conversation content and verify it relates to the assigned task.


Listing all workspaces and conversations

Use when the user asks "what's happening in Antigravity", "list conversations", "what are agents doing".

Complete workspace inventory

peekaboo window list is the authoritative source for ALL workspaces (the A11y tree only shows the currently expanded workspace):

# Step 1: all workspaces from window list
peekaboo window list --app Antigravity --json 2>/dev/null | python3 -c "
import json, sys
wins = json.load(sys.stdin)['data']['windows']
print('All Antigravity windows:')
for w in wins:
    title = w['window_title']
    wid = w['window_id']
    is_ws = title.startswith('worktree_') or title.startswith('project_') or title.startswith('cmus_')
    tag = ' [workspace]' if is_ws else ''
    print(f'  {wid:6}  {title}{tag}')
"

# Step 2: conversation list + active status from Manager sidebar
MANAGER_ID=$(peekaboo window list --app Antigravity --json 2>/dev/null \
  | python3 -c "import json,sys; ws=[w for w in json.load(sys.stdin)['data']['windows'] if w['window_title']=='Manager']; print(ws[0]['window_id'])")

peekaboo see --app Antigravity --window-id "$MANAGER_ID" --json 2>/dev/null | python3 -c "
import json, sys, re
data = json.load(sys.stdin)
elems = data['data']['ui_elements']
SKIP = {'add Start new conversation','history Chat History','Open Workspace','See less',
        'Use Playground','import_contacts Knowledge','chrome_product Browser',
        'settings Settings','lightbulb Provide Feedback','close button',
        'full screen button','minimize button','pop up button','Record voice memo',
        'Send','code Open editor'}
print('Conversations visible in sidebar:')
for e in elems:
    label = e.get('label','') or ''
    if e.get('role') == 'button' and label not in SKIP and not label.startswith('See all'):
        active = 'now' in label or 'progress_activity' in label
        clean = re.sub(r'\s+\d+[mhd]$', '', label.replace('progress_activity ','').replace(' now','').strip())
        if clean:
            print(f'  {\"[ACTIVE] \" if active else \"\"}{clean}')
"

# Step 3: screenshot for visual workspace-to-conversation grouping
peekaboo see --app Antigravity --window-id "$MANAGER_ID" --annotate 2>/dev/null

After running: read the annotated screenshot to visually assign conversations to workspace sections. The A11y tree has no frame data for positional grouping — the screenshot is required.

Output format

### worktree_jlcclawg
  - Reviewing Open Pull Requests [ACTIVE]
  - Testing System Functionality

### worktree_agentog3
  - Auditing Orchestration Component Wiring [ACTIVE]

---
**Summary:** ...
**Next steps:** ...

Navigating panels

Knowledge panel

Click import_contacts Knowledge button (A11y accessible). Opens a two-pane view:

A11y elements in Knowledge panel:

Limitation: Knowledge item list (checkboxes, descriptions) is web-rendered — no A11y access. Must use coordinate clicking or screenshots to interact with individual knowledge items.

Browser panel

Click chrome_product Browser button. Requires Chrome extension install. Supports: URL navigation, DOM manipulation, console access, page reading, video recording, JavaScript execution.

Settings panel

Opening: The settings Settings sidebar button does NOT reliably navigate to Settings — it may require coordinate clicking at the sidebar position. The Settings panel only opens when NOT viewing an active conversation.

How to open reliably:

  1. First click import_contacts Knowledge or chrome_product Browser to exit conversation view
  2. Then click "Settings" text in sidebar via coordinates (approximately y=-128 in screen coords relative to Manager window bottom)

Settings tab bar (all A11y accessible as buttons):

| Tab | A11y element | Description |

|-----|-------------|-------------|

| Agent | Agent button | Security, artifact review, terminal execution policies |

| Browser | Browser button | Browser-specific settings |

| Notifications | Notifications button | Notification preferences |

| Models | Models button | Model configuration |

| Customizations | Customizations button | Custom rules, workflows, skills |

| Tab | Tab button | Tab behavior settings |

| Editor | Editor button | Editor preferences |

| Account | Account button | Account settings |

| Provide Feedback | Provide Feedback button | Feedback form |

Agent tab controls (all A11y accessible):

| Control | A11y role | Element pattern | Values |

|---------|-----------|----------------|--------|

| Strict Mode | checkbox (switch) | switch | On/Off toggle |

| Review Policy | button (dropdown) | Always Proceeds keyboard_arrow_down | Always Proceeds / Agent Decides / Asks for Review |

| Terminal Command Auto Execution | button (dropdown) | Always Proceed keyboard_arrow_down | Always Proceed / Request Review |

Interaction pattern for dropdowns:

# Click dropdown button to open menu
peekaboo click --app Antigravity --window-id "$MANAGER_ID" --on <dropdown_elem> --snapshot "$SNAP"
# Then click desired option (will appear as new A11y elements)

Known issue: Scrolling while Settings is open may dismiss the panel and return to Knowledge view.

Chat History

Click history Chat History button. Opens a flat list of all conversations across all workspaces with a search field. Conversations are listed by title with time-ago stamps. Conversation items are A11y accessible as buttons.


Browser integration

Setup: Agent Manager > Browser > give browser task > install Chrome extension.

Capabilities: URL navigation, DOM manipulation (click, scroll, type), console log access, page reading (DOM, screenshots, markdown), video recording, JavaScript execution (policy-controlled). Uses Gemini 2.5 Computer Use model for browser subagent.


Scrolling and navigation in conversations

Methods (all tested and working as of 2026-03-26)

| Method | Command | Notes |

|--------|---------|-------|

| peekaboo scroll | peekaboo scroll --app Antigravity --window-id $ID --direction down --amount 10 | Works for both sidebar and conversation content |

| Keyboard Page Down | peekaboo press "pagedown" --app Antigravity | Click conversation area first to focus |

| Keyboard Down arrow | peekaboo press "down" --app Antigravity | Single line scroll |

| Keyboard End | peekaboo press "end" --app Antigravity | Jump to bottom |

Key names for `peekaboo press`

Keys are positional arguments (not --key). Common working names: pagedown, pageup, down, up, end, home, tab, return, escape, space, delete. Modifiers use + syntax but only some work: Command+w works, Command+end does NOT.

Scrolling strategy for reading long conversations

# Scroll to top first
peekaboo scroll --app Antigravity --window-id "$MANAGER_ID" --direction up --amount 50
screencapture -x -R${BOUNDS} /tmp/convo_top.png

# Read each page, scrolling down
for i in $(seq 1 10); do
  peekaboo scroll --app Antigravity --window-id "$MANAGER_ID" --direction down --amount 10
  sleep 0.3
  screencapture -x -R${BOUNDS} /tmp/convo_page_${i}.png
done

A11y tree vs web-rendered content

What the A11y tree exposes (via `peekaboo see --json`)

| Content | Available | Details |

|---------|-----------|---------|

| Sidebar conversation titles | Yes | button elements with labels like progress_activity Title now or Title 3d |

| Sidebar workspace labels | Partial | Only the currently focused workspace label appears as other element. Other workspace labels are web-rendered. |

| "No chats yet" text | Yes | other elements under empty workspace sections |

| add Start new conversation button | Yes (scroll up) | May be hidden below sidebar fold — scroll up to reveal |

| Menu bar items | Yes | other/menu elements |

| Text input field | Click-activated | textField with label text entry area — may NOT appear until the input area is clicked (via coordinates or A11y) |

| Send button | View-dependent | In new conversation view: YES (button). In active conversation view: NOT in A11y (web-rendered) |

| Planning/Fast toggle | Yes (new convo view) | button with label Planning or Fast |

| Model selector | Yes (new convo view) | button with label like Claude Opus 4.6 (Thinking) |

| Conversation mode picker | No | Popover shown by "Start new conversation" with Planning/Fast cards — entirely web-rendered |

| Workspace dropdown | Yes (new convo view) | button with label keyboard_arrow_down <workspace> — but clicking doesn't open web-rendered dropdown |

| Walkthrough artifact content | Yes | Unlike regular chat, walkthrough text appears as other elements in A11y tree |

| Chat History items | Yes | When Chat History is open, conversation items appear as button elements |

| Settings tab bar | Yes | Agent, Browser, Notifications, Models, Customizations, Tab, Editor, Account buttons |

| Settings controls | Yes | Strict Mode switch, Review Policy dropdown, Terminal Execution dropdown |

| Knowledge panel title | Yes | Panel title and placeholder text in A11y |

| Knowledge item list | No | Checkbox items and descriptions are web-rendered |

What the A11y tree does NOT expose

| Content | Solution |

|---------|----------|

| Chat messages (agent output) | Screenshot + vision |

| Code blocks in conversations | Screenshot + vision |

| Progress Updates steps | Screenshot + vision |

| Allow/Deny buttons | Screenshot + PIL blue-button detection + coordinate click |

| Review buttons | Screenshot + coordinate click |

| Non-focused workspace labels | Click "No chats yet" to expand, or use Chat History |

| Workspace + icon (web-rendered) | Use "Start new conversation" button instead |

| Send button (in active convo) | Use peekaboo press "Return" instead |

Key behavior differences by Manager state

| State | A11y elements available |

|-------|------------------------|

| Idle (conversation selected) | Sidebar buttons, focused workspace label. Text field appears after clicking input area. |

| New conversation view | All controls: Send, Planning, Model, Workspace dropdown, text field |

| Chat History open | All conversation items as buttons, search field |

| Walkthrough artifact visible | Full walkthrough text as other elements |

| Settings open | Tab bar buttons (Agent/Browser/Notifications/Models/etc.), controls (switches, dropdowns) |

| Knowledge open | Panel title, placeholder text. Knowledge items are web-rendered. |

Rule: If you need to READ what the agent wrote, use screencapture. If you need to CLICK sidebar/menu elements, use peekaboo see + peekaboo click --on.


Element targeting rules

  1. Always confirm [win] Window: Manager in see output before acting.
  2. Use --on elem_N with --snapshot <ID> for reliability.
  3. After clicking a workspace label, verify a textField appears before pasting.
  4. After send, re-snapshot and confirm progress_activity or now on the new conversation.

OAuth vs API key clarification


Known limitations

`peekaboo see` stalls — inspect ownership before recovery

Multiple or long-running peekaboo see processes alone do not establish that a

process is stale or that it is blocking Accessibility queries. They may belong to

another active operator or task. Do not infer staleness from process count or use

broad pattern-based termination.

Inspect the exact process ID, full command, parent/child relationship, start time,

and the task or attempt that launched it. Treat a process as eligible for cleanup

only when its ownership is verified and its task has ended or it is confirmed

stalled by task-specific evidence. If ownership or state is unclear, preserve the

process and continue with bounded observation or report the concrete blocker.

When cleanup is justified, terminate only the verified task-owned process (or its

verified task-owned process group), prefer graceful termination, and confirm the

process exited before retrying. Preserve processes belonging to unrelated

operators. Avoid pkill or killall patterns that can match their work.

Run peekaboo see calls sequentially and use the timeout guidance below. A

timeout or multiple matching processes is a diagnostic signal, not proof of

process ownership, a systemwide blockage, or a reason to restart Antigravity.

`peekaboo see` timeout guidance

peekaboo see can take longer on large Manager windows. A timeout bounds the

wait; window size alone does not establish that a call will hang.

Use a bounded timeout for peekaboo see calls:

# Bounded observation
SNAP_JSON=$(timeout 12 peekaboo see --app Antigravity --window-id "$MANAGER_ID" --json 2>/dev/null)
if [ -z "$SNAP_JSON" ]; then
  echo "A11y observation unavailable or timed out; use another verified observation method"
  # A missing snapshot does not establish process ownership or justify termination.
fi

When a bounded peekaboo see call returns no snapshot:

  1. Model selector: use coordinate click from screenshot (model selector bottom of input area, ~y=395 in 455-tall image)
  2. Text field focus: after coordinate click, probe with peekaboo press "period", take screenshot to verify cursor is in field, then peekaboo press "delete" and paste
  3. Sending: use peekaboo press "Return" — does NOT require A11y to be working
  4. Conversation monitoring: use screenshot-only (screencapture + vision) — never requires peekaboo see

Text field focus — PROVEN RELIABLE METHOD (2026-03-31)

Key finding: The text entry area textField element reports WRONG screen coordinates (e.g., y=927 when window is at y=-1013). Do NOT click it by its reported coordinates. Instead use the hardcoded coordinate approach below.

The group textField elements (elem_59, elem_60) also have unstable IDs — they shift when more conversations are added to the sidebar. Use coordinates instead.

PROVEN: Clicking at (1473, -623) reliably focuses the text input for a Manager window at x=832, y=-1013. This is the center-right area of the conversation pane where the "group" textField container is.

MANAGER_ID=<MANAGER_ID>
# WIN bounds: x=832, y=-1013, w=1025, h=904

# Step 1: Click at known-working coordinates to focus input
peekaboo click --app Antigravity --window-id "$MANAGER_ID" --coords "1473,-623"
sleep 0.3

# Step 2: Verify focus — probe with space, then check screenshot for cursor
peekaboo press "space" --app Antigravity
sleep 0.2
screencapture -x -R832,-1013,1025,904 /tmp/focus_probe.png
# If input has cursor (blinking line) and Send button turned blue → focused
# If input still shows placeholder text → not focused, try again

# Step 3: Delete probe and paste real text
peekaboo press "delete" --app Antigravity
peekaboo paste --app Antigravity --text "your actual prompt"
peekaboo press "return" --app Antigravity

Why (1473,-623) works: This is the location of the group textField container that spans the content pane. Clicking it delegates focus to the actual web-rendered text input. The y=-623 is approximately 43% from the top of the 904px-tall window.

For different window positions: Adjust x and y proportionally from window origin. The group textField is typically at ~63% across and ~43% down from the window top.

Git command guidance for Antigravity prompts

Antigravity agents (Gemini-powered) sometimes hang on git commands — particularly git push, git fetch, and git checkout — causing the entire conversation to stall with no timeout. When composing prompts for Antigravity, always include git command guidance from ~/.gemini/GEMINI.md:

Rules to include in every Antigravity prompt that involves git:

Git rules:
- Always push after finishing any unit of work
- Always infer remote branch via `gh pr view <N> --json headRefName`
- Always report remote commit URL after pushing
- Never run destructive git commands (reset --hard, push --force) unless explicitly asked
- Never use `git add -A` — stage only files you changed
- Use `git mv` for moving files (preserves history)
- If a git command hangs for >30 seconds, cancel it (Ctrl+C) and retry with --no-verify or investigate the cause
- For git push: always use `git push origin <branch>` explicitly — never bare `git push`
- For git fetch: use `git fetch origin` — never bare `git fetch` which may fetch all remotes
- If git asks for credentials or passphrase interactively, cancel immediately — it will hang forever in Antigravity

Why git hangs in Antigravity

  1. Credential prompts: git may prompt for SSH passphrase or HTTPS credentials. Antigravity has no interactive stdin — the prompt blocks forever.
  2. Large fetches: git fetch without specifying remote fetches all remotes, which can hang on unreachable upstreams.
  3. Hook scripts: pre-push or pre-commit hooks may hang if they require network access or user input.
  4. Lock files: concurrent git operations from other agents may leave .git/index.lock, causing subsequent operations to wait.

Detection and recovery

When monitoring an Antigravity conversation (via the loop), detect hangs by:

  1. Screenshot shows "Always run" or terminal output frozen for >2 minutes with no new progress
  2. progress_activity spinner is still showing but no new "Files Edited" or "Progress Updates"
  3. The same terminal command output is visible across 2+ monitoring cycles

Recovery: Send a follow-up message in the conversation: "The git command appears hung. Please cancel it with Ctrl+C and retry, or skip the push and move to the next task."

Editor fallback — sending messages via Cmd+L AI panel

When ANTIGRAVITY_WINDOW=editor or ANTIGRAVITY_TARGET=editor (from the window resolver), this is the primary path — not a fallback. Set EDITOR_ID="${ANTIGRAVITY_WINDOW_ID}" and skip Manager-only flows.

When the Agent Manager window is unavailable (not running, or MANAGER_ID is empty after Step 0a), use the Editor's AI side panel (Cmd+L) to interact with conversations.

When to use Editor fallback

Editor fallback interaction flow

USE_EDITOR="${USE_EDITOR:-0}"

if [ "$USE_EDITOR" = "1" ]; then
  # Step E1: Get the editor window ID (worktree or generic Antigravity window)
  EDITOR_ID=$(peekaboo window list --app Antigravity --json 2>/dev/null | python3 -c "
import json, sys
ws = json.load(sys.stdin)['data']['windows']
# Prefer worktree/project windows
for w in ws:
    t = w['window_title']
    if t.startswith('worktree_') or t.startswith('project_'):
        print(w['window_id']); exit()
# Fall back to first non-infrastructure window
for w in ws:
    t = w['window_title']
    if t not in ('Manager', 'Launchpad', 'hidden-nova'):
        print(w['window_id']); exit()
" 2>/dev/null)

  if [ -z "$EDITOR_ID" ]; then
    echo "ERROR: No Antigravity editor window found — is Antigravity running?"
    exit 1
  fi
  echo "Using Editor window: $EDITOR_ID"

  # Step E2: Focus Antigravity
  osascript -e 'tell application "Antigravity" to activate'
  sleep 0.5

  # Step E3: Open AI side panel with Cmd+L
  peekaboo press "cmd+l" --app Antigravity --window-id "$EDITOR_ID"
  sleep 1

  # Step E4: Verify panel opened (screenshot check)
  BOUNDS=$(peekaboo window list --app Antigravity --json 2>/dev/null | python3 -c "
import json, sys
for w in json.load(sys.stdin)['data']['windows']:
    if str(w['window_id']) == '$EDITOR_ID':
        b = w['bounds']
        print(f\"{b['x']},{b['y']},{b['width']},{b['height']}\")
")
  screencapture -x -R${BOUNDS} /tmp/editor_panel.png
  # If panel is open, the right side of the screenshot shows a chat-like UI

  # Step E5: Click into the AI input area (bottom of side panel — right ~30% of window)
  WIN_X=$(echo "$BOUNDS" | cut -d, -f1)
  WIN_Y=$(echo "$BOUNDS" | cut -d, -f2)
  WIN_W=$(echo "$BOUNDS" | cut -d, -f3)
  WIN_H=$(echo "$BOUNDS" | cut -d, -f4)
  INPUT_X=$(python3 -c "print(int($WIN_X + $WIN_W * 0.85))")
  INPUT_Y=$(python3 -c "print(int($WIN_Y + $WIN_H * 0.92))")
  peekaboo click --app Antigravity --window-id "$EDITOR_ID" --coords "${INPUT_X},${INPUT_Y}"
  sleep 0.3

  # Step E6: Paste prompt and send
  peekaboo paste --app Antigravity --text "You are working in /path/to/workspace on branch X. <your task>"
  peekaboo press "return" --app Antigravity
  sleep 2

  # Step E7: Verify — screenshot to check response started
  screencapture -x -R${BOUNDS} /tmp/editor_sent.png
fi

Editor vs Manager — capability comparison

| Feature | Agent Manager | Editor (Cmd+L) |

|---------|--------------|---------------|

| New conversation with workspace picker | Yes (A11y) | No (always uses current workspace) |

| Model selector | Yes (A11y in new convo view) | Limited (depends on editor version) |

| Planning mode toggle | Yes (A11y) | No |

| Conversation history | Yes (Chat History panel) | Current session only |

| Allow prompt detection | Via screenshot (Manager viewport) | Via screenshot (Editor viewport) |

| Multi-workspace orchestration | Yes | No — scoped to open workspace |

| Inline code actions (Cmd+I) | N/A | Yes |

| Artifacts (Walkthrough, Diffs) | Yes | Yes (via Artifacts button) |

Editor fallback notes

Screenshot flickering workaround

If screenshots show blank/white for Antigravity windows:

  1. Do not restart Antigravity solely because screenshots flicker. Report the

capture failure and use read-only accessibility inspection only where it can

answer the task without an unverified status claim.

  1. peekaboo see --json may expose native elements, but does not prove the

state of web-rendered conversation content.

  1. Check window count: After restart, use peekaboo window list to count workspaces (exclude Launchpad/empty)
  2. If Manager missing: use agy /path/to/workspace to trigger Manager window appearance

Security note

Antigravity agents can read .gitignore, .env, and other sensitive files in the workspace. A documented vulnerability exists where hidden file instructions (e.g., in a cloned repo) can trigger credential exfiltration through image URL rendering. Be cautious when opening untrusted repositories.


Completion criteria

Declare completion only when:

Always return: final status, last 3 step logs, screenshot/file references.


Reference links

| Resource | URL |

|----------|-----|

| Official docs | https://antigravity.google/docs |

| Agent Manager docs | https://antigravity.google/docs/agent-manager |

| Panes docs | https://antigravity.google/docs/panes |

| Walkthrough docs | https://antigravity.google/docs/walkthrough |

| Settings docs | https://antigravity.google/docs/settings |

| CLI docs | https://antigravity.google/docs/command |

| Keyboard shortcuts guide | https://antigravitylab.net/en/articles/tips/keyboard-shortcuts-guide |

| Google Developers Blog | https://developers.googleblog.com/build-with-google-antigravity-our-new-agentic-development-platform/ |

| Codelab tutorial | https://codelabs.developers.google.com/getting-started-google-antigravity |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.