Skip to content

[Bugfix #370] Fix Gemini --yolo mode in general consultations - #371

Merged
waleedkadous merged 1 commit into
mainfrom
builder/bugfix-370-gemini-yolo-mode-allows-writes
Feb 17, 2026
Merged

waleedkadous merged 1 commit into
mainfrom
builder/bugfix-370-gemini-yolo-mode-allows-writes

Conversation

@waleedkadous

Copy link
Copy Markdown
Contributor

Summary

Fixes #370

Root Cause

MODEL_CONFIGS hardcoded args: ['--yolo'] for Gemini, passing it unconditionally to both general mode (--prompt) and protocol mode (--type). In general mode, this gave Gemini full write access via auto-approval, allowing it to silently modify files in the main worktree.

Fix

  • Removed --yolo from MODEL_CONFIGS.gemini.args (now [])
  • Added generalMode parameter to runConsultation()
  • --yolo is now only passed in protocol mode (when --type is set), where structured reviews need file access
  • General mode consultations no longer get write access

Test Plan

  • Added regression test: general mode does NOT pass --yolo to Gemini CLI
  • Added regression test: protocol mode DOES pass --yolo to Gemini CLI
  • Updated existing model config test to reflect new default
  • All 37 consult tests pass
  • Build succeeds
  • Full test suite passes (1 pre-existing flaky test in send-integration.test.ts — unrelated)

General mode consultations (consult -m gemini general "...") were passing
--yolo to the Gemini CLI, allowing it to auto-approve file writes in the
main worktree. This removes --yolo from MODEL_CONFIGS and only adds it
conditionally for protocol mode (--type), where structured reviews need
file access.
@waleedkadous
waleedkadous merged commit e22b334 into main Feb 17, 2026
3 of 7 checks passed
@waleedkadous
waleedkadous deleted the builder/bugfix-370-gemini-yolo-mode-allows-writes branch February 17, 2026 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gemini --yolo mode allows writes to main worktree during consult general

1 participant