gemini-cli - 💡(How to fix) Fix Permission 'cloudaicompanion.companions.generateChat' denied on resource [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
google-gemini/gemini-cli#25052Fetched 2026-04-10 03:44:56
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×3commented ×1mentioned ×1subscribed ×1

Error Message

✕ [API Error: [{ "error": {

RAW_BUFFERClick to expand / collapse

What happened?

[ACTION REQUIRED] 📎 PLEASE ATTACH THE EXPORTED CHAT HISTORY JSON FILE TO THIS ISSUE IF YOU FEEL COMFORTABLE SHARING IT.

What did you expect to happen?

✕ [API Error: [{ "error": { "code": 403, "message": "Permission 'cloudaicompanion.companions.generateChat' denied on resource '//cloudaicompanion.googleapis.com/projects/xxx/locations/global' (or it may not exist).", "errors": [ { "message": "Permission 'cloudaicompanion.companions.generateChat' denied on resource '//cloudaicompanion.googleapis.com/projects/xxx/locations/global' (or it may not exist).", "domain": "global", "reason": "forbidden" } ], "status": "PERMISSION_DENIED", "details": [ { "@type": "type.googleapis.com/google.rpc.ErrorInfo", "reason": "IAM_PERMISSION_DENIED", "domain": "cloudaicompanion.googleapis.com", "metadata": { "resource": "projects/xxx/locations/global", "permission": "cloudaicompanion.companions.generateChat" } } ] } } ]]

Client information

  • CLI Version: 0.37.0
  • Git Commit: 352bbe149
  • Session ID: 0aba8037-921c-4751-a774-952f4800bbb1
  • Operating System: darwin v22.21.0
  • Sandbox Environment: no sandbox
  • Model Version: auto-gemini-2.5
  • Auth Type: oauth-personal
  • Memory Usage: 293.6 MB
  • Terminal Name: Unknown
  • Terminal Background: #000000
  • Kitty Keyboard Protocol: Unsupported

Login information

Google account.

Anything else we need to know?

Seems not the first issue - I wonder if it is supposed to be eventually fixed?

extent analysis

TL;DR

The most likely fix is to ensure the correct IAM permissions, specifically 'cloudaicompanion.companions.generateChat', are granted on the resource '//cloudaicompanion.googleapis.com/projects/xxx/locations/global'.

Guidance

  • Verify the IAM permissions for the Google account used to authenticate, focusing on the 'cloudaicompanion.companions.generateChat' permission.
  • Check if the resource '//cloudaicompanion.googleapis.com/projects/xxx/locations/global' exists and is correctly configured.
  • Review the Google Cloud IAM settings to ensure the necessary permissions are granted to the user or service account being used.
  • Consider updating the CLI version or checking for known issues related to IAM permissions in the current version (0.37.0).

Notes

The provided information suggests an IAM permission issue, but without more details about the Google Cloud setup or the specific requirements of the 'cloudaicompanion.companions.generateChat' permission, it's difficult to provide a more specific solution.

Recommendation

Apply a workaround by manually checking and configuring the necessary IAM permissions for the Google account being used, as it seems the current setup lacks the required 'cloudaicompanion.companions.generateChat' permission.

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