Crash: React hook dependency array undefined when opening new session while another is running

Resolved 💬 3 comments Opened Jan 24, 2026 by xavierchoi Closed Jan 29, 2026

Description

Claude Code crashes with a React internal error when opening a new terminal session while an existing Claude Code session is already running. The crash occurs in the existing session immediately after the new session is opened.

Environment

  • Claude Code version: 2.1.19
  • OS: macOS 15.3 (Darwin 25.2.0)
  • Architecture: arm64 (Apple Silicon)
  • Runtime: Bun

Steps to Reproduce

  1. Open a terminal and start a Claude Code session
  2. While the first session is still running, open a new terminal
  3. Start a new Claude Code session in the second terminal
  4. The first session crashes immediately

Error Message

ERROR  undefined is not an object (evaluating 'N.length')

 /$bunfs/root/claude:546:20560

Stack Trace

 - Yq (/$bunfs/root/claude:546:20560)
 - N8 (/$bunfs/root/claude:546:29630)
 - <anonymous> (/$bunfs/root/claude:349:14657)
 - ck (/$bunfs/root/claude:588:196)
 - i90 (/$bunfs/root/claude:5925:41351)
 - Q1T (/$bunfs/root/claude:5940:9596)
 - e1 (/$bunfs/root/claude:546:20770)
 - fq (/$bunfs/root/claude:546:39163)
 - FB (/$bunfs/root/claude:546:49786)
 - Kx (/$bunfs/root/claude:546:86051)

Analysis

The error occurs in the React reconciler's hook dependency comparison function (Yq is minified areHookInputsEqual). The N.length access fails because N (previous dependencies array) is undefined.

This suggests a race condition or state corruption when multiple Claude Code sessions interact with shared resources (possibly session state files, sockets, or IPC mechanisms).

Expected Behavior

Multiple Claude Code sessions should be able to run concurrently without crashing each other.

Workaround

Killing all Claude Code processes and restarting resolves the issue:

pkill -f claude
claude

View original on GitHub ↗

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