You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows: BUN_CHILD_FLAGS --config=NUL panics Bun 1.3.10 — terminal-agent crash window every few seconds #3085
On Windows, every terminal-agent spawn crashes Bun in ~3ms with:
panic(main thread): start index 1 is larger than end index 0
oh no: Bun has crashed. This indicates a bug in Bun, not your code.
The trigger is BUN_CHILD_FLAGS in browse/src/terminal-agent-control.ts:146, which passes --config=NUL on win32 (added in v1.91.19.0, #3025). Bun 1.3.10 on Windows panics while parsing that flag, before the script runs.
The crash opens a visible console window. The supervisor and watchdog then respawn the agent (1s/2s/4s/8s backoff, then every 30–60s), so the user gets a Bun crash window every few seconds for as long as a headed browse connect daemon is alive. This applies to any daemon on the machine, including one started by another session in a different repo.
Repro (no gstack needed)
echo'console.log("ok")'> probe.ts
bun run --no-env-file --config=NUL probe.ts # panic(main thread): start index 1 is larger than end index 0
bun run --no-env-file probe.ts # ok
Update: upgrading Bun fixes it. On Bun 1.4.2 (bun upgrade from 1.3.10, same Windows 11 box), the repro above runs cleanly: bun run --no-env-file --config=NUL probe.ts prints ok. After the upgrade the running daemon's next terminal-agent respawn succeeds and the crash windows stop.
So the panic is a Bun bug fixed somewhere in 1.3.11–1.4.2. That points to a smaller fix on the gstack side: require a minimum Bun version (or check it before spawning and print a clear "upgrade Bun" message) instead of dropping --config=NUL. Windows users still on 1.3.10 will keep hitting this until they upgrade.
Fixed in v1.91.86.0 (47cd4a9, #3135). Bun children now get an empty private bunfig instead of --config=NUL, which avoids the Bun 1.3.10 panic on Windows. Thanks @adammartin0087 for the clear repro. Update with /gstack-upgrade.
Activity
adammartin0087 commentedon Oct 8, 2026
Update: upgrading Bun fixes it. On Bun 1.4.2 (
bun upgradefrom 1.3.10, same Windows 11 box), the repro above runs cleanly:bun run --no-env-file --config=NUL probe.tsprintsok. After the upgrade the running daemon's next terminal-agent respawn succeeds and the crash windows stop.So the panic is a Bun bug fixed somewhere in 1.3.11–1.4.2. That points to a smaller fix on the gstack side: require a minimum Bun version (or check it before spawning and print a clear "upgrade Bun" message) instead of dropping
--config=NUL. Windows users still on 1.3.10 will keep hitting this until they upgrade.v1.91.86.0 fix(browse): proxy from environment, Windows 8.3 temp path…
capy-ai commentedon Oct 11, 2026
Fixed in v1.91.86.0 (47cd4a9, #3135). Bun children now get an empty private bunfig instead of
--config=NUL, which avoids the Bun 1.3.10 panic on Windows. Thanks @adammartin0087 for the clear repro. Update with/gstack-upgrade.v1.91.86.0 fix(browse): proxy from environment, Windows 8.3 temp path…