[BUG] Bun-level crash during foreground subagent (Agent tool) dispatch — v2.1.224, Windows

Status Open
Reported on v2.1.224
Maintainer reply None cached
Activity 2 comments · opened Aug 8, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Claude Code crashed at the Bun runtime level (native crash, confirmed via Bun's own crash reporter — "Crash Report Sent" dialog) while running a long CLI session.

  • Version: 2.1.224 (already updated to 2.1.225 locally since; haven't yet confirmed if it recurs)
  • OS: Windows 11 Home, build 10.0.26200
  • Context: 84-turn session, crashed immediately after dispatching a foreground Agent tool call (subagent_type: general-purpose, run_in_background: false) that was about to use WebSearch/WebFetch for a research task. No JS-level error was caught or logged — the session log simply stops mid tool-call, consistent with a hard native/Bun crash rather than an app-level exception.
  • Session ID: 96565f21-5e1f-442e-be05-b69341338db8
  • Bun crash report ID/link: [paste if the confirmation page shows one]

Bun v1.4.0 ([eb83531](<https://github.com/oven-sh/bun/tree/eb835313a74f40be0f16845823388cc53f330ef9>)) on windows x86_64_baseline [StandaloneExecutable]

Segmentation fault at address 0x28A00000050

  • [ClassInfo.h:115](<https://github.com/oven-sh/bun/blob/eb835313a74f40be0f16845823388cc53f330ef9//webkitbuild/JavaScriptCore/PrivateHeaders/JavaScriptCore/ClassInfo.h#L115>): JSC::MethodTable::visitChildren(...) const
  • [SlotVisitor.cpp:0](<https://github.com/oven-sh/bun/blob/eb835313a74f40be0f16845823388cc53f330ef9//webkit/Source/JavaScriptCore/heap/SlotVisitor.cpp#L0>): JSC::SlotVisitor::visitChildren
  • [SlotVisitor.cpp:523](<https://github.com/oven-sh/bun/blob/eb835313a74f40be0f16845823388cc53f330ef9//webkit/Source/JavaScriptCore/heap/SlotVisitor.cpp#L523>): JSC::SlotVisitor::drain::<lambda_4>::operator()(...) const
  • [SlotVisitorInlines.h:198](<https://github.com/oven-sh/bun/blob/eb835313a74f40be0f16845823388cc53f330ef9//webkitbuild/JavaScriptCore/PrivateHeaders/JavaScriptCore/SlotVisitorInlines.h#L198>): JSC::SlotVisitor::forEachMarkStack
  • [SlotVisitor.cpp:500](<https://github.com/oven-sh/bun/blob/eb835313a74f40be0f16845823388cc53f330ef9//webkit/Source/JavaScriptCore/heap/SlotVisitor.cpp#L500>): JSC::SlotVisitor::drain
  • [SlotVisitor.cpp:720](<https://github.com/oven-sh/bun/blob/eb835313a74f40be0f16845823388cc53f330ef9//webkit/Source/JavaScriptCore/heap/SlotVisitor.cpp#L720>): JSC::SlotVisitor::drainFromShared
  • [Heap.cpp:1579](<https://github.com/oven-sh/bun/blob/eb835313a74f40be0f16845823388cc53f330ef9//webkit/Source/JavaScriptCore/heap/Heap.cpp#L1579>): JSC::Heap::runBeginPhase::<lambda_39>::operator()(...) const
  • [SharedTask.h:91](<https://github.com/oven-sh/WebKit/blob/bun-eb835313a74f40be0f16845823388cc53f330ef9/Source/WTF/wtf/SharedTask.h#L91>): WTF::SharedTaskFunctor<void (),\lambda at /webkit/Source/JavaScriptCore/heap/Heap.cpp:1567:9'>::run`
  • [ParallelHelperPool.cpp:113](<https://github.com/oven-sh/bun/blob/eb835313a74f40be0f16845823388cc53f330ef9//webkit/Source/WTF/wtf/ParallelHelperPool.cpp#L113>): WTF::ParallelHelperClient::runTask
  • [ParallelHelperPool.cpp:211](<https://github.com/oven-sh/bun/blob/eb835313a74f40be0f16845823388cc53f330ef9//webkit/Source/WTF/wtf/ParallelHelperPool.cpp#L211>): WTF::ParallelHelperPool::Thread::work
  • [AutomaticThread.cpp:241](<https://github.com/oven-sh/bun/blob/eb835313a74f40be0f16845823388cc53f330ef9//webkit/Source/WTF/wtf/AutomaticThread.cpp#L241>): WTF::AutomaticThread::start::<lambda_3>::operator()(...) const
  • [Function.h:59](<https://github.com/oven-sh/bun/blob/eb835313a74f40be0f16845823388cc53f330ef9//webkit/Source/WTF/wtf/Function.h#L59>): WTF::Detail::CallableWrapper<\lambda at /webkit/Source/WTF/wtf/AutomaticThread.cpp:185:9',void>::call`
  • [Function.h:103](<https://github.com/oven-sh/bun/blob/eb835313a74f40be0f16845823388cc53f330ef9//webkit/Source/WTF/wtf/Function.h#L103>): WTF::Function<void (...)(...) const
  • [Threading.cpp:312](<https://github.com/oven-sh/bun/blob/eb835313a74f40be0f16845823388cc53f330ef9//webkit/Source/WTF/wtf/Threading.cpp#L312>): WTF::Thread::entryPoint
  • [ThreadingWin.cpp:149](<https://github.com/oven-sh/bun/blob/eb835313a74f40be0f16845823388cc53f330ef9//webkit/Source/WTF/wtf/win/ThreadingWin.cpp#L149>): WTF::wtfThreadEntryPoint
  • [thread.cpp:97](<https://github.com/oven-sh/bun/blob/eb835313a74f40be0f16845823388cc53f330ef9/src/appcrt/startup/thread.cpp#L97>): thread_start<unsigned int (...)(...),1>

Features: spawn, standalone\_executable, claude\_code, Bun.stderr, Bun.stdin, Bun.stdout, abort\_signal, fetch, jsc
Happy to provide more session log detail if useful.

What Should Happen?

Claude Code should continue running the session without crashing — dispatching a foreground subagent (Agent tool, general-purpose type) to perform a web-research task via WebSearch/WebFetch should not cause the underlying Bun runtime to segfault. At worst, an internal error should be caught and surfaced as a recoverable error/message in the CLI, not a hard native crash that kills the process and loses the rest of the session.

Error Messages/Logs

Bun v1.4.0 ([`eb83531`](<https://github.com/oven-sh/bun/tree/eb835313a74f40be0f16845823388cc53f330ef9>)) on windows x86_64_baseline [StandaloneExecutable]

Segmentation fault at address 0x28A00000050

- [`ClassInfo.h:115`](<https://github.com/oven-sh/bun/blob/eb835313a74f40be0f16845823388cc53f330ef9//webkitbuild/JavaScriptCore/PrivateHeaders/JavaScriptCore/ClassInfo.h#L115>): `JSC::MethodTable::visitChildren(...) const`
- [`SlotVisitor.cpp:0`](<https://github.com/oven-sh/bun/blob/eb835313a74f40be0f16845823388cc53f330ef9//webkit/Source/JavaScriptCore/heap/SlotVisitor.cpp#L0>): `JSC::SlotVisitor::visitChildren`
- [`SlotVisitor.cpp:523`](<https://github.com/oven-sh/bun/blob/eb835313a74f40be0f16845823388cc53f330ef9//webkit/Source/JavaScriptCore/heap/SlotVisitor.cpp#L523>): `JSC::SlotVisitor::drain::<lambda_4>::operator()(...) const`
- [`SlotVisitorInlines.h:198`](<https://github.com/oven-sh/bun/blob/eb835313a74f40be0f16845823388cc53f330ef9//webkitbuild/JavaScriptCore/PrivateHeaders/JavaScriptCore/SlotVisitorInlines.h#L198>): `JSC::SlotVisitor::forEachMarkStack`
- [`SlotVisitor.cpp:500`](<https://github.com/oven-sh/bun/blob/eb835313a74f40be0f16845823388cc53f330ef9//webkit/Source/JavaScriptCore/heap/SlotVisitor.cpp#L500>): `JSC::SlotVisitor::drain`
- [`SlotVisitor.cpp:720`](<https://github.com/oven-sh/bun/blob/eb835313a74f40be0f16845823388cc53f330ef9//webkit/Source/JavaScriptCore/heap/SlotVisitor.cpp#L720>): `JSC::SlotVisitor::drainFromShared`
- [`Heap.cpp:1579`](<https://github.com/oven-sh/bun/blob/eb835313a74f40be0f16845823388cc53f330ef9//webkit/Source/JavaScriptCore/heap/Heap.cpp#L1579>): `JSC::Heap::runBeginPhase::<lambda_39>::operator()(...) const`
- [`SharedTask.h:91`](<https://github.com/oven-sh/WebKit/blob/bun-eb835313a74f40be0f16845823388cc53f330ef9/Source/WTF/wtf/SharedTask.h#L91>): `WTF::SharedTaskFunctor<void (),\`lambda at /webkit/Source/JavaScriptCore/heap/Heap.cpp:1567:9'>::run`
- [`ParallelHelperPool.cpp:113`](<https://github.com/oven-sh/bun/blob/eb835313a74f40be0f16845823388cc53f330ef9//webkit/Source/WTF/wtf/ParallelHelperPool.cpp#L113>): `WTF::ParallelHelperClient::runTask`
- [`ParallelHelperPool.cpp:211`](<https://github.com/oven-sh/bun/blob/eb835313a74f40be0f16845823388cc53f330ef9//webkit/Source/WTF/wtf/ParallelHelperPool.cpp#L211>): `WTF::ParallelHelperPool::Thread::work`
- [`AutomaticThread.cpp:241`](<https://github.com/oven-sh/bun/blob/eb835313a74f40be0f16845823388cc53f330ef9//webkit/Source/WTF/wtf/AutomaticThread.cpp#L241>): `WTF::AutomaticThread::start::<lambda_3>::operator()(...) const`
- [`Function.h:59`](<https://github.com/oven-sh/bun/blob/eb835313a74f40be0f16845823388cc53f330ef9//webkit/Source/WTF/wtf/Function.h#L59>): `WTF::Detail::CallableWrapper<\`lambda at /webkit/Source/WTF/wtf/AutomaticThread.cpp:185:9',void>::call`
- [`Function.h:103`](<https://github.com/oven-sh/bun/blob/eb835313a74f40be0f16845823388cc53f330ef9//webkit/Source/WTF/wtf/Function.h#L103>): `WTF::Function<void (...)(...) const`
- [`Threading.cpp:312`](<https://github.com/oven-sh/bun/blob/eb835313a74f40be0f16845823388cc53f330ef9//webkit/Source/WTF/wtf/Threading.cpp#L312>): `WTF::Thread::entryPoint`
- [`ThreadingWin.cpp:149`](<https://github.com/oven-sh/bun/blob/eb835313a74f40be0f16845823388cc53f330ef9//webkit/Source/WTF/wtf/win/ThreadingWin.cpp#L149>): `WTF::wtfThreadEntryPoint`
- [`thread.cpp:97`](<https://github.com/oven-sh/bun/blob/eb835313a74f40be0f16845823388cc53f330ef9/src/appcrt/startup/thread.cpp#L97>): `thread_start<unsigned int (...)(...),1>`

Features: spawn, standalone\_executable, claude\_code, Bun.stderr, Bun.stdin, Bun.stdout, abort\_signal, fetch, jsc

Steps to Reproduce

  1. Start a Claude Code CLI session (v2.1.224, Windows) and work through a long session — in this case ~84 turns of mixed tool use (file edits, bash commands, prior subagent calls) in a single session before the crash occurred.
  2. Dispatch a foreground Agent tool call with subagent_type: general-purpose and run_in_background: false, with a prompt instructing the subagent to use WebSearch/WebFetch for a multi-part research task (no file edits).
  3. Crash occurred immediately upon/after the subagent beginning its work — no JS-level error was thrown or caught; the process segfaulted at the Bun/JSC level (see stack trace above) and the session terminated with no further log output.

Note: I have not been able to produce a minimal, reliably-reproducing example — the crash is a segfault inside Bun's parallel GC marking phase, which typically indicates a memory-safety bug that surfaces intermittently under memory/thread-concurrency pressure rather than on a fixed trigger. This is the only occurrence so far in this environment. Happy to try to reproduce again on 2.1.225 and report back if that's useful, but I'd rather not claim a guaranteed repro that isn't confirmed.

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

Unknown / not confirmed as a regression. This is the first occurrence of this crash observed in this environment — I don't have evidence of it happening on any earlier version, but I also haven't run extended sessions on prior versions to confirm they don't hit it. No bisection has been done. Currently running 2.1.225 post-crash without issue so far, but that's not (yet) a confirmed fix — just no recurrence yet.

Claude Code Version

Claude Code Version: 2.1.225 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗