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:
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
-
Check out the current main branch.
-
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}))"
- Observe that the generated command contains both approval-mode values:
gemini --approval-mode=plan --approval-mode=yolo
- 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}))"
- Observe that Global Auto Mode also appends the modern approval flag:
gemini --yolo --approval-mode=yolo
Screenshot or screen recording
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
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:
currently becomes:
The same issue affects Gemini's legacy YOLO aliases. For example:
can become:
Gemini CLI rejects combining
--yolo/-ywith --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=yolowhen 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
Check out the current
mainbranch.From the repository root, run this command with Global Auto Mode enabled in the worker-launch options:
Screenshot or screen recording
Terminal reproduction attached above. The first case shows an explicit
--approval-mode=planreceiving an additional--approval-mode=yolo. The second shows the legacy--yoloform 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
npm installsonode-ptyis rebuilt for the current Electron ABI (source installs only).