Skip to content

System prompt suggests Linux-specific commands on Windows platforms #16151

@Thomas-Shephard

Description

@Thomas-Shephard

What happened?

When running Gemini CLI on Windows, the system prompt provided to the model contained Linux-specific command examples (like grep, tail, and head) and used the && operator for command chaining. This caused the agent to suggest commands that failed to execute or were not idiomatic for a Windows environment (Cmd/PowerShell), hindering the user experience and task automation.

What did you expect to happen?

The system prompt should be platform-aware. When running on Windows, it should provide PowerShell-equivalent commands (e.g., Select-String, Get-Content -Tail) and use compatible command separators (;) to ensure suggested information-gathering commands work correctly.

Client information

Client Information

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

> /about
CLI Version                                                                0.23.0                                                                                                                                       │
│ Git Commit                                                                 3ff055840                                                                                                                                    │
│ Model                                                                      gemini-3-flash-preview                                                                                                                       │
│ Sandbox                                                                    no sandbox                                                                                                                                   │
│ OS                                                                         win32                                                                                                                                        │
│ Auth Method                                                                OAuth

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