Skip to content

Container name collisions due to sequential numbering in container name generation #12083

@JacobLinCool

Description

@JacobLinCool

What happened?

In sandbox.ts, container names are generated using an incremental sequential number.

This approach introduces a race condition when multiple instances of the Gemini CLI run in parallel, leading to container name collisions.

What did you expect to happen?

Container names should be generated in a way that avoids conflicts between concurrent CLI runs.

I noticed that the integration tests already generate container names with a random ID. Why the same method isn’t used in regular runs?

Client information

Client Information

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

> /about
# paste output here

Login information

No response

Anything else we need to know?

If this change makes sense, would it be suitable for me to submit a PR to update the regular container naming to use random IDs as well?

Metadata

Metadata

Assignees

Labels

area/coreIssues related to User Interface, OS Support, Core Functionalityhelp wantedWe will accept PRs from all issues marked as "help wanted". Thanks for your support!priority/p3Backlog - a good idea but not currently a priority.type/bug

Type

No fields configured for Bug.

Projects

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions