Skip to content

[BUG] Bash tool fails on Windows — "Session environment not yet supported on Windows" (v2.1.45) #26610

Closed as not planned

Description

@gnrh1

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Environment:

  • OS: Windows 11 Pro (10.0.26200)
  • Shell: Git Bash (C:\Program Files\Git\bin\bash.exe)
  • Claude Code version: 2.1.45

Behavior:
Every Bash tool call fails with exit code 1 and no output. The debug log shows this fires before every failure:
Session environment not yet supported on Windows
Bash tool error (Xms): Shell command failed

Affected commands: All shell built-ins (echo, pwd) and Unix utilities (cat, grep). Windows .exe commands (e.g.
where.exe) succeed.

Not affected: Read, Grep, Glob, Edit, Write tools all work normally.

Reproducer:

  1. Install Claude Code v2.1.45 on Windows with Git Bash
  2. Open any session
  3. Run echo hello via Bash tool → exit code 1, no output

Note: Affects all profiles (default ~/.claude/ and custom CLAUDE_CONFIG_DIR profiles equally).

What Should Happen?

Claude should examine and suggest fix

Error Messages/Logs

Steps to Reproduce

not sure

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.45

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Windows Terminal

Additional Information

No response

Activity

  1. github-actions commented on Feb 18, 2026

    @github-actions

    Found 3 possible duplicate issues:

    1. v2.1.45: Bash broken on Windows - bad file descriptor on stdout pipe #26462
    2. [BUG] Bash tool: all commands fail with Bad file descriptor on Windows (Git Bash stdout broken) #26413
    3. Bash tool broken on Windows: Git Bash MSYS2 Bad file descriptor with piped stdout #26486

    This issue will be automatically closed as a duplicate in 3 days.

    • If your issue is a duplicate, please close it and 👍 the existing issue instead
    • To prevent auto-closure, add a comment or 👎 this comment

    🤖 Generated with Claude Code

  2. MarcoCrankVRU commented on Feb 18, 2026

    @MarcoCrankVRU

    Yeah this bug seems to have been introduced in 2.1.145 and it is breaking a lot of things on my side.

  3. github-actions commented on Mar 19, 2026

    @github-actions

    Closing for now — inactive for too long. Please open a new issue if this is still relevant.

  4. github-actions commented on Mar 26, 2026

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  5. locked as resolved and limited conversation to collaborators on Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleIssue is inactive

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions