Concurrent requests can be dropped if they arrive while Gemini is responding · Issue #3161 · google-gemini/gemini-cli · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

Concurrent requests can be dropped if they arrive while Gemini is responding #3161

Open
@samdickson22

Description

@samdickson22

What happened?

The current implementation of submitQuery can cause messages or prompts to be silently dropped if they are triggered in rapid succession. This can happen when multiple events attempt to call submitQuery concurrently.

  1. An event triggers submitQuery to process a prompt.
  2. submitQuery begins processing, and the streamingState is set to Responding.
  3. While Gemini is still generating a response, a second event triggers submitQuery.
  4. The guard condition in useGeminiStream.ts checks streamingState and, because it's Responding, it immediately returns.
  5. This second prompt is silently dropped, and the user never sees a response for it.

What did you expect to happen?

All prompts and commands should be processed. If a request arrives while another is being processed, it should be queued and handled sequentially, rather than being silently discarded.

Client information

About Gemini CLI
CLI Version 0.1.5
Git Commit bf873a1
Model gemini-2.5-pro
Sandbox no sandbox
OS darwin

Login information

Google account

Anything else we need to know?

I ran into this while working on a feature with simultaneous instances communicating via A2A. When one instance sent a message while the other was still processing, the second message would get dropped. While this might not be a common scenario for a single user, it points to a concurrency issue that could affect other features down the line. A potential solution could involve implementing a queue for incoming requests to ensure they are processed sequentially.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/coreIssues related to the core functionality of the CLI.kind/bugSomething isn't workingkind/enhancementNew feature or requestpriority/p2Important but can be addressed in a future release.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      TMZ Celebrity News – Breaking Stories, Videos & Gossip

      Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

      Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

      🎥 Watch TMZ Live

      TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.