Markdownkeyboard_arrow_down
content_copyCopy Markdown
open_in_newView Markdown
Choose an execution mode
Control whether Antigravity CLI pauses to ask before modifying files or executing commands during a session.
Before you begin
- Install Antigravity CLI
- Have an active project repository with source code to edit
Available modes
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.
| Mode | Behavior | Best for |
|---|---|---|
default | Pauses for interactive diff review before modifying or creating files. | Standard development, reviewing sensitive code changes, and careful refactoring. |
accept-edits | Automatically approves file edits and creations (mkdir, touch, file writes). | Rapid prototyping, iterating on trusted code, and reducing prompt interruptions. |
plan | Prepends 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
/permissionsor--dangerously-skip-permissionscontinue to govern shell commands (run_command) across all execution modes.
Cycle execution modes during a session
You can switch execution modes mid-session without interrupting active tasks or restarting the terminal.
-
Press
Shift+Tabinside the prompt box to cycle through the active sequence:default→accept-edits→plan→default -
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
defaultmode, you can pressShift+Tabto instantly switch toaccept-editsmode and approve all pending file modifications.
Review modifications in default mode
In default mode (request-review), Antigravity CLI pauses before
applying any file writes to disk and renders an inline,
syntax-highlighted diff preview.
# Launch in default interactive review mode
agy
When prompted with a pending file modification:
- Press
yto accept the changes and save the file to disk. - Press
nto 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+Gto open the file inside your$EDITORfor manual adjustments. - Type instructions in the prompt box and press
Enterto reject the edit and tell the agent what to do differently.

New file creation previews
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:
Create file: src/utils/formatter.ts
Allow create this file? [y/n/f]

Auto-approve edits with accept-edits mode
Select accept-edits mode when you want Antigravity CLI to work in
longer, uninterrupted stretches across your filesystem without pausing
for each file modification.
# 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.

Analyze tasks before editing with plan mode
Use plan mode when taking on complex refactoring, multi-file
architectural changes, or unfamiliar codebase investigations.
# 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.

Persist or override your default mode
You can set your preferred startup execution mode permanently across sessions or override it for specific invocations.
Using the interactive settings panel
Open the interactive settings panel mid-session to inspect or update your default configuration.
/settings

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
Set agentMode directly inside your user or project configuration file:
{
"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 overrides
Pass the --mode flag to temporarily override your persistent default
mode for a single terminal run:
# Override settings.json to run in planning mode
agy --mode=planCommon mistakes
| Mistake | Why it fails | Fix |
|---|---|---|
Expecting sandbox in Shift+Tab cycling | sandbox is an OS containment permission setting, not an execution mode | Configure sandbox auto-approval rules inside /permissions |
Using legacy /planning or /fast commands | These vestigial commands were removed in 1.1.0 | Press Shift+Tab to cycle modes or type /plan before your prompt |
Passing --permission-mode | agy uses --mode (--mode=accept-edits or --mode=plan) for execution overrides | Run agy --mode=accept-edits or check agy --help |
Next steps
- 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
Last updated Oct 08, 2026