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
Environment:
Bug Description:
When executing any command through OpenCode's
bashtool on Windows, the tool automatically prefixes commands with Unix-style environment variable exports:However, Windows
cmd.exedoes not support theexportcommand, causing all commands to fail with:Root Cause: The bash tool unconditionally adds
exportprefix without platform detection.Impact: 100% of bash commands fail on Windows native.
Proposed Fix: Add platform detection to strip
exporton Windows.Reproduction: Run any bash command on Windows native - all fail with the same error