gemini-cli - 💡(How to fix) Fix [Bug] Agent does not recognize OS environment it runs in resulting in continous terminal tool usage errors [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
google-gemini/gemini-cli#25896Fetched 2026-04-24 06:13:25
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
1
Author
Participants
Timeline (top)
labeled ×1

Error Message

Basic requirement for any coding agent is to be aware of OS environment and tooling available, otherwise any development work starts to look like toddler trial and error learning attempt with obvious loss of productivity.

Root Cause

For last couple of weeks I do observe increasing number of errors caused by lack of OS environment awareness - despite providing exact tooling information on my Windows machine - agent even after encountering multiple errors due to using linux specific tools and bash syntax, even after being multiple times informed by user what system it is running on agent continues to make multiple errors.

RAW_BUFFERClick to expand / collapse

What happened?

For last couple of weeks I do observe increasing number of errors caused by lack of OS environment awareness - despite providing exact tooling information on my Windows machine - agent even after encountering multiple errors due to using linux specific tools and bash syntax, even after being multiple times informed by user what system it is running on agent continues to make multiple errors.

Agent ignores direct requests by user made in global and local gemini.md files with regard to tool usage, workflow organization etc. See my other bug report: https://github.com/google-gemini/gemini-cli/issues/25892

What did you expect to happen?

Basic requirement for any coding agent is to be aware of OS environment and tooling available, otherwise any development work starts to look like toddler trial and error learning attempt with obvious loss of productivity.

Client information

  • CLI Version: 0.39.0
  • Git Commit: 398f78dca
  • Session ID: 6df14344-1210-4a6d-81cd-4355a0318e6c
  • Operating System: win32 v2 5.9.0
  • Sandbox Environment: no sandbox
  • Model Version: gemini-3.1-pro-preview
  • Auth Type: oauth-personal
  • Memory Usage: 393.5 MB
  • Terminal Name: Unknown
  • Terminal Background: #0c0 c0c
  • Kitty Keyboard Protocol: Unsupported

Login information

No response

Anything else we need to know?

No response

extent analysis

TL;DR

The agent's lack of OS environment awareness and ignoring user requests may be due to a compatibility issue or misconfiguration, and verifying the gemini.md file settings and checking for updates to the CLI version 0.39.0 may help.

Guidance

  • Review the gemini.md files (both global and local) to ensure that the tool usage and workflow organization settings are correctly specified for a Windows environment.
  • Check if there are any updates available for the CLI version 0.39.0, as this may address the compatibility issues with Windows.
  • Verify that the agent is correctly parsing the gemini.md files by checking the agent's documentation or logs for any error messages related to file parsing.
  • Consider referencing the related bug report (https://github.com/google-gemini/gemini-cli/issues/25892) for potential workarounds or fixes.

Notes

The issue may be specific to the Windows environment or the gemini-3.1-pro-preview model version, and further investigation may be needed to determine the root cause.

Recommendation

Apply workaround: Review and update the gemini.md files, and check for updates to the CLI version, as this may help mitigate the issue until a permanent fix is available.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING