Repository navigation
Conversation
- Normalize auto-mode stance matching by CLI option identity so --approval-mode=<value> is recognized as an explicit stance. - Treat Gemini --yolo and -y as explicit legacy approval aliases to avoid appending --approval-mode=yolo and triggering upstream flag conflicts. - Stop stance detection at the first -- argument terminator so positional literals are not mistaken for permission options. - Add provider and worker-launch regressions for explicit approval modes, legacy aliases, terminator handling, and normal auto-mode fallback.
Collaborator
|
Thank you, @HsienW. We took this whole into 0.5.5, so it is already in the installers people are running. We want to merge it here too, so the credit sits on your pull request. One thing stands in the way, and it is not your code: the Typecheck check is red because a links check inside that job was failing on |
- Retrigger CI after the upstream main branch fix. - Keep the existing pull request code unchanged. - Refresh the required checks against the current base branch.
Contributor
Author
|
@chaitanyagiri Thanks! |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Global Auto Mode did not recognize Gemini
--approval-mode=<value>arguments as an existing approval stance, so an explicit mode such asplancould receive an additional--approval-mode=yolo.Gemini's legacy
--yoloand-yaliases could also receive the modern approval flag, creating a combination that Gemini CLI rejects. This change matches auto mode by CLI option identity, treats the legacy aliases as explicit stances, and stops stance detection at the first--argument terminator while preserving the normal auto mode fallback when no stance is present.Closes #483
Type of change
Evidence
Before
On main, Global Auto Mode appended
--approval-mode=yoloeven when Gemini already had an explicit approval stance.--approval-mode=planreceived a second approval mode, and the legacy--yoloform received the conflicting modern flag.After
On the fixed revision, explicit Gemini approval stances are preserved.
--approval-mode=plan,--yolo, and-yremain unchanged, while a command with no explicit approval stance still inherits--approval-mode=yolo.How I tested it
buildWorkerLaunch()reproduction before and after the change.gemini --approval-mode=planremains unchanged.gemini --yoloandgemini -yremain unchanged.gemini --model prostill receives--approval-mode=yolo.node test/agent-provider.test.cjs: PASS.node --test test/worker-launch.test.cjs: 17/17 PASS.npm run typecheck: PASS.npm run build: PASS.git diff --check: PASS.npm run test:focusedsuite. The Gemini regressions pass, while the suite still reports existing unrelated Windows/sandbox failures involving symlinkEPERM, temporary HOME handling, and existing static assertions.Checklist
npm run typecheckpasses.npm run test:focusedpasses.npm run buildsucceeds.commented-out code, or unrelated formatting churn in it.
DESIGN.md/tokens.ts— no ad-hoc colors,spacing, or fonts.
ATTRIBUTION.md.