Skip to content

Request contains an invalid argument #24695

@CAJ2

Description

@CAJ2

What happened?

I tried to create the simplest reproduction. I have a current Google AI Pro subscription.

  1. Launch Gemini CLI in blank directory
  2. Switch to plan mode
  3. Type Create a test.txt with the words 'Hello World!'
  4. Gemini creates a plan correctly
  5. Approve plan with auto-accept edits
  6. Receive this:
[API Error: [{
    "error": {
      "code": 400,
      "message": "Request contains an invalid argument.",
      "errors": [
        {
          "message": "Request contains an invalid argument.",
          "domain": "global",
          "reason": "badRequest"
        }
      ],
      "status": "INVALID_ARGUMENT"
    }
  }
  ]]

Debug console:

╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Debug Console (F12 to close)                                                                                                                                                    │
│                                                                                                                                                                                 │
│          '        "domain": "global",\n' +                                                                                                                                      │
│          '        "reason": "badRequest"\n' +                                                                                                                                   │
│          '      }\n' +                                                                                                                                                          │
│          '    ],\n' +                                                                                                                                                           │
│          '    "status": "INVALID_ARGUMENT"\n' +                                                                                                                                 │
│          '  }\n' +                                                                                                                                                              │
│          '}\n' +                                                                                                                                                                │
│          ']',                                                                                                                                                                   │
│        headers: {                                                                                                                                                               │
│          'alt-svc': 'h3=":443"; ma=2592000,h3-29=":443"; ma=2592000',                                                                                                           │
│          'content-length': '287',                                                                                                                                               │
│          'content-type': 'application/json; charset=UTF-8',                                                                                                                     │
│          date: 'Sat, 04 Apr 2026 23:09:39 GMT',                                                                                                                                 │
│          server: 'ESF',                                                                                                                                                         │
│          'server-timing': 'gfet4t7; dur=490',                                                                                                                                   │
│          vary: 'Origin, X-Origin, Referer',                                                                                                                                     │
│          'x-cloudaicompanion-trace-id': 'eecfe7b51506e845',                                                                                                                     │
│          'x-content-type-options': 'nosniff',                                                                                                                                   │
│          'x-frame-options': 'SAMEORIGIN',                                                                                                                                       │
│          'x-xss-protection': '0'                                                                                                                                                │
│        },                                                                                                                                                                       │
│        status: 400,                                                                                                                                                             │
│        statusText: 'Bad Request',                                                                                                                                               │
│        request: {                                                                                                                                                              ▄│
│          responseURL: 'https://cloudcode-pa.googleapis.com/v1internal:streamGenerateContent?alt=sse'                                                                           █│
│        }                                                                                                                                                                       █│
│      },                                                                                                                                                                        █│
│      error: undefined,                                                                                                                                                         █│
│      status: 400,                                                                                                                                                              █│
│      [Symbol(gaxios-gaxios-error)]: '6.7.1'                                                                                                                                    █│
│    }                                                                                                                                                                           █│
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

CHAT ATTACHED.

bug-report-history-1775344027308.json

What did you expect to happen?

This extremely basic action to work. Not sure how to create a simpler reproduction.

Client information

  • CLI Version: 0.36.0
  • Git Commit: 8b1e649
  • Session ID: 0f0660b5-e092-4270-b6a6-5f142ced9200
  • Operating System: darwin v22.22.2
  • Sandbox Environment: no sandbox
  • Model Version: auto-gemini-3
  • Auth Type: oauth-personal
  • Memory Usage: 324.6 MB
  • Terminal Name: iTerm2 3.6.9
  • Terminal Background: #000000
  • Kitty Keyboard Protocol: Supported

Login information

Personal Google Account

Anything else we need to know?

No response

Metadata

Metadata

Assignees

Labels

area/agentIssues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Qualitystatus/need-triageIssues that need to be triaged by the triage automation.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions