Cross-platform comparison
| Capability | Claude Code | Codex | Antigravity CLI |
|---|---|---|---|
| Interval loop | /loop 5m … |
Not built-in; use codex exec + cron |
Not built-in; use agy -p + cron |
| Goal-conditioned loop | /goal <condition> |
/goal (features.goals flag) |
/goal + /schedule |
| Parallel fan-out | /batch, /background |
Subagents (/agent) |
/agents + subagents |
| Non-interactive / CI mode | claude -p "…" + --print |
codex exec "…" |
agy -p "…" |
| Scheduled / persistent runs | /schedule (Managed Agents) |
External scheduler + codex exec |
/schedule |
| Harness context file | CLAUDE.md |
AGENTS.md |
AGENTS.md or GEMINI.md |
| Session state / resume | /resume, /branch |
codex resume, /fork |
/resume, /fork |
| Approval / permission gate | /permissions |
--ask-for-approval, /permissions |
/permissions presets |
| Context compaction | /compact |
/compact |
/clear (resets) |
/init to scaffold, /memory to refine. Global variant at ~/.claude/CLAUDE.md.
~/.claude/commands/ for global availability. Reference with $ARGUMENTS placeholder for parameterized commands.
/permissions and /fewer-permission-prompts.
Repeat a prompt on a fixed interval while the session stays open. Omit the interval and Claude self-paces between iterations. Omit the prompt and Claude runs an autonomous maintenance check or the prompt in .claude/loop.md (where available). Stops when the session ends or you press Esc.
| Parameter | Description |
|---|---|
| intervaloptional | Repeat cadence. Units: m minutes, h hours, d days. Minimum 1 minute. Can lead or trail the prompt text. Omit to let Claude self-pace. |
| promptoptional | Instruction to repeat each iteration. Omit to use .claude/loop.md or the default maintenance prompt. |
Polls every 5 minutes. Claude reports each iteration without requiring manual re-prompting.
/schedule for persistence beyond a session.Register a session-level completion condition. Claude keeps working across turns until a separate evaluator model (defaults to Haiku) reads the transcript and confirms the condition is met. A live overlay shows elapsed time, turn count, and token usage. Clear with /goal clear.
| Parameter | Description |
|---|---|
| conditionoptional | Plain-language completion criterion. Must be verifiable from the conversation transcript — the evaluator cannot inspect your filesystem or run commands independently. Omit to show the current or most recently achieved goal. |
| clear / stop / off … | Any of these keywords removes an active goal early. |
Claude iterates until the evaluator confirms both conditions. No "keep going" prompts needed.
claude -p, and Remote Control.Decompose a large codebase change into 5–30 independent units and run each in a parallel background subagent in an isolated git worktree. Each subagent implements its unit, runs tests, and opens a pull request. Requires a git repository.
| Parameter | Description |
|---|---|
| instructionrequired | Description of the codebase-wide change. Claude researches the codebase, decomposes the work, presents a plan for approval, then spawns subagents. |
Claude decomposes by component, spawns one agent per unit, and opens a PR per unit.
Detach the current session to run as a background agent and free the terminal. Monitor with claude agents. Pass a prompt to send one final instruction before detaching. Alias: /bg.
Terminal is freed immediately. Attach later with claude agents to review output.
Create, update, list, or run routines that execute on Anthropic-managed cloud infrastructure (Managed Agents). Claude walks through setup conversationally: cron expression, timezone, and vault environment variables. Each scheduled fire starts a new agent session. Alias: /routines.
Runs on Anthropic servers without an open local session. Pairs with vault environment variables for secret injection.
Summarize the conversation so far to free context window space without losing continuity. Optionally pass focus instructions to weight the summary. Use this mid-loop before context pressure causes degraded output rather than waiting for it to fail.
Manage allow, ask, and deny rules for tool permissions. Controls which shell commands, file edits, and MCP tool calls Claude can run autonomously vs. requiring approval. Rules persist in .claude/settings.json.
/fewer-permission-prompts to build an allowlist automatically from transcript history.The Ralph loop was a Gemini CLI extension (/ralph-loop) that ran an agent in a self-correcting cycle: act, verify via hook, feed result back, repeat up to a configurable iteration limit. It is not available in Claude Code or Antigravity CLI.
In Claude Code, the equivalent pattern is /goal with a verifiable exit condition, or a custom slash command in .claude/commands/ that embeds assess-act-verify logic. In Antigravity CLI, replicate it with hooks and subagents.
/init to scaffold. Supports a precedence chain: global (~/.codex/AGENTS.md) → repo root → subdirectory overrides.
-c key=value.
$skill-name in the composer. The recommended replacement for deprecated custom prompts (~/.codex/prompts/).
Set a persistent objective that Codex works toward until it finishes the task, pauses, or needs input. Use /plan first to shape the goal before committing to it. Progress shows above the composer; pause, resume, edit, or clear from there.
| Parameter | Description |
|---|---|
| conditionoptional | Plain-language objective. Omit to view current goal status. |
/goal is absent from the slash list, add [features] goals = true to ~/.codex/config.toml, or run codex features enable goals.Start code review mode. A separate Codex reviewer agent inspects uncommitted changes or a base branch diff and returns prioritized findings. Use /diff to inspect exact changes before or after review.
Adjust what Codex can do without asking for approval in the current session. Use /approve to retry a recently denied action once under the current session policy.
CLI flag controlling when Codex pauses for human confirmation before running a command. Set at invocation; also configurable in config.toml as the default approval policy.
| Mode | Behavior |
|---|---|
| on-request | Pauses and asks before each tool call. Recommended for interactive runs. |
| never | Runs all commands without pausing. Use inside an isolated CI environment or sandbox VM. |
| on-failure deprecated | Pauses only on failure. Deprecated; prefer on-request or never. |
--ask-for-approval never with --sandbox workspace-write for unattended local runs. Avoid --dangerously-bypass-approvals-and-sandbox (--yolo) outside a hardened environment.Run a single prompt non-interactively. The primary mechanism for scripting Codex in CI pipelines and external orchestrators. Combine with a system scheduler (cron, GitHub Actions, etc.) to build interval loops outside a session.
| Flag | Description |
|---|---|
| --full-auto | Runs without approvals or interactive prompts. Requires a sandboxed environment. |
| --sandbox | Sandbox mode: workspace-write (write inside workspace only), danger-full-access (no restriction — isolated VM only). |
| --json | Stream newline-delimited JSON events instead of formatted text. Pair with --output-last-message for machine-readable CI output. |
| --model | Override the configured model for this run. |
Codex spawns subagents only when explicitly asked. Each subagent does its own model and tool work; subagent workflows consume more tokens than single-agent runs. Use /agent to switch between active agent threads, and configure roles and parallelism under [agents] in config.toml.
agy) replaced Gemini CLI on June 18, 2026 for free, Pro, and Ultra users. Enterprise/Standard Gemini Code Assist access is unchanged. The /ralph-loop extension from Gemini CLI is not available in Antigravity CLI — replace it with hooks and subagents.
AGENTS.md for cross-platform portability.
toolPermission), artifact review policy, sandbox, verbosity, and telemetry. Edit via /config or directly.
.geminiignore if absent.
Set a persistent objective that Antigravity works toward until the task is complete, paused, or needs input. Use /planning first to shape complex goals before committing. Progress shows above the composer. Pair with /schedule for recurrent goal execution.
/usage and avoid over-parallelizing subagents — Pro/Ultra quotas support 3–5 parallel subagents comfortably. Use /grill-me (plan-before-spend) on expensive goals.Enable multi-turn plan mode for complex tasks. The agent produces a structured plan before executing, equivalent to Claude Code's /plan. Use before setting a /goal on work that spans many files or subagents.
Open the Agent Manager panel to review subagent approvals and activity. Antigravity CLI is multi-agent by default; subagents are dispatched automatically based on task complexity. Use Alt+J to switch focus to the next subagent awaiting confirmation, and Ctrl+K to approve from the fast-path alert.
Open the Task Manager panel to view shell execution logs from the current session. Use this to inspect what tool calls subagents have made and verify gate conditions (tests, linting, security scans) without switching terminals.
Switch the permission preset controlling which tool calls require approval. Four presets are available. Changes persist to settings.json. Add, edit, or remove granular rules directly from this panel (added v1.0.5).
| Preset | Behavior |
|---|---|
| request-review | Default. Pauses for confirmation on non-read tool calls. |
| proceed-in-sandbox | Auto-proceeds inside a sandbox environment; pauses outside. |
| always-proceed | No confirmation prompts. Use only in a controlled, isolated workspace. |
| strict | Prompts for every non-read tool call, including low-risk ones. |
Run a single prompt non-interactively and print the response. The primary mechanism for scripting Antigravity CLI in CI pipelines and external schedulers. Combine with cron or a scheduler for interval-based loops outside a session. Pair with --model to select a tier appropriate to the task.
| Flag | Description |
|---|---|
| -p / --print | Non-interactive mode. Prints response and exits. Alias: --prompt. |
| --model | Set the model for this session only. List available models with agy models. |
| --print-timeout | Wait timeout for print mode. Default 5 minutes. |
| --dangerously-skip-permissions | Auto-approve all tool requests. Use only in an isolated environment. |