Skip to content

bug(agent-runtime): Gemini runtime cannot run a turn on the current base image — unpinned gemini-cli rejects --system-prompt/--max-turns and fails the trusted-folder check #2971

Closed

Description

@AndriiPasternak31

Problem

On the current agent base image, the Gemini runtime (runtime: gemini-cli) can't complete a turn, whether chat or headless.

Evidence, from a local trinity-agent-base:latest with gemini-cli 0.60.0:

  1. The CLI is unpinned. docker/base-image/Dockerfile runs npm install -g @google/gemini-cli with no version, so each base-image build takes whatever is latest.
  2. Headless flags are rejected. gemini_runtime.py passes --system-prompt and --max-turns, which 0.60.0 rejects:
    $ echo hi | gemini --output-format stream-json --yolo --system-prompt x
    Unknown arguments: system-prompt, systemPrompt
    
    The backend always sends a composed system prompt for headless runs, so every scheduled, MCP or fan-out run exits during argument parsing.
  3. The trusted-folder check fails. With a key set, every invocation stops with: Gemini CLI is not running in a trusted directory. To proceed, either use --skip-trust, set GEMINI_CLI_TRUST_WORKSPACE=true.... Nothing in the base image or agent service sets trust.

Expected

  • Pin @google/gemini-cli to a tested version.
  • Pass only flags that version supports.
  • Configure workspace trust for the agent home.
  • Add a smoke test that runs a real gemini argument parse inside the image.

Also note

Gemini chat turns use bare --resume, which picks the latest session by startTime in a store shared with headless runs. Once headless runs work, a chat can resume a headless run's session. That is the same class as #2958 (fixed there for Claude only), so fix both runtimes together.

Activity

  1. added
    priority-p2
    type-bug
    theme-reliability
    complexity-medium
    on Sep 22, 2026
  2. added
    status-ready
    and removed
    status-ready
    on Sep 27, 2026
  3. self-assigned this
    on Oct 1, 2026
  4. added
    status-in-progress
    on Oct 1, 2026
  5. added
    status-in-dev
    and removed
    status-in-progress
    on Oct 1, 2026
  6. removed
    status-in-dev
    on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

complexity-mediumpriority-p2theme-reliabilitytype-bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions