Problem
Currently, restricting file tools to the workspace (allowNonWorkspaceAccess: false) can only be set globally in ~/.gemini/antigravity-cli/settings.json. While --sandbox restricts terminal commands, internal file tools can still write outside the workspace unless global host settings are mutated on disk before execution. This blocks headless pipelines, multi-agent runners, and concurrent sessions.
Proposed Solution
Expose a per-session runtime flag or environment variable override:
- CLI Flag:
agy --no-non-workspace-accessoragy --allow-non-workspace-access=false - Env Var:
AGY_ALLOW_NON_WORKSPACE_ACCESS=false agy run ...
Prior Art
Other agent CLIs support runtime confinement without modifying global user state:
- Codex CLI:
codex exec --sandbox workspace-write - Claude Code:
claude --permission-mode dontAsk
This addition would allow antigravity-cli to safely run in automated evaluation harnesses and CI/CD pipelines out of the box.