[BUG] Bundled Bun 1.4.0 (Rust) panics `index out of bounds: the len is 1 but the index is 1` on Linux x64 — repeated crashes in `--resume` picker and long-running sessions

Status Open
Reported on v2.1.207
Maintainer reply None cached
Activity 0 comments · opened Jul 19, 2026

Environment

  • Claude Code: crashes observed across 2.1.207–2.1.212; 2.1.214 (current) still bundles the same runtime
  • Bundled runtime: Bun v1.4.0 canary (Rust rewrite). Crashing build: commit a505a29 (per bun.report trace). Other installed CC versions bundle canaries 63bb0ca0d (2.1.201) and f6d0fcd24 (2.1.214)
  • OS: Ubuntu 24.04.4 LTS, kernel 6.8.0-134-generic, x86_64 (baseline build)
  • Install method: mise (native binary)
  • System-wide Bun 1.3.14 (Zig) is installed separately and has never crashed — only the bundled 1.4.0 canary is affected

Panic output

panic: index out of bounds: the len is 1 but the index is 1
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.4.0/B_1a505a29mgggkEuhogCi3u+6B6g1+6Bw80+6B270+6B850+6By/9h7B4yrqlC0//vlC+ki68B2hvm0C2619uCyo98uCss18uCy8wK0oxK6is12BA0eNrLzEtJrVDILy1RyE9TSMovzUsptlIoyUhVyEnNU8gsVjBUSALKgQQywSpBQgDnRhHJ

[1] 3991795 IOT instruction (core dumped)  claude --dangerously-skip-permissions

Second occurrence (different session, near-identical trace):

 https://bun.report/1.4.0/B_1a505a29mgkgkEuhogCi3u+6B6g1+6Bw80+6B270+6B850+6By/9h7B4yrqlC0//vlC+ki68B2hvm0C2619uCyo98uCss18uCy8wK0oxK6is12BA0eNrLzEtJrVDILy1RyE9TSMovzUsptlIoyUhVyEnNU8gsVjBUSALKgQQywSpBQgDnRhHJ

The panic message is Rust's slice-indexing panic format (the len is N but the index is N), i.e. this is a panic in the Rust-rewritten Bun, not the Zig codebase. The decoded bun.report trace shows the panic propagating through the event loop / runtime dispatch down to the VM entry point.

Frequency and triggers

At least 4 crashes since ~2026-07-14, same panic signature every time. Two trigger profiles:

  1. --resume session picker: launching claude --dangerously-skip-permissions --resume (interactive picker) crashed repeatedly in immediate succession on 2026-07-14 — the picker died before a session could be selected.
  2. Long-running interactive sessions: two sessions crashed mid-use after long uptimes — one at ~19.4 h (Elapsed: 69803265 ms, RSS 0.38 GB), one at ~46.7 h (Elapsed: 168212173 ms, RSS 0.39 GB), per the crash-report metadata block.

Workaround

Resuming by explicit session ID bypasses the picker crash reliably:

claude --dangerously-skip-permissions --resume <session-id>

No workaround found for the long-uptime crashes other than restarting sessions periodically.

Notes

  • No coredump captured by systemd-coredump despite (core dumped); happy to reproduce with cores enabled or run a debug build if useful.
  • Possibly related (same panic class, off-by-one len N / index N in Bun 1.4 canary, already fixed): oven-sh/bun#31503. The crashing commit a505a29 may predate that fix.
  • Existing CC issues #68404 (macOS panic after long session) and #78436 (Bun 1.4.0 Windows segfault) look like siblings but have different signatures.

View original on GitHub ↗