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

"Loaded cached credentials" message appears twice during CLI startup

Open JayadityaGit opened this issue 1 year ago • 8 comments

What happened?

When starting the Gemini CLI, the message "Loaded cached credentials" is printed twice. This happens because the authentication logic (initializeApp()) runs both in the temporary launcher process and again in the final child process after relaunch.

What did you expect to happen?

The authentication logic should only run once in the final process. The message "Loaded cached credentials" should appear only a single time during startup.

Client information

│ About Gemini CLI │ │ │ │ CLI Version 0.7.0-nightly.20250918.2722473a │ │ Git Commit 2722473a │ │ Model gemini-2.5-pro │ │ Sandbox no sandbox │ │ OS linux │ │ Auth Method OAuth │ │

Login information

No response

Anything else we need to know?

No response

JayadityaGit avatar Sep 19 '25 07:09 JayadityaGit

The issue describes a bug where a credential loading message appears twice on startup. This is related to the authentication flow, making it area/authentication. Since it's a non-blocking but noticeable startup issue, it's classified as a priority/p2 bug.

gemini-cli[bot] avatar Sep 19 '25 07:09 gemini-cli[bot]

It would be preferable if one could turn that message off completely, it's very annoying to see that at startup all the time especially when running gemini in non-interactive mode where the only thing you wish to see in the console is gemini's response, not some repetitive logging message. It would be more informative if a message appeared only in case the credentials were not loaded as expected. The normal successful start should not unnecessarily print anything IMHO.

anthrotype avatar Sep 19 '25 09:09 anthrotype

I'm also experiencing this issue. The 'Loaded cached credentials' message appears twice on startup for me as well. Re-logging in did not resolve the problem.

Image

uppinote20 avatar Sep 20 '25 09:09 uppinote20

I personally use the Google OAuth flow, and I noticed that the “Loaded cached credentials” message appears twice during CLI startup.

This happens because the authentication logic runs in both the launcher process and again in the final application process.

I’ve addressed this issue in PR #8859

JayadityaGit avatar Sep 20 '25 10:09 JayadityaGit

+1

Image

gaureshpai avatar Sep 20 '25 17:09 gaureshpai

why is this closed? I still have the issue with the lastest gemini cli: v0.33.1

zhaob1n avatar Mar 16 '26 10:03 zhaob1n

Hey @zhaob1n !

personally i am using nightly build version v0.35.0 , i dont see it, if you happen to experience please create an issue

thanks !

JayadityaGit avatar Mar 16 '26 10:03 JayadityaGit

Image

JayadityaGit avatar Mar 16 '26 10:03 JayadityaGit