What happened?
The Gemini CLI is experiencing consistently high startup times, taking up to 9.77 seconds to boot. During initialization, the CLI calls refreshAuth() which sets up the backend client models. In this process, the CLI synchronously awaits this.experimentsPromise (which fetches from the internal API proxy) and quotaPromise. The API proxy alone takes ~1.42 seconds to fetch its internal experiments and launch the HTTP server, and these sequential network requests significantly block the startup sequence.
What did you expect to happen?
The CLI should boot quickly, ideally taking around 4 seconds or less.
What is needed for this fix?
To resolve this issue, the sequential await calls in packages/core/src/config/config.ts (refreshAuth) must be decoupled.
- Remove
await this.experimentsPromise; and await quotaPromise; from refreshAuth().
- Chain these promises asynchronously so that operations depending on them (e.g., setting request timeout, fetching admin controls, verifying pro model access) run concurrently via
.then(...) and .catch(...).
- Update the tests in
packages/core/src/config/config.test.ts and trackerTools.test.ts to accommodate the asynchronous configuration load, ensuring they wait for config.initialize() before asserting state.
Client information
Platform: Linux
Version: Gemini CLI (Development)
Login information
Internal Proxy Authentication / Google Account
What happened?
The Gemini CLI is experiencing consistently high startup times, taking up to 9.77 seconds to boot. During initialization, the CLI calls
refreshAuth()which sets up the backend client models. In this process, the CLI synchronously awaitsthis.experimentsPromise(which fetches from the internal API proxy) andquotaPromise. The API proxy alone takes ~1.42 seconds to fetch its internal experiments and launch the HTTP server, and these sequential network requests significantly block the startup sequence.What did you expect to happen?
The CLI should boot quickly, ideally taking around 4 seconds or less.
What is needed for this fix?
To resolve this issue, the sequential
awaitcalls inpackages/core/src/config/config.ts(refreshAuth) must be decoupled.await this.experimentsPromise;andawait quotaPromise;fromrefreshAuth()..then(...)and.catch(...).packages/core/src/config/config.test.tsandtrackerTools.test.tsto accommodate the asynchronous configuration load, ensuring they wait forconfig.initialize()before asserting state.Client information
Platform: Linux
Version: Gemini CLI (Development)
Login information
Internal Proxy Authentication / Google Account