Elevation modal "Allow Once" silently mutates global "Terminal Command Auto Execution" to "Always Proceed"

### Classification & Severity

* **Component**: Antigravity IDE / Terminal Sandbox / Settings Persistence (Electron Client)

* **Severity**: High (Silent Privilege Escalation / Deceptive UI Affordance)

* **CWE References**: CWE-269 (Improper Privilege Management), CWE-1188 (Insecure Default Initialization)

### Executive Summary

When an operator approves an agent terminal command requesting `BypassSandbox: true` by clicking “Allow Once” in the interactive confirmation modal, the IDE client does not grant an ephemeral single-execution permit. Instead, it silently mutates the persistent global setting `Terminal Command Auto Execution` from `Proceed in Sandbox` to `Always Proceed`.

This permanently disarms the client-side confirmation gatekeeper for all subsequent commands without operator disclosure. Furthermore, merely interacting with radio buttons inside the modal triggers reactive `onChange` events that commit changes to disk even if dismissed via “Skip”, and process cold-boot autonomously resets the setting to `Always Proceed`.

### Environment

* **Platform**: macOS (Darwin arm64)

* **Application**: Antigravity IDE

### Steps to Reproduce

1. Open IDE Settings. Set **Terminal Command Auto Execution** to `Proceed in Sandbox`. Ensure **Advanced Command Access** is empty.

2. Direct the agent to execute a command with `BypassSandbox: true` (e.g. `ls “/Volumes/…”`).

3. Observe Gate 1 modal dialog presenting 4 options:

- (●) Yes, allow once

- ( ) Yes, always allow this command

- ( ) Yes, always proceed

- ( ) No, tell the agent what to do

4. Click **“Allow Once”** (or submit with the default pre-selected first option).

5. Open IDE Settings and inspect **Terminal Command Auto Execution**.

### Observed Behavior

* `Terminal Command Auto Execution` has been permanently flipped to `Always Proceed` in configuration storage.

* All subsequent agent commands requesting `BypassSandbox: true` execute silently on the host machine with zero confirmation modals.

### Expected Behavior

* Selecting **“Allow Once”** must grant an ephemeral, per-invocation execution lease strictly for the active command context.

* Global application configuration (`Terminal Command Auto Execution`) must remain on `Proceed in Sandbox`.

* Modal form controls must not fire reactive `onChange` persistent configuration writes until explicitly submitted by the user.

### Root Cause Analysis (Electron State Pollution)

1. **Conflating Transactional Modal State with Global Configuration**: The elevation modal appears to bind radio form inputs directly to the application’s global Redux/settings store via reactive `onChange` handlers, rather than maintaining local, isolated modal state.

2. **IPC Authorization Coupling**: The renderer-to-main IPC message authorizing subprocess execution couples the command dispatch with a global preference update (`config:update`), ratcheting auto-execution to `Always Proceed`.

3. **Cold-Boot Regression**: Electron main process re-initialization falls back to a hardcoded factory default (`Always Proceed`), discarding user preference persistence across cold-boot cycles.

Hi @Michael_Martz,

I attempted to reproduce the issue but was unsuccessful. Could you please provide the following details?

  • The version of Antigravity you are using.
  • The operating system you are using.

Antigravity IDE 2.5.5

macOS Sonoma 14.8.9

No matter what I do Terminal Command Auto Execution reverts to Always Allow in a 2-5 minute window with no user interaction. I first noticed the effect when I started to probe having the AI use BypassSandbox: true to test containment.

I just confirmed on a new user account, starting from scratch.

  1. Initially set Security to “Sandboxed” and “Proceed in Sandbox”.
  2. Then asked the agent: Try to executing the ls command on /Volumes with BypassSandbox: true.
  3. Click on the various Yes answers but do not Submit.
  4. Click on Skip.
  5. After a period of time the Terminal Command Auto Execution changes to “Always Proceed” on its own.
  6. From that point onward. Clicking “Proceed in Sandbox” on lasts for a couple of minutes before it is autonomously toggled back to "Always Proceed.