Skip to content

Proxy health check hangs indefinitely if proxy fails to bind to port 8877 #20851

@nunzio57

Description

@nunzio57

What happened?

When GEMINI_SANDBOX_PROXY_COMMAND is set and the proxy process starts
but never binds to port 8877 (e.g. wrong port, slow startup, missing
dependency), the health check loop in sandbox.ts runs forever:

until timeout 0.25 curl -s http://localhost:8877; do sleep 0.25; done

The CLI hangs with no error message and the user must Ctrl+C manually.

This affects both the Seatbelt (macOS) and Docker sandbox paths.

Steps to reproduce

GEMINI_SANDBOX_PROXY_COMMAND="sleep infinity" GEMINI_SANDBOX=docker gemini -s
# CLI hangs forever with no output

Expected behavior

The health check should time out after a reasonable period and throw
a clear error message.

CLI version

0.30.0-nightly.20260210

Platform

Linux (WSL2 Ubuntu 24.04)

Metadata

Metadata

Assignees

No one assigned

    Labels

    status/need-triageIssues that need to be triaged by the triage automation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions