You want the Antigravity CLI to run shell commands inside its terminal sandbox. What do you do?
- Exam domain
- Using coding agents for application development~17% of the exam
- Difficulty
- Medium
- In this mock
- 10 questions on this domainPractise this domain
Why the exam asks this
Using coding agents effectively.
Objective in the exam guide: Using coding agents in secure sandboxes (e.g., Google Kubernetes Engine [GKE], Cloud Workstations, and Antigravity).
Knowing the default and how to turn the sandbox on is a practical safety step.
Why A is the answer
Set enableTerminalSandbox in settings.json, or pass --sandbox
In the Antigravity CLI the terminal sandbox is off by default. You enable it with enableTerminalSandbox in settings.json or the --sandbox flag, and auto mode turns it on.
Remember: Turn the CLI sandbox on explicitly.
How it works
The Antigravity CLI terminal sandbox is off by default.
Turn it on with the enableTerminalSandbox setting or the --sandbox flag.
Clues in the question
The words that point to the answer, and what each one tells you.
- run shell commands inside its terminal sandbox
- A setting you must turn on.
In detail
- The Antigravity app runs commands in an isolated sandbox by default, and the CLI does not.
- The CLI default mode, request-review, asks before writes and commands unless an allow rule matches.
- Permissions use allow and deny lists, such as allowing git and denying rm -rf.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Set enableTerminalSandbox in settings.json, or pass --sandboxRight
Turn the CLI sandbox on explicitly.
B. Write a PostToolUse hook that undoes changes after each commandWrong
PostToolUse hooks only observe, and undoing after the fact is not isolation.
C. Add a rule to AGENTS.md asking the agent to be carefulWrong
A rule is guidance to the model, not enforcement.
D. Nothing, the CLI sandbox is always on by defaultWrongMost tempting
The CLI sandbox is off unless you enable it.
Why it tempts: It is off until you enable it.
Use case
An illustrative scenario, not a real incident.
Illustrative: a platform team ships a settings.json with the sandbox on and a deny list, so every developer starts safe.
See it in different ways
flowchart TD
Q{"Where should the coding agent run commands?"}
Q -->|"Untrusted repo or broad permissions"| A0["Isolated sandbox Cloud Workstations, GKE or the Antigravity terminal sandbox"]
Q -->|"Trusted repo, every command reviewed"| A1["Local workspace with request-review"]How to read this chart
- At "Where should the coding agent run commands?": if "Untrusted repo or broad permissions", go to "Isolated sandbox Cloud Workstations, GKE or the Antigravity terminal sandbox"; if "Trusted repo, every command reviewed", go to "Local workspace with request-review".
flowchart TD
Q{"Where does the agent run?"}
Q -->|"App"| A0["Sandbox on by default"]
Q -->|"CLI"| A1["Enable with --sandbox or settings"]How to read this chart
- At "Where does the agent run?": if "App", go to "Sandbox on by default"; if "CLI", go to "Enable with --sandbox or settings".