Repository navigation
Closed as not planned
Closed as not planned
Copy link
Description
Description
OpenCode 1.2.15 crashes immediately on startup with a Bun panic invalid enum value. The TUI never renders — it exits with code 3 right after launch.
This is NOT the ThreadLock panic fixed in v1.2.15 (#15127). It's a different Bun crash (invalid enum value) that persists even after the ThreadLock fix.
Environment
- OpenCode version: 1.2.15 (latest via
npm i -g opencode-ai@latest) - Bun version: 1.3.10 (bundled with opencode-windows-x64)
- OS: Windows 11 Home (10.0.26200.7922)
- Architecture: x86_64
- Terminal: Windows Terminal / Git Bash (MSYS2)
Steps to Reproduce
- Install OpenCode on Windows:
npm i -g opencode-ai@latest(v1.2.15) - Create a minimal config at
~/.config/opencode/opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"model": "google/antigravity-gemini-3-flash",
"provider": {
"google": {
"name": "Google",
"models": {
"antigravity-gemini-3-flash": {
"name": "Gemini 3 Flash",
"limit": { "context": 1048576, "output": 65536 }
}
}
}
},
"plugin": ["opencode-antigravity-auth@latest"],
"autoupdate": false
}- Run
opencodein any directory - TUI crashes immediately — exits with code 3
Crash Output
The Bun panic output shows:
panic(thread): invalid enum value
Build ID: ea130e609e
OS: x86_64 windows msys
Full Bun crash report URL:
https://bun.report/1.3.10/ea130e609emxGz/3/9/Dkj2hKyn0sGgxiL0k54Jgi++MCY
Investigation
- Empty config also crashes: Tested with
{}config — same crash. - Piped output does NOT crash:
opencode 2>&1 | catdoes NOT crash because the TUI is disabled when stdout is not a terminal. This makes debugging misleading. - Server mode works: The crash is specifically in the TUI rendering path, not in the server/core logic.
- This is a Bun bug: Related to oven-sh/bun#14844 — same
invalid enum valuepanic on Windows. The underlying cause appears to be in Bun's terminal/TUI handling on Windows. - Not the ThreadLock bug: Issue Bun crash when .env file contains any content (ThreadLock panic) #15127 reports a
ThreadLockpanic which was fixed in v1.2.15. This is a different crash signature (invalid enum valuevsThreadLock).
Expected Behavior
OpenCode TUI should start and render normally.
Actual Behavior
OpenCode exits immediately with code 3 and a Bun panic. No TUI is ever displayed.
Workaround
None currently. OpenCode is completely unusable on this Windows machine.
Additional Context
- Previous OpenCode versions (0.15.x) worked on this same machine with the same Bun setup.
- The crash happens with any model/provider configuration, even an empty config.
- The bundled
opencode-windows-x64binary includes Bun 1.3.10 which cannot be updated independently.
Reacted by BK(김병규)
Reacted by Luke Parker
Metadata
Metadata
Assignees
Labels
No labels
Activity
alexisvedia commentedon Feb 26, 2026
Clarification: This is on a standard Windows 11 24H2 stable release (build 26200.7922), NOT an Insider Preview build. The Windows Insider Program is not enrolled. This means the crash affects regular Windows 11 stable installations.
Hona commentedon Feb 27, 2026
On it thanks
Corosauce commentedon Mar 5, 2026
Edit: Found my fix, its the fault of the terminal Warp, fixed after i switched terminals. oven-sh/bun#26496
Happening here on windows 10, opencode 1.2.15 and still if i revert to 1.2.10 (was suggested here but didnt work https://www.reddit.com/r/opencodeCLI/comments/1rel21r/hey_having_issuse_what_is_bun_haha_really_i_tried/o7e63uq/),
https://bun.report/1.3.10/ea130e609emwGz/3/9/Dkj2hKyn0sGgxiL0k54Jgi++MCYKERNEL32.DLLo35FCSntdll.dllipmTA0eNrLzCtLzMlMUUjNK81VKEvMKU0FAEK2Bvo
Started after installing find-skills, which i guess requires bun, removing the skill fixes it.
opencode | cat
https://gist.github.com/Corosauce/37e6a217ca5161598c09690e6ca972a7
Indy221 commentedon Jun 25, 2026
Bun has crashed .. all my OpenCode cli constantly crashes, since today only.
Was using Warp change to VSCode and same problem...
github-actions commentedon Aug 25, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.