gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

Unable to quit the app when api key not set

Open bbiggs opened this issue 1 year ago • 6 comments

What happened?

  1. unset GEMINI_API_KEY
  2. launch app
  3. auth dialog: choose Use Gemini API Key
  4. See message "GEMINI_API_KEY environment variable not found. Add that to your environment and try again"
  5. Hit ^C - app does not quit
  6. Hit ESC - app does not exit
  7. Hit ^Z - app does not suspend

What did you expect to happen?

Expect to be able to quit the app and set an API key to continue.

Client information

Client Information

Run gemini to enter the interactive CLI, then run the /about command.

> /about
╭────────────────────────────────────────╮
│                                        │
│ About Gemini CLI                       │
│                                        │
│ CLI Version  0.6.0-nightly             │
│ Git Commit   f656f143                  │
│ Model        gemini-2.5-pro            │
│ Sandbox      no sandbox                │
│ OS           linux                     │
│ Auth Method  gemini-api-key            │
│                                        │
╰────────────────────────────────────────╯

Login information

No response

Anything else we need to know?

No response

bbiggs avatar Sep 12 '25 05:09 bbiggs

The application becomes unresponsive and cannot be quit when an API key is not set during the authentication flow. This is a significant bug. Requesting client information as it is missing, and lowering priority until provided.

gemini-cli[bot] avatar Sep 12 '25 05:09 gemini-cli[bot]

updated with client information

bbiggs avatar Sep 12 '25 05:09 bbiggs

@bbiggs you should try ^D or ^C twice, yep a little bit annoying

wilyJ80 avatar Sep 12 '25 16:09 wilyJ80

^C twice also does not work.

bbiggs avatar Sep 13 '25 17:09 bbiggs

Closing as we will track work on this in #8648.

agmsb avatar Sep 18 '25 00:09 agmsb