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

Open
opened 2026-02-16 18:09:54 -05:00 by yindo · 0 comments
Owner

Originally created by @Qfbxz on GitHub (Feb 3, 2026).

Originally assigned to: @rekram1-node on GitHub.

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

Originally created by @Qfbxz on GitHub (Feb 3, 2026). Originally assigned to: @rekram1-node on GitHub. >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
yindo added the windows label 2026-02-16 18:09:54 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8410