newspaperPress Guidelines
Pricing
Blog
Downloaddownload

Explore our next generation products

See overview

Products

antigravityAntigravity 2.0terminalAntigravity CLIcodeAntigravity IDEsdkAntigravity SDK

Built for developers in the agent-first era

See overview
EnterpriseFrontendFullstackScienceMarketer

Everything you need to stay up-to-date and get help

Documentationkeyboard_arrow_rightChangelogSupportPressReleases

Explore our next generation products

See overview

Products

antigravityAntigravity 2.0terminalAntigravity CLIcodeAntigravity IDEsdkAntigravity SDK

Built for developers in the agent-first era

See overview
EnterpriseFrontendFullstackScienceMarketer
Pricing
Blog

Everything you need to stay up-to-date and get help

Documentationkeyboard_arrow_rightChangelogSupportPressReleases
Home
Antigravity 2.0v2.3.1keyboard_arrow_right
Overview
Getting Started
Build with Google
Feature Overview
Models
Projects
Settingskeyboard_arrow_right
Overview
Agent Settings
Artifact Review
Customizationskeyboard_arrow_right
MCP
Skills
Rules
Plugins
Hooks
Sidecars
Agent Capabilitieskeyboard_arrow_right
Permissions
Subagents
Artifactskeyboard_arrow_right
Overview
Plan
Walkthrough
Screenshots
Antigravity CLIv1.1.5keyboard_arrow_right
Overview
Getting Started
Installation & Auth
Tutorial
Using AGY CLI
Features
Gemini Migration
Prompting
Artifactskeyboard_arrow_right
Overview
Conversations
Agent Capabilitieskeyboard_arrow_right
Choose an execution mode
Subagents
Sandbox
Permissions
Projects
Settingskeyboard_arrow_right
Overview
AI Credits
Customizationskeyboard_arrow_right
MCP
Plugins & Skills
Status Line
Window Title
Commandskeyboard_arrow_right
Agents (/agents)
Code Search (/codesearch)
AI Credits (/credits)
Diff (/diff)
Permissions (/permissions)
Resume (/resume)
Status Line (/statusline)
Window Title (/title)
Model Quotas (/usage, /quota)
Best Practices
Troubleshooting
Reference
Antigravity SDKv0.1.7keyboard_arrow_right
Overview + Quick Start
Customizationskeyboard_arrow_right
MCP
Antigravity IDEv2.1.1keyboard_arrow_right
Overview
Getting Started
Featureskeyboard_arrow_right
Tab
Side Panel
Review Changes
Artifactskeyboard_arrow_right
Plan
Walkthrough
Screenshots
Browser Recordings
Browserkeyboard_arrow_right
Overview
Allowlist / Denylist
Separate Chrome Profile
Customizationskeyboard_arrow_right
MCP
Skills
Rules
Workflows
Plugins
Hooks
Settings
Migrationkeyboard_arrow_right
Firebase Studio Migration
Enterprise
Plans
FAQ
  • side_navigation
  • Antigravity CLI
  • >
  • Agent Capabilities
  • >
  • Choose an execution mode

Choose an execution modelink

Control whether Antigravity CLI pauses to ask before modifying files or executing commands during a session.

Before you beginlink

  • Install Antigravity CLI
  • Have an active project repository with source code to edit

Available modeslink

Each execution mode makes a different tradeoff between conversational autonomy and developer oversight. The table below shows how Antigravity CLI handles file operations and planning in each mode.
ModeBehaviorBest for
defaultPauses for interactive diff review before modifying or creating files.Standard development, reviewing sensitive code changes, and careful refactoring.
accept-editsAutomatically approves file edits and creations (mkdir, touch, file writes).Rapid prototyping, iterating on trusted code, and reducing prompt interruptions.
planPrepends the /plan instruction prefix to analyze and outline steps before writing code.Exploring unfamiliar architecture or designing complex multi-step features.
> Note: Tool permission rules configured via /permissions or --dangerously-skip-permissions continue to govern shell commands (run_command) across all execution modes.

Cycle execution modes during a sessionlink

You can switch execution modes mid-session without interrupting active tasks or restarting the terminal.
  1. Press Shift+Tab inside the prompt box to cycle through the active sequence:
default → accept-edits → plan → default
  1. Observe the status bar indicator below the prompt input to confirm your active mode ([accept-edits] or [plan]).
> Tip: When Antigravity CLI pauses for a pending file edit confirmation in default mode, you can press Shift+Tab to instantly switch to accept-edits mode and approve all pending file modifications.

Review modifications in default modelink

In default mode (request-review), Antigravity CLI pauses before applying any file writes to disk and renders an inline, syntax-highlighted diff preview.
bash
# Launch in default interactive review mode
agy
When prompted with a pending file modification:
  • Press y to accept the changes and save the file to disk.
  • Press n to reject the edits and keep the existing file unchanged.
  • Press f (KeyViewDiff) to open a full-screen, scrollable diff review with 3 context lines and hunk separators.
  • Press Ctrl+G to open the file inside your $EDITOR for manual adjustments.
  • Type instructions in the prompt box and press Enter to reject the edit and tell the agent what to do differently.
The default mode file edit diff review panel showing line modifications and action choices

New file creation previewslink

When Antigravity CLI creates a brand-new file, the confirmation panel displays an addition-only diff preview with a dedicated "Create file" header and explicit allow/deny prompts:
text
Create file: src/utils/formatter.ts
Allow create this file? [y/n/f]
The addition-only diff confirmation panel displayed when creating a new file in default mode

Auto-approve edits with accept-edits modelink

Select accept-edits mode when you want Antigravity CLI to work in longer, uninterrupted stretches across your filesystem without pausing for each file modification.
bash
# Launch directly in accept-edits mode
agy --mode=accept-edits
In this mode, all standard file read, creation, and replacement operations (write_to_file, replace_file_content, multi_replace_file_content) run automatically. Subagents spawned during the session also inherit the accept-edits setting, preventing background file writes from queueing for manual approval.
The CLI running in accept-edits mode showing the status indicator and automatic file modification

Analyze tasks before editing with plan modelink

Use plan mode when taking on complex refactoring, multi-file architectural changes, or unfamiliar codebase investigations.
bash
# Launch directly in planning mode
agy --mode=plan
When plan mode is active via Shift+Tab cycling or the --mode flag, the CLI automatically prepends the /plan instruction prefix to your prompts. The agent investigates relevant files using read-only tools (code_search, grep_search, view_file) and presents a structured execution outline for your approval before writing code.
The CLI running in plan mode analyzing code and structuring an execution outline

Persist or override your default modelink

You can set your preferred startup execution mode permanently across sessions or override it for specific invocations.

Using the interactive settings panellink

Open the interactive settings panel mid-session to inspect or update your default configuration.
bash
/settings
The interactive settings panel with the Agent Mode option highlighted
Navigate to Agent Mode using ↑/↓, press Enter or Space to select your default (default, accept-edits, or plan), and press Ctrl+S to save. Modifying this option synchronizes your runtime CycleMode immediately.

Setting `agentMode` in `settings.json`link

Set agentMode directly inside your user or project configuration file:
json
{
  "agentMode": "accept-edits"
}
The CLI loads this file from ~/.gemini/antigravity-cli/settings.json at startup and applies your chosen baseline execution mode.

Command-line flag overrideslink

Pass the --mode flag to temporarily override your persistent default mode for a single terminal run:
bash
# Override settings.json to run in planning mode
agy --mode=plan

Common mistakeslink

MistakeWhy it failsFix
Expecting sandbox in Shift+Tab cyclingsandbox is an OS containment permission setting, not an execution modeConfigure sandbox auto-approval rules inside /permissions
Using legacy /planning or /fast commandsThese vestigial commands were removed in 1.1.0Press Shift+Tab to cycle modes or type /plan before your prompt
Passing --permission-modeagy uses --mode (--mode=accept-edits or --mode=plan) for execution overridesRun agy --mode=accept-edits or check agy --help

Next stepslink

  • Permissions: Configure fine-grained tool approval rules and wildcard matching
  • Settings, Rendering & Keybindings: Customize configuration overrides and interactive preferences
  • Background Tasks & Subagents: Manage parallel subagent execution and asynchronous task queues
Managing Conversations
Projects
On this Page
Choose an execution modeBefore you beginAvailable modesCycle execution modes during a sessionReview modifications in default modeAuto-approve edits with accept-edits modeAnalyze tasks before editing with plan modePersist or override your default modeCommon mistakesNext steps