[Deep Issue Investigation & Findings] Gemini CLI OAuth mode became dramatically slower / hangs on "Thinking..." while API key works fine #25434
Replies: 3 comments 1 reply
-
|
Thank you for responding to my other post ... I personally believe the slowdown is caused by gating @ google, prioritising API key calls (PAYG) over bundled subscriptions to manage costs |
Beta Was this translation helpful? Give feedback.
-
|
it certainly feels that way. I've tried everything to resolve the issue on my end, but I'm out of ideas. Begs the question, why am I paying for a Pro account? That's why I bought it... I don't use the crappy web/chat interface - I purchased it specifically for the CLI. |
Beta Was this translation helpful? Give feedback.
-
|
I had the same experience, using the API key, it works fine regardless of which CLI version I'm using, but for the OAuth login, only downgrading to |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am posting this in case it helps narrow down a regression, because I spent a lot of time isolating this and I do not think it is just user error.
Summary
My Gemini CLI workflow using Google OAuth / Gemini Code Assist became extremely slow about 3 weeks ago. In many cases it would sit on "Thinking..." for a very long time on very simple prompts, and sometimes appeared to hang indefinitely.
A simple example was a prompt like:
what is the root folder of this project calledThis used to feel snappy on Flash. Recently it became inconsistent, very slow, or looked frozen.
The key finding is this:
Environment
/authcmd.exeand in VS Code terminalSymptoms
1. Very long "Thinking..." on simple prompts
Even for basic project-aware prompts, the CLI would often sit there far longer than expected.
2. Huge difference between OAuth and API key behavior
After testing with an API key from AI Studio, the same general environment behaved much better.
This is the biggest reason I do not think this is just my machine or my repo.
3. Debug console repeatedly shows the same suspicious lines
In debug output I repeatedly saw things like:
Authenticated via "oauth-personal"Phase 'load_builtin_commands' was started but never endedError flushing log events: HTTP 400: Bad RequestSelected IDE connection file: gemini-ide-server-...jsonUser policy exists for 'codebase_investigator'Loaded with 3 agentsThe important part is that auth succeeds, but startup / tool loading / project analysis still looks unhealthy.
What I tested
I tried to isolate this properly instead of just complaining.
Baseline tests
From plain command prompt:
gemini -p "say OK"This worked.
Also from inside my project folder:
gemini -p "what is the root folder of this project?"This also worked, but often took around 30 to 45 seconds, which is far slower than expected for Flash.
Interactive mode
Interactive mode sometimes worked, but often felt much slower than it used to, especially for project-aware prompts or codebase analysis.
Local config isolation
I went into my
.geminifolder and temporarily disabled a number of local state/config items.I disabled or renamed:
extensionsprojects.jsonstate.jsontrustedFolders.jsonAfter doing that, the CLI seemed to improve somewhat. It still was not as snappy as it used to be, but it became less likely to sit forever on "Thinking...".
That suggests stale local state may be contributing, but I do not think it explains the whole problem.
VS Code / IDE influence
The debug logs still showed an IDE connection file being selected, even after some cleanup:
Selected IDE connection file: gemini-ide-server-...jsonSo there may also be some interaction with the IDE-connected path.
Additional data point from a small investigation prompt
I also gave it a relatively small job: investigate physics/FPS improvement opportunities in my game and do not code yet, just analyze.
This is exactly the kind of task that used to feel very fast on Flash. Previously, I would expect something like this to take around 1 minute max.
Instead, the
/statsscreen from that single prompt showed:Model usage for that one prompt showed:
That is the clearest example I have that the slowness is not just local file reading or tool execution. The CLI reported almost all of the time as API time.
Current behavior
At the moment, after disabling some
.geministate files, the CLI is more usable than before. It no longer seems to get stuck on "Thinking..." as often, and some prompts do return faster than before.But it is still noticeably slower than it used to be, and the debug logs still show the same unhealthy startup/logging messages.
Why I am posting
I am mainly trying to answer these questions:
load_builtin_commands was started but never endeda known issue?HTTP 400log flush errors just telemetry noise, or are they related to the latency / hanging?.geminiproject state known to poison performance?My current conclusion
From everything I tested, my best guess is:
.geministate may worsen itIf useful, I can provide
.geminifolder contents before/after disabling state files/statsscreenshot for the 15+ minute investigation promptIf anyone from the team wants a cleaner repro format, I am happy to provide it. Right now I mainly want to know whether this is already understood as a regression, because the current behavior is a big step down from how responsive Flash used to feel.
Beta Was this translation helpful? Give feedback.
All reactions