google-github-actions / google-github-actions/run-gemini-cli

pr-review example ships tools.core: [] which disables all MCP tools since gemini-cli v0.41.0 – workflow green but no review posted

Open Beginner friendly
#532 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.1k
Forks
285
Avg merge
8h 8m
Merged PRs (30d)
1

Description

TL;DR

The examples/workflows/pr-review example ships with:

"tools": {
  "core": []
}

Since gemini-cli v0.41.0 (google-gemini/gemini-cli#25720), any tools.core value – including the empty array – makes the policy engine emit a wildcard * DENY that statically excludes every MCP tool from the tool registry, even in YOLO mode and even with the MCP server trusted/allowed. That means the example as shipped disables the github-mcp-server the workflow depends on: the model receives no MCP tool declarations, blind-guesses tool names until maxSessionTurns is exhausted (Tool "<name>" not found. Did you mean "activate_skill"?), and – because the CLI exits 0 with the error only embedded in JSON stdout – the workflow stays green while posting no review.

Full root-cause analysis with source references at gemini-cli v0.50.0 (policy priorities, PolicyEngine.getExcludedTools(), repro, verified workarounds) is in the upstream report: google-gemini/gemini-cli#28361.

Expected behavior

Deploying the pr-review example as documented produces a PR review.

Observed behavior

Green workflow run, no review posted. Logs show the MCP server's tools being discovered (Refresh for 'github' discovered 3 tools) but none callable; the run ends in FatalTurnLimitedError inside the JSON stdout with exit code 0. (That the action treats this as success is #519; the extension's stale hard-coded tool names, #510, make the blind-guessing loop even less likely to accidentally recover.)

Suggested fix

Until/unless the upstream policy behaviour changes, the example settings should allowlist what the workflow actually needs. Verified working end-to-end:

"tools": {
  "core": [
    "activate_skill",
    "mcp_github_*"
  ]
}

or equivalently "tools": { "allowed": ["mcp_github_*"] } plus "core": ["activate_skill"]. Note activate_skill must be allowlisted explicitly – the code-review extension's mandatory skill activation is a built-in tool call that "core": [] also denies.

Environment
  • google-github-actions/run-gemini-cli with the pr-review example as shipped (gemini-cli-extensions/code-review extension, github-mcp-server v0.27.0)
  • gemini-cli v0.50.0, GitHub Actions ubuntu-latest, non-interactive mode, GEMINI_API_KEY auth

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open examples/workflows/pr-review/gemini-review.yml and inspect the tools configuration used by the pr-review example. Update it according to the verified allowlist described in the issue, then run the documented workflow with the listed environment to confirm that it posts a PR review rather than ending green without one.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
ci-cd
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
85/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.