Skip to content

Prompt for folder trust before slow startup auth #27844

Description

@Alvin0412

Describe the bug

When Gemini CLI starts in an interactive workspace whose folder trust state is still unknown, startup can perform slow initialization work before asking the user whether to trust the folder. In practice this makes the CLI look stuck before the folder trust prompt appears, especially when auth or remote account checks take several seconds.

The trust decision is local and determines whether project settings, hooks, MCP servers, skills, and context files may be loaded. It should be resolved before slow auth/network startup work.

Steps to reproduce

  1. Use a fresh Gemini CLI home so the current directory has no trust rule.
  2. Start Gemini CLI interactively from that directory.
  3. Observe that the trust prompt may be delayed by startup/auth work instead of appearing immediately.

Example shape of the reproduction:

GEMINI_CLI_HOME=$(mktemp -d) gemini

Expected behavior

For an interactive, non-headless launch with an unknown trust state, Gemini CLI should ask for the folder trust decision before starting auth or other slow initialization.

If the user chooses to trust the folder, the CLI can save the decision and relaunch so workspace settings and local configuration are loaded under the new trust state. If the user chooses not to trust it, startup can continue with project-local configuration disabled.

Additional context

This is especially noticeable when auth/account checks take multiple seconds. The terminal appears idle even though the next required action is a local trust decision.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/coreIssues related to User Interface, OS Support, Core Functionalityeffort/medium2-3 days: UI state, async flow, cross-component refactorskind/bugpriority/p2Important but can be addressed in a future release.status/bot-triagedstatus/need-information

    Type

    Fields

    No fields configured for Bug.

    Projects

    Status
    Closed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions