Skip to content

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

Closed

Description

@waleedkadous

Bug

Running consult -m gemini general "..." from the main worktree gives Gemini full write access via --yolo mode. If the model interprets an audit/review task as requiring fixes, it will silently edit files in the main worktree.

What happened

  1. Ran consult -m gemini general "audit all prompts..." from main
  2. Gemini auto-approved its own file writes (9 files modified on main)
  3. Edits were only discovered when af spawn refused due to uncommitted changes

Expected behavior

General mode consultations should be read-only — models should be able to read files but not modify them. PR reviews already solve this by running in a temporary worktree; general mode has no such protection.

Possible fixes

  1. Remove --yolo for general mode — require explicit approval for writes
  2. Run general mode in a temp worktree — same pattern as PR reviews
  3. Use --yolo with write-protection — if Gemini supports read-only tool approval
  4. At minimum: strip --yolo when the prompt is clearly read-only (audit, review, etc.)

Impact

Silent modification of the main worktree. Could corrupt working state, create merge conflicts, or produce confusing uncommitted changes that block builder spawning.

Activity

  1. added
    bug
    on Feb 17, 2026
  2. waleedkadous commented on Feb 17, 2026

    @waleedkadous
    ContributorAuthor

    On it! Working on a fix now.

  3. added a commit that references this issue on Feb 17, 2026
  4. added 2 commits that reference this issue on Feb 17, 2026
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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions