openclaw - ✅(Solved) Fix Fix gemini-cli detection and project discovery issues [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#60479Fetched 2026-04-08 02:50:36
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Participants
Assignees
Timeline (top)
assigned ×1closed ×1commented ×1cross-referenced ×1

Root Cause

When using the npm-installed @google/gemini-cli, OpenClaw fails to detect it because it expects an oauth2.js file that is not present in the bundled version. Additionally, project discovery fails with a 400 Bad Request due to a mismatch in metadata and headers compared to what gemini-cli uses.

Fix Action

Fixed

PR fix notes

PR #60486: Fix gemini-cli detection and project discovery

Description (problem / solution / changelog)

Closes #60479. This PR fixes the detection of bundled gemini-cli and aligns project discovery headers/metadata with gemini-cli to avoid 400 errors.

AI-Assisted PR 🤖

  • Degree of testing: Fully tested (reproduced issue locally and verified fix).
  • Tooling: Fixed using Gemini CLI.
  • Verification: Changes align with gemini-cli internal request formats and bundle structure.

Changed files

  • extensions/google/oauth.credentials.ts (modified, +35/-4)
  • extensions/google/oauth.project.ts (modified, +7/-16)
RAW_BUFFERClick to expand / collapse

When using the npm-installed @google/gemini-cli, OpenClaw fails to detect it because it expects an oauth2.js file that is not present in the bundled version. Additionally, project discovery fails with a 400 Bad Request due to a mismatch in metadata and headers compared to what gemini-cli uses.

extent analysis

TL;DR

The issue can be resolved by ensuring the presence of an oauth2.js file or modifying the project discovery to match the metadata and headers expected by OpenClaw.

Guidance

  • Verify the expected location and contents of the oauth2.js file to understand what OpenClaw is looking for.
  • Check the @google/gemini-cli documentation to see if there's an option to include or generate the missing oauth2.js file.
  • Compare the metadata and headers sent by gemini-cli with those expected by OpenClaw to identify the specific mismatch causing the 400 Bad Request error.
  • Consider modifying the project discovery process to align with the expectations of OpenClaw, potentially by adjusting headers or metadata to match what gemini-cli provides.

Example

No code snippet is provided due to the lack of specific implementation details in the issue.

Notes

The solution may depend on the specific versions of @google/gemini-cli and OpenClaw being used, as well as any custom configurations or modifications made to the project discovery process.

Recommendation

Apply workaround: Modify the project discovery to match the metadata and headers expected by OpenClaw, as this directly addresses the 400 Bad Request error and the missing oauth2.js file issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING