Skip to content

[Bug]: Windows bash tool fails with "export is not recognized" #11927

Closed

Description

@Qfbxz

Severity: High - Critical functionality broken on Windows

Environment:

  • Platform: Windows (Native, not WSL)
  • OpenCode Version: Latest dev branch
  • Shell: cmd.exe via bash tool

Bug Description:

When executing any command through OpenCode's bash tool on Windows, the tool automatically prefixes commands with Unix-style environment variable exports:

export CI=true DEBIAN_FRONTEND=noninteractive ...

However, Windows cmd.exe does not support the export command, causing all commands to fail with:

'export' is not recognized as an internal or external command,
operable program or batch file.

Root Cause: The bash tool unconditionally adds export prefix without platform detection.

Impact: 100% of bash commands fail on Windows native.

Proposed Fix: Add platform detection to strip export on Windows.

Reproduction: Run any bash command on Windows native - all fail with the same error

Activity

  1. github-actions commented on Apr 5, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions