Skip to content

Global Auto Mode appends Gemini YOLO over an explicit approval stance #483

Description

@HsienW

What happened?

When Global Auto Mode is enabled, an explicit Gemini approval stance is not always recognized before the worker command is built.

For example, a request command such as:

gemini --approval-mode=plan

currently becomes:

gemini --approval-mode=plan --approval-mode=yolo

The same issue affects Gemini's legacy YOLO aliases. For example:

gemini --yolo

can become:

gemini --yolo --approval-mode=yolo
  • Gemini CLI rejects combining --yolo / -y with --approval-mode, so this can turn an otherwise valid command into one that fails CLI validation.

  • The expected behavior is that an explicit provider approval stance wins and Global Auto Mode only supplies --approval-mode=yolo when no explicit stance is present.

  • This reproduces in the command-building path before Gemini is spawned, so no Gemini installation, API key, or Electron UI launch is required.

Steps to reproduce

  1. Check out the current main branch.

  2. From the repository root, run this command with Global Auto Mode enabled in the worker-launch options:

node -e "const loadTs=require('./test/load-ts.cjs'); const {buildWorkerLaunch}=loadTs('src/main/workerLaunch.ts'); console.log(buildWorkerLaunch({requestCommand:'gemini --approval-mode=plan',autoMode:true}))"
  1. Observe that the generated command contains both approval-mode values:
gemini --approval-mode=plan --approval-mode=yolo
  1. Repeat with Gemini's legacy YOLO flag:
node -e "const loadTs=require('./test/load-ts.cjs'); const {buildWorkerLaunch}=loadTs('src/main/workerLaunch.ts'); console.log(buildWorkerLaunch({requestCommand:'gemini --yolo',autoMode:true}))"
  1. Observe that Global Auto Mode also appends the modern approval flag:
gemini --yolo --approval-mode=yolo

Screenshot or screen recording

Image

Terminal reproduction attached above. The first case shows an explicit --approval-mode=plan receiving an additional --approval-mode=yolo. The second shows the legacy --yolo form receiving the conflicting modern approval flag.

Logs / stack trace

Operating system

Windows

OS version

Windows 11

Munder Difflin version

0.5.2

Node version

v22.22.3

Agent CLI and version (if relevant)

No response

Pre-flight

  • I attached a screenshot or recording above.
  • I'm on the latest release, or I've said above why I can't be.
  • I re-ran npm install so node-pty is rebuilt for the current Electron ABI (source installs only).
  • I searched existing issues and this isn't a duplicate.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingos:windowsReported on Windows

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions