Environment
- opencode: 1.15.10
- Bun: 1.3.14
- macOS: 26.4.1
- CPU: Apple Silicon / arm64
- Plugin:
@cortexkit/opencode-magic-context@latest
Symptom
opencode crashes after running for a while when @cortexkit/opencode-magic-context@latest is enabled.
The terminal crash output includes:
panic: NAPI FATAL ERROR: Error::New napi_create_error
oh no: Bun has crashed. This indicates a bug in Bun, not your code.
zsh: trace trap opencode
Evidence
The macOS crash report for the opencode process shows native modules loaded in the process:
onnxruntime_binding.node
libonnxruntime.1.24.3.dylib
sharp-darwin-arm64.node
libvips-cpp.8.17.3.dylib
Those modules appear to come from the @cortexkit/opencode-magic-context dependency tree, specifically the ONNX / transformers and sharp / libvips native dependencies.
Workaround
Removing @cortexkit/opencode-magic-context@latest from both opencode's global plugin list and TUI plugin list avoids loading those native modules. After removing it, opencode can load config and list models normally:
opencode models newapi --print-logs
The startup logs no longer include @cortexkit/opencode-magic-context@latest and opencode successfully initializes the remaining plugins.
Expected behavior
The plugin should not crash the host opencode / Bun process. If native dependencies are required, it would be helpful for the plugin to either avoid incompatible native paths under Bun or document a supported runtime / version matrix.
Notes
This may ultimately be a Bun native-addon crash, but the practical trigger appears to be enabling @cortexkit/opencode-magic-context@latest in opencode on macOS arm64.
Environment
@cortexkit/opencode-magic-context@latestSymptom
opencode crashes after running for a while when
@cortexkit/opencode-magic-context@latestis enabled.The terminal crash output includes:
Evidence
The macOS crash report for the
opencodeprocess shows native modules loaded in the process:Those modules appear to come from the
@cortexkit/opencode-magic-contextdependency tree, specifically the ONNX / transformers and sharp / libvips native dependencies.Workaround
Removing
@cortexkit/opencode-magic-context@latestfrom both opencode's global plugin list and TUI plugin list avoids loading those native modules. After removing it, opencode can load config and list models normally:The startup logs no longer include
@cortexkit/opencode-magic-context@latestand opencode successfully initializes the remaining plugins.Expected behavior
The plugin should not crash the host opencode / Bun process. If native dependencies are required, it would be helpful for the plugin to either avoid incompatible native paths under Bun or document a supported runtime / version matrix.
Notes
This may ultimately be a Bun native-addon crash, but the practical trigger appears to be enabling
@cortexkit/opencode-magic-context@latestin opencode on macOS arm64.