Skip to content

Bun crash when attempting to run opencode-ai from source #20959

Closed

Description

@richdooz

How can we reproduce the crash?

Check out 3b9b391 of https://github.com/sst/opencode#
Go version 1.24.5

$ uname -a
CYGWIN_NT-10.0-26100 LAPTOP-LUA0BCM5 3.6.3-1.x86_64 2025-06-05 11:45 UTC x86_64 Cygwin```

Checkout opencode, run "bun install".
Fails on creating the hooks, but whether or not those are there I get the panic.

Relevant log output

$ bun run packages/opencode/src/index.ts
============================================================
Bun v1.2.18 (0d4089ea) Windows x64
Windows v.win11_dt
CPU: sse42 avx avx2 avx512
Args: "C:\Users\richd_iotecha\.bun\bin\bun.exe" "run" "packages/opencode/src/index.ts"
Features: bunfig(2) fetch jsc(2) macros(3) transpiler_cache tsconfig(2)
Builtins: "bun:main" "node:fs/promises" "node:os" "node:path" "node:process" "node:util"
Elapsed: 75ms | User: 125ms | Sys: 78ms
RSS: 0.22GB | Peak: 0.22GB | Commit: 0.56GB | Faults: 54703

panic(thread 8800): attempt to use null value
Crashed while visiting C:\devel\opencode\opencode\packages\opencode\src\provider\models.ts
oh no: Bun has crashed. This indicates a bug in Bun, not your code.

To send a redacted crash report to Bun's team,
please file a GitHub issue using the link below:

 https://bun.report/1.2.18/wr10d4089eGgkkwgBk6gjJ+/rhJ+h6vbk+vxau585Y2ujzoBw439WyslwV2jnvV4johUA0eNpLLClJzS0oUSjJVygtTlXIK83JUShLzClNBQB82AmI

Stack Trace (bun.report)

Bun v1.2.18 (0d4089e) on windows x86_64 [RunCommand]

panic: attempt to use null value

Features: tsconfig, bunfig, fetch, jsc, macros

Sentry Issue: BUN-HE3

Activity

  1. RiskyMH commented on Jul 11, 2025

    @RiskyMH
    Contributor

    Fixed in #20903! Please run bun upgrade --canary or wait until 1.2.19 is released.

  2. richdooz commented on Jul 11, 2025

    @richdooz
    Author

    @RiskyMH ... I stepped into the coal mine and did not die! Thank you!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    crashAn issue that could cause a crashneeds triagewindowsAn issue that is known to occur on Windows

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions