Skip to content

Windows ARM64 native: OpenTUI fails to initialize with bun:ffi dlopen TinyCC error #19130

Closed

Description

@Carliquiss

Description

On Windows 11 ARM64, the native ARM64 OpenCode binary works for non-interactive commands, but the TUI fails to initialize.

The native binary successfully runs commands like:

  • opencode.exe --version
  • opencode.exe --help
  • opencode.exe debug --help
  • opencode.exe debug paths

However, starting the interactive TUI does not start correctly and logs this error:

Failed to initialize OpenTUI render library: bun:ffi dlopen() is not available in this build (TinyCC is disabled)

Environment

  • OS: Windows 11 ARM64
  • Architecture: native ARM64
  • Installation method: npm global install
  • Native binary path:
    C:\Users\<user>\AppData\Roaming\npm\node_modules\opencode-ai\node_modules\opencode-windows-arm64\bin\opencode.exe

OpenCode version

Observed from direct ARM64 binary:

  • 1.3.0

Also noting that opencode from PATH reported 1.3.2 in my environment, so there may be version/path inconsistency locally. If needed, I can provide more details, but the native ARM64 binary issue below was reproduced directly from the ARM64 executable path.

Steps to reproduce

  1. Install OpenCode on Windows ARM64 via npm
  2. Run the native ARM64 binary directly:
    C:\Users\<user>\AppData\Roaming\npm\node_modules\opencode-ai\node_modules\opencode-windows-arm64\bin\opencode.exe
  3. Alternatively run:
    C:\Users\<user>\AppData\Roaming\npm\node_modules\opencode-ai\node_modules\opencode-windows-arm64\bin\opencode.exe --print-logs --log-level DEBUG
  4. Observe startup behavior

Expected behavior

The OpenCode TUI should initialize and start normally on the native Windows ARM64 build.

Actual behavior

The process does not start the TUI correctly and logs:

ERROR ... Failed to initialize OpenTUI render library: bun:ffi dlopen() is not available in this build (TinyCC is disabled)
ERROR ... Error: Failed to initialize OpenTUI render library: bun:ffi dlopen() is not available in this build (TinyCC is disabled)

In my testing, the process stayed alive until manually terminated / timed out, rather than exiting cleanly.

Additional notes

  • This seems different from the existing Windows OpenTUI DLL/path issues that fail with LoadLibrary / DLL error codes.
  • This also seems different from the existing Windows ARM64 x64-emulation crash report, since this was reproduced against the native ARM64 binary directly.
  • Non-interactive commands work, so the problem appears specific to OpenTUI initialization on Windows ARM64 native.
  • Related but possibly separate: I have also seen instability when using the x64 build under emulation on Windows ARM64, but this report is specifically about the native ARM64 binary failing to initialize OpenTUI.

If useful, I can provide the exact command output and more environment details.

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Mar 25, 2026
  2. johnW-ret commented on Mar 28, 2026

    @johnW-ret

    Getting this error as well

  3. r12f commented on Apr 19, 2026

    @r12f

    same here as well on windows arm64

    ERROR 2026-04-19T20:54:50 +31ms service=server-proxy e=Failed to initialize OpenTUI render library: bun:ffi dlopen() is not available in this build (TinyCC is disabled) rejection
    ERROR 2026-04-19T20:54:50 +0ms service=server-proxy error=Failed to initialize OpenTUI render library: bun:ffi dlopen() is not available in this build (TinyCC is disabled) process error
    
  4. removed
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on May 3, 2026
  5. RachelXiaolan commented on May 4, 2026

    @RachelXiaolan

    getting same ERROR as well:

    Windows 11 ARM64
    Node v25.9.0 arm64
    npm global installed @kilocode/[email protected]
    kilo --help works
    kilo run "say hi" works
    kilo / kilo . exits immediately
    DEBUG log:
    Failed to initialize OpenTUI render library: bun:ffi dlopen() is not available in this build (TinyCC is disabled)

  6. Milo1414 commented on Jun 5, 2026

    @Milo1414

    Getting same Error as well

  7. purpesec commented on Jun 8, 2026

    @purpesec

    Please resolve this as quickly as possible

  8. SoulOH commented on Jun 28, 2026

    @SoulOH

    Still happening on v1.17.11, Windows 11 ARM64 (Snapdragon X Elite). arm64 native binary, npm install.

    run works, TUI and opencode web don't. Same TinyCC/bun:ffi cause, but mine fails in the PTY layer instead of OpenTUI:

    TypeError: undefined is not an object (evaluating 'f.symbols')
        at new e (B:/~BUN/root/chunk-tg1tbjph.js:8:943)
        at a (B:/~BUN/root/chunk-tg1tbjph.js:8:2346)
        at R (B:/~BUN/root/chunk-tg1tbjph.js:8:2379)
        at Pty.create (B:/~BUN/root/chunk-yt94mfwj.js:25:2045)
        at Pty.create (definition) (B:/~BUN/root/chunk-a29z2tp8.js:22:1738)
        at PtyHttpApi.create (B:/~BUN/root/chunk-20n2pq79.js:2:84235)
        at PtyHttpApi.create (definition) (B:/~BUN/root/chunk-20n2pq79.js:4:3495)
        at Server.listen (B:/~BUN/root/chunk-20n2pq79.js:4:45761)
        at Server.listen (definition) (B:/~BUN/root/chunk-20n2pq79.js:4:45884)
    

    So the missing bun:ffi/dlopen breaks the PTY server too, not just OpenTUI.

    Workaround: force the x64 build, runs fine under emulation.

    npm install -g [email protected] --force
    
  9. MCapricorns commented on Jul 6, 2026

    @MCapricorns

    Once TinyCC PR is merged, bun:ffi should be available on Windows ARM64.

  10. AllHailTheFox commented on Jul 7, 2026

    @AllHailTheFox

    Still happening on v1.17.11, Windows 11 ARM64 (Snapdragon X Elite). arm64 native binary, npm install.

    run works, TUI and opencode web don't. Same TinyCC/bun:ffi cause, but mine fails in the PTY layer instead of OpenTUI:

    TypeError: undefined is not an object (evaluating 'f.symbols')
        at new e (B:/~BUN/root/chunk-tg1tbjph.js:8:943)
        at a (B:/~BUN/root/chunk-tg1tbjph.js:8:2346)
        at R (B:/~BUN/root/chunk-tg1tbjph.js:8:2379)
        at Pty.create (B:/~BUN/root/chunk-yt94mfwj.js:25:2045)
        at Pty.create (definition) (B:/~BUN/root/chunk-a29z2tp8.js:22:1738)
        at PtyHttpApi.create (B:/~BUN/root/chunk-20n2pq79.js:2:84235)
        at PtyHttpApi.create (definition) (B:/~BUN/root/chunk-20n2pq79.js:4:3495)
        at Server.listen (B:/~BUN/root/chunk-20n2pq79.js:4:45761)
        at Server.listen (definition) (B:/~BUN/root/chunk-20n2pq79.js:4:45884)
    

    So the missing bun:ffi/dlopen breaks the PTY server too, not just OpenTUI.

    Workaround: force the x64 build, runs fine under emulation.

    npm install -g [email protected] --force
    

    This worked but I still had some issues with postinstall.mjs which hardcoded the os.arch so even if the machine x86 emulation worked it will still fail.

    Fix: Manually copy x64 exe into ~/.npm/node_modules/opencode-ai/bin/opencode.exe after install (or patch postinstall.mjs to add a fallback chain that tries x64 if arm64 fails).

    Hopefully this helps someone~

    Post Edit that shit didn't work.... Instead you can do serve opencode serve --port XXXX and use it via web instead. you can find more here https://opencode.ai/docs/server/

  11. KondeU commented on Jul 9, 2026

    @KondeU

    thanks AllHailTheFox, it is a nice solution for temporarily getting around it!

  12. dil-mange-amore commented on Jul 19, 2026

    @dil-mange-amore

    bug still happens on 1.18.3, the workaround given by @AllHailTheFox also doesnt work, end up with something like this.

    Image
  13. 9 remaining items

  14. kareldonk commented on Aug 17, 2026

    @kareldonk

    Still a problem in the latest version on ARM64 Windows 11 (Surface 12).

  15. airtaxi commented on Aug 21, 2026

    @airtaxi

    Ran into this on Windows ARM64 too. The official ARM64 build is compiled with a Bun that has bun:ffi disabled on this platform. That was fixed in Bun 1.4.0 (oven-sh/bun#28055), but the official releases are still built with an older Bun.

    So I put together a small pipeline that rebuilds the CLI from the official tag with Bun 1.4.0:

    https://github.com/airtaxi/opencode-windows-arm64

    It checks for new tags every 6 hours and publishes the win32-arm64 binary along with a Scoop manifest:

    scoop bucket add opencode-arm64 https://github.com/airtaxi/opencode-windows-arm64
    scoop install opencode-arm64
    

    Tested on Snapdragon X2 Elite Extreme (ASUS Zenbook A16). With Bun 1.4.0 the "TinyCC is disabled" error is gone and the TUI opens fine. The binaries aren't official and aren't signed, but the only change from the official build is the Bun version.

  16. beijinghulei139 commented on Aug 31, 2026

    @beijinghulei139

    so,who can fix this bug? thanks

  17. kareldonk commented on Sep 10, 2026

    @kareldonk

    this has been open since march. jesus fucking christ

  18. eatfrog commented on Sep 17, 2026

    @eatfrog

    still an issue..

  19. sanathusk commented on Sep 22, 2026

    @sanathusk

    Had the same issue, the issue is now RESOLVED on my windows 11 arm 64 snapdragon laptop, after i upgraded to latest version of bun (1.4.2).

    Here is my combination, drop a message if the combination work for you or not:

    • bun version 1.4.2 (windows 11 arm64 bit version of bun)
    • installed opencode globally using bun (NOT npm) (bun install -g --trust @opencode/cli)
  20. jcompagner commented on Sep 22, 2026

    @jcompagner

    Had the same issue, the issue is now RESOLVED on my windows 11 arm 64 snapdragon laptop, after i upgraded to latest version of bun (1.4.2).

    Here is my combination, drop a message if the combination work for you or not:

    • bun version 1.4.2 (windows 11 arm64 bit version of bun)
    • installed opencode globally using bun (NOT npm) (bun install -g --trust @opencode/cli)

    this doesn't really matter right?
    You can install opencode with what every tool you want (npm, scoop, winget) the thing is opencode is always shipped as an opencode.exe that has bun included in it right?
    so it doesn't matter if you installed bun 1.4.x, opencode doesn't use 1.4 but is still on 1.3.14 i think

  21. sanathusk commented on Sep 23, 2026

    @sanathusk

    Had the same issue, the issue is now RESOLVED on my windows 11 arm 64 snapdragon laptop, after i upgraded to latest version of bun (1.4.2).

    Here is my combination, drop a message if the combination work for you or not:

    • bun version 1.4.2 (windows 11 arm64 bit version of bun)
    • installed opencode globally using bun (NOT npm) (bun install -g --trust @opencode/cli)

    this doesn't really matter right?
    You can install opencode with what every tool you want (npm, scoop, winget) the thing is opencode is always shipped as an opencode.exe that has bun included in it right?
    so it doesn't matter if you installed bun 1.4.x, opencode doesn't use 1.4 but is still on 1.3.14 i think

    Not sure what fixed it, but i am glad it is finally working now

  22. neriousy commented on Oct 1, 2026

    @neriousy
    Member

    Bun 1.4.2 adds bun:ffi/TinyCC support for Windows ARM64, which the TUI needs. OpenCode has been built with Bun 1.4.2 since #47446, and a user on a Windows 11 ARM64 Snapdragon laptop confirmed above that the TUI now starts.

    Closing as completed. If the TUI still doesn't start on Windows ARM64 with the latest release, please open a new issue with your version and the error.

  23. AkimioJR commented on Oct 11, 2026

    @AkimioJR

    @neriousy OpenCode v1.19.0 still encounters errors in my ARM64 environment (Windows VM running on Parallels for Mac).

    PS C:\xxxxxxx\xxxxxxxx> opencode -v
    1.19.0
    PS C:\xxxxxxx\xxxxxxx> opencode
    Error: Unexpected error
    
    Failed to initialize OpenTUI render library: bun:ffi dlopen() is not available in this build (TinyCC is disabled)
  24. jcompagner commented on Oct 12, 2026

    @jcompagner

    i think you need to go to opencode V2 which is on the latest bun version and does have those fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions