Skip to content

Interactive mode hangs in a busy-loop when run inside a Podman container #17275

@RMBeristain

Description

@RMBeristain

What happened?

When running @google/gemini-cli inside a Podman container with an interactive TTY (-it), the interactive mode freezes immediately after login. Non-interactive commands (e.g., gemini --version) work correctly.

To Reproduce:

  1. On a Linux host with Podman, run the following command to start a debug session:
    podman run -it --name gemini-debug -e TERM="$TERM" -v "$(pwd):/workspace:Z" -w /workspace node:22 bash
  2. Inside the container, install the CLI:
    npm i -g @google/gemini-cli@latest
  3. Run the CLI to enter interactive mode:
    gemini
  4. Log in. The CLI will freeze.

What did you expect to happen?

Expected Behavior:
The CLI should present an interactive prompt.

Actual Behavior:
The CLI hangs and becomes unresponsive, consuming CPU. It does not respond to Ctrl+C. strace reveals the process is in a tight epoll_pwait loop and is not reading from standard input.

NOTE this explanation was prepared by Gemini-CLI (non-sandboxed)

Client information

Client Information

Run gemini to enter the interactive CLI, then run the /about command.

Environment:

  • Host OS: Linux (Zorin OS)
  • Container Runtime: Podman
  • Image: node:22

Non-sandboxed

This is the output of the non-sandboxed mode since the sandbox accepts no input at all.

> /about

│ About Gemini CLI                                                                                                                                                         │
│                                                                                                                                                                          │
│ CLI Version                                                0.25.0                                                                                                        │
│ Git Commit                                                 eb8834341                                                                                                     │
│ Model                                                      auto-gemini-2.5                                                                                               │
│ Sandbox                                                    no sandbox                                                                                                    │
│ OS                                                         linux                                                                                                         │
│ Auth Method                                                OAuth                                                                                                         │
│ User Email                                                 that's [email protected]  

Login information

No response

Anything else we need to know?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/coreIssues related to User Interface, OS Support, Core Functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions