Skip to content

Show helpful message when Gemini CLI fails with trust directory error #14

Description

@benthomasson

Problem

When Gemini CLI is not trusted for a workspace, code-review reports a cryptic BLOCK verdict with the raw error. This has been happening on every review recently since Gemini CLI added workspace trust as a security requirement.

Current behavior

## gemini [BLOCK]

### ERROR
**Verdict:** BLOCK

Model invocation failed: Model gemini failed: Gemini CLI is not running in a trusted directory...

Proposed behavior

Detect the trust directory error and show a helpful message:

## gemini [SKIPPED]

Gemini CLI requires workspace trust. To fix, run interactively in this repo:

    cd /path/to/repo && gemini
    # then type /trust

See: https://geminicli.com/docs/cli/trusted-folders/

Notes

  • Should not suggest GEMINI_CLI_TRUST_WORKSPACE=true as the fix — that blanket-trusts all workspaces
  • Per-directory trust via /trust in interactive mode is the safe approach
  • The review should continue with remaining models rather than reporting BLOCK

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions