Please add self-test on startup to find build/platform issues before model runs #1287

Closed
opened 2026-02-16 17:30:18 -05:00 by yindo · 5 comments
Owner

Originally created by @stevelr on GitHub (Aug 13, 2025).

Originally assigned to: @thdxr on GitHub.

Got this error:

Bash | ResolveMessage: Cannot find module '/$bunfs/root/../../../tree-sitter-d8jpqavy.node' from '/$bunfs/root/opencode'

on NixOS on aarch64 using opencode v0.4.40

The cli appeared to start fine, and I was able to auth, enter a key, and select a model (Gemini 2.5 pro). The model could read files but the error only showed up when the model tried to run simple bash commands like mkdir.

I tried clearing the cache folder and restarting, but got the same error.

opencode hey says Hey there. What would you like help with today? If you have a task in mind, tell me what you want to build or fix.

It's possible that this issue has to do with the build script for nixos: I used the most recent nixpkgs script and updated the git version and hashes to v0.4.40. (on NixOS binary installers that depend on .so shared libraries don't work.)

There are two different problems: The symptom, which may be some combination of build script/tree-sitter/aarch64, and one that to some may be more important: the need for a self-test to discover potential problems like this during startup, instead of after the model has burned tokens reading and digesting material, and only failing when it tries to perform actions. I burned about $9 yesterday trying to work-around this issue before giving up.

I don't know anything about bun packaging but if you can point me toward a build script - or a way to make a static binary, I could test a fix on a free model.

Originally created by @stevelr on GitHub (Aug 13, 2025). Originally assigned to: @thdxr on GitHub. Got this error: > Bash | ResolveMessage: Cannot find module '/$bunfs/root/../../../tree-sitter-d8jpqavy.node' from '/$bunfs/root/opencode' on NixOS on aarch64 using opencode v0.4.40 The cli appeared to start fine, and I was able to auth, enter a key, and select a model (Gemini 2.5 pro). The model could read files but the error only showed up when the model tried to run simple bash commands like `mkdir`. I tried clearing the cache folder and restarting, but got the same error. `opencode hey` says `Hey there. What would you like help with today? If you have a task in mind, tell me what you want to build or fix.` It's possible that this issue has to do with the build script for nixos: I used the most recent [nixpkgs script](https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/op/opencode/package.nix#L172) and updated the git version and hashes to v0.4.40. (on NixOS binary installers that depend on `.so` shared libraries don't work.) There are two different problems: The symptom, which may be some combination of build script/tree-sitter/aarch64, and one that to some may be more important: the need for a self-test to discover potential problems like this during startup, instead of after the model has burned tokens reading and digesting material, and only failing when it tries to perform actions. I burned about $9 yesterday trying to work-around this issue before giving up. I don't know anything about bun packaging but if you can point me toward a build script - or a way to make a static binary, I could test a fix on a free model.
yindo closed this issue 2026-02-16 17:30:18 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Aug 13, 2025):

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

  • #1454: Bug Report: Cannot find module tree-sitter module on macOS arm64 - Same tree-sitter module error, different platform but similar core issue
  • #1453: Version 0.3.87 stopped working - Same tree-sitter module error pattern
  • #1452: Not able to open opencode - Same tree-sitter module error message
  • #1509: failing to run command on new update - Similar tree-sitter module error in logs
  • #462: Add support for NixOS and/or Static linked binaries - Related NixOS compatibility issue, though focused on dynamic linking rather than tree-sitter

The tree-sitter module loading error appears to be a known issue affecting multiple platforms and architectures. The self-test functionality you're requesting would indeed help catch these issues before model execution.

If none of these address your specific case, please let us know how this issue differs.

@github-actions[bot] commented on GitHub (Aug 13, 2025): 👋 This issue might be a duplicate of existing issues. Please check: - #1454: Bug Report: Cannot find module tree-sitter module on macOS arm64 - Same tree-sitter module error, different platform but similar core issue - #1453: Version 0.3.87 stopped working - Same tree-sitter module error pattern - #1452: Not able to open opencode - Same tree-sitter module error message - #1509: failing to run command on new update - Similar tree-sitter module error in logs - #462: Add support for NixOS and/or Static linked binaries - Related NixOS compatibility issue, though focused on dynamic linking rather than tree-sitter The tree-sitter module loading error appears to be a known issue affecting multiple platforms and architectures. The self-test functionality you're requesting would indeed help catch these issues before model execution. If none of these address your specific case, please let us know how this issue differs.
Author
Owner

@stevelr commented on GitHub (Aug 13, 2025):

yes bot I read those before filing this. Issue 1454 said it was going to be fixed in 0.3.90 but the script I used was for 0.4.1, and 1454 didn't link to a git diff that I could check against. The other issues & PRs I read said that either (a) the problem manifested when starting opencode, where for me it didn't appear until much later, or (b) were fixed by clearing cache, which I tried but it didn't resolve the issue.
There is an open PR related to aarch64 and tree-sitter, so I know that's being worked on. In this issue I tried to emphasize the need for a startup self-test

@stevelr commented on GitHub (Aug 13, 2025): yes bot I read those before filing this. Issue 1454 said it was going to be fixed in 0.3.90 but the script I used was for 0.4.1, and 1454 didn't link to a git diff that I could check against. The other issues & PRs I read said that either (a) the problem manifested when starting opencode, where for me it didn't appear until much later, or (b) were fixed by clearing cache, which I tried but it didn't resolve the issue. There is an open PR related to aarch64 and tree-sitter, so I know that's being worked on. In this issue I tried to emphasize the need for a startup self-test
Author
Owner

@TheSirC commented on GitHub (Sep 12, 2025):

I concur. I am on NixOS as well and was hit by the issue today when the agent tried to run a Bash command.

@TheSirC commented on GitHub (Sep 12, 2025): I concur. I am on NixOS as well and was hit by the issue today when the agent tried to run a Bash command.
Author
Owner

@rekram1-node commented on GitHub (Sep 12, 2025):

@TheSirC what version are you on? I know bun had a bug that affected Nix but I think it should be fixed on latest

@rekram1-node commented on GitHub (Sep 12, 2025): @TheSirC what version are you on? I know bun had a bug that affected Nix but I think it should be fixed on latest
Author
Owner

@rekram1-node commented on GitHub (Dec 27, 2025):

[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

@rekram1-node commented on GitHub (Dec 27, 2025): [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1287