You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I could not run opencode natively on a fresh windows 11 machine using bun i -g opencode-ai since opencode executable had a shebang prefix towards /bin/sh
This issue might be a duplicate of existing issues. Please check:
make bun install work on Windows #3363: make bun install work on Windows - This issue specifically mentions the same error about "/bin/sh" interpreter not found when using bun install -g opencode-ai on Windows
Windows Support #631: Windows Support - General Windows support tracking issue that covers various Windows-related problems including shebang issues
running opencode fails in alpine / musl based distros #649: running opencode fails in alpine / musl based distros - While focused on Alpine/musl, this issue also deals with shebang and executable problems in non-standard environments
Feel free to ignore if none of these address your specific case.
# bun as example
bun i -g opencode-ai
# Symlink "oc" as opencode directly
mklink "C:\Users\username\.bun\bin\oc.exe" "C:\Users\username\.bun\install\global\node_modules\opencode-windows-x64\bin\opencode.exe"
# "Runs." (Kind of.)
oc auth login
oc run "Hello world"
Activity
github-actions commentedon Nov 2, 2025
This issue might be a duplicate of existing issues. Please check:
bun installwork on Windows #3363: makebun installwork on Windows - This issue specifically mentions the same error about "/bin/sh" interpreter not found when usingbun install -g opencode-aion WindowsFeel free to ignore if none of these address your specific case.
zenyr commentedon Nov 2, 2025
Seems like a direct duplicate of
bun installwork on Windows #3363Workaround (very experimental)
rekram1-node commentedon Nov 2, 2025
We are gonna fix this, going to close as duplicate of 3363
bun installwork on Windows #3363