OpenTUI DLL path causing error in Git Bash #8885

Open
opened 2026-02-16 18:11:05 -05:00 by yindo · 1 comment
Owner

Originally created by @Pro-Dhilllxn on GitHub (Feb 9, 2026).

Originally assigned to: @kommander on GitHub.

Environment:

  • OS: Windows 11
  • Shell: Git Bash (MINGW64)
  • OpenCode version: 1.1.53
  • Installation: Both npm and official Windows binary

Issue:
OpenCode TUI fails to start in Git Bash with error:
Failed to initialize OpenTUI render library: Failed to open library "B:/~BUN/root/opentui-yrtstrjj.dll": error code 126

Root cause:
Perhaps the OpenTUI DLL path B:/~BUN/root/ is hardcoded in the binary, likely from the build environment.

Reproduction:

  1. Install OpenCode on Windows
  2. Run opencode in Git Bash (or opencode --print-logs --log-level DEBUG)
  3. Error occurs

Workaround:

  • Works in PowerShell
  • opencode web works in Git Bash
Originally created by @Pro-Dhilllxn on GitHub (Feb 9, 2026). Originally assigned to: @kommander on GitHub. **Environment:** - OS: Windows 11 - Shell: Git Bash (MINGW64) - OpenCode version: 1.1.53 - Installation: Both npm and official Windows binary **Issue:** OpenCode TUI fails to start in Git Bash with error: `Failed to initialize OpenTUI render library: Failed to open library "B:/~BUN/root/opentui-yrtstrjj.dll": error code 126` **Root cause:** Perhaps the OpenTUI DLL path `B:/~BUN/root/` is hardcoded in the binary, likely from the build environment. **Reproduction:** 1. Install OpenCode on Windows 2. Run `opencode` in Git Bash (or `opencode --print-logs --log-level DEBUG`) 3. Error occurs **Workaround:** - Works in PowerShell - `opencode web` works in Git Bash
yindo added the windowsopentui labels 2026-02-16 18:11:05 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 9, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #12180: Opencode was running very well after installing, however the next day it failed to launch

Both issues report the same underlying problem: "Failed to open library" error with OpenTUI DLL on Windows, though the specific error codes and contexts differ slightly. The root cause appears to be related to OpenTUI DLL path resolution on Windows systems.

Feel free to ignore if this doesn't address your specific case.

@github-actions[bot] commented on GitHub (Feb 9, 2026): This issue might be a duplicate of existing issues. Please check: - #12180: Opencode was running very well after installing, however the next day it failed to launch Both issues report the same underlying problem: "Failed to open library" error with OpenTUI DLL on Windows, though the specific error codes and contexts differ slightly. The root cause appears to be related to OpenTUI DLL path resolution on Windows systems. Feel free to ignore if this doesn't address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8885