[Bug] "Always Proceed" Terminal Auto Execution does not auto-execute commands

Summary

The “Always Proceed” option under Settings > Agent > Terminal Command Auto Execution does not auto-execute terminal commands. Despite the setting being saved and displayed correctly, the agent still prompts the user to click “Run” or “Reject” for every single terminal command.

Antigravity 1.19.6 / VSCode OSS 1.107.0 / Windows 11


Steps to Reproduce

  1. Open Settings > Agent > Terminal section
  2. Set Terminal Command Auto Execution to “Always Proceed”
  3. Start a new conversation (the setting says it only applies to new messages)
  4. Ask the agent to run any terminal command (e.g. echo hello)

Expected: Command executes immediately without user interaction
Actual: Agent shows a “Run command?” prompt with “Reject” and “Run” buttons. The dropdown on the step shows “Always run” (correct), but the command does NOT auto-execute.


Root Cause (from minified source analysis)

The run_command step renderer has an onChange handler that calls confirm(true) only when the user manually switches the per-step dropdown. There is no useEffect that checks the saved global policy on component mount and auto-confirms new steps.

What exists (fires only on dropdown change):

const onPolicyChange = useCallback((newPolicy) => {
    stepHandler?.setTerminalAutoExecutionPolicy?.(newPolicy);
    if (newPolicy === TerminalPolicy.EAGER) {
        confirm(true);  // only triggers on manual dropdown interaction
    }
}, []);

What is missing (should fire on mount):

// Nothing exists to auto-confirm when a new step renders.
// The component reads the saved policy, displays the correct label,
// but never calls confirm(true) based on it.

The UI is “read-only” with respect to the saved policy. The confirm(true) path is only reachable through user interaction.


Proposed Permanent Fix

Add a useEffect to the step renderer that auto-confirms when the global policy permits it:

useEffect(() => {
    // Don't re-confirm already resolved steps
    if (isResolved) return;

    // Respect Secure Mode
    if (secureModeEnabled) return;

    // Respect the Deny List (the setting description says "except those in the Deny list")
    if (isDeniedCommand(commandText)) return;

    // Auto-confirm when policy is "Always Proceed"
    if (terminalAutoExecutionPolicy === TerminalPolicy.EAGER) {
        confirm(true);
    }
}, [terminalAutoExecutionPolicy, secureModeEnabled]);

Files affected:

  • resources/app/out/vs/workbench/workbench.desktop.main.js
  • resources/app/out/jetskiAgent/main.js

Both contain the same onChange-only pattern and need the same useEffect.

Estimated effort: ~10-15 lines in unminified source. All required state (policy, secureModeEnabled, confirm) is already in scope.


Community Workarounds (Temporary)

  1. HOME env var (Windows only): [System.Environment]::SetEnvironmentVariable('HOME', "$env:USERPROFILE", 'User') in admin PowerShell, then restart. Works for some users.
  2. Community patch: better-antigravity injects the missing useEffect via regex patching. Creates backups, reversible, but must be re-applied after updates.

This bug affects every user who sets “Always Proceed” and is the primary blocker for autonomous agent workflows. Would appreciate an official fix. Thanks!

3 Likes

Hello @MrCurlyMole,
Thank you for sharing your findings. I have forwarded your report to our engineering team, who are currently investigating the matter.
We appreciate your patience as we work toward a resolution.

2 Likes

Thanks for mentioning my project! I already sent various reports via Antigravity Feedback feature. Hope you leaved a star for my findings :slight_smile:

2 Likes