Skip to content

Gemini CLI approval mode toggle in /config #90

@nathanschram

Description

Summary

Gemini CLI in non-interactive mode (which Untether uses via --output-format stream-json) converts all ASK_USER approval decisions to DENY, meaning write tools (file creation, editing) are blocked by default. The only way to enable write tools is --approval-mode=yolo.

Unlike Claude Code, Gemini CLI has no control channel for per-tool interactive approval — it's all-or-nothing.

Solution

Add an engine-aware "Approval mode" toggle to /config for Gemini, tied into the existing plan mode infrastructure:

  • Home page: shows "Approval mode: read-only/full access" when engine is Gemini (alongside Claude's "Plan mode")
  • Sub-page: "Read-only" (default, write tools blocked) / "Full access" (all tools approved via --approval-mode=yolo)
  • Both Claude's plan mode and Gemini's approval mode use the same permission_mode field on EngineOverrides, sharing the config:pm callback prefix

Implementation

  • engine_overrides.py: added PERMISSION_MODE_SUPPORTED_ENGINES = {"claude", "gemini"}
  • config.py: made _page_home and _page_planmode engine-aware
  • Gemini runner's build_args() already passes --approval-mode from permission_mode — no runner changes needed
  • 9 new tests for Gemini approval mode UI

Files changed

  • src/untether/telegram/engine_overrides.py
  • src/untether/telegram/commands/config.py
  • tests/test_config_command.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions