/fork command crashes with 'undefined is not an object'

Resolved 💬 1 comment Opened Feb 14, 2026 by rf-leon Closed Feb 18, 2026

Bug Report

Description

Running /fork to fork a session crashes with:

ERROR  undefined is not an object (evaluating 'T')

Stack Trace

/$bunfs/root/claude:2475:888

- bG8 (/$bunfs/root/claude:2475:888)
- $VB (/$bunfs/root/claude:2475:1834)
- KRB (/$bunfs/root/claude:2105:5583)
- v7 (/$bunfs/root/claude:682:20801)
- F4 (/$bunfs/root/claude:682:39204)
- ip (/$bunfs/root/claude:682:49829)
- gv (/$bunfs/root/claude:682:86106)
- mTT (/$bunfs/root/claude:682:85078)
- Rl (/$bunfs/root/claude:682:84902)
- sp (/$bunfs/root/claude:682:81693)

Analysis

The crash occurs in bG8, which processes web search results (searchCount, totalResultCount). It appears to be iterating over a result set where an entry is undefined/null, likely from a WebSearch tool result in the session being forked.

The function $VB (which renders the tool result message for web search) calls bG8(T.results) without null-checking T or T.results.

Steps to Reproduce

  1. Have a session that used web search
  2. Run /fork
  3. Observe crash

Expected Behavior

/fork should successfully fork the session, handling any null/undefined tool results gracefully.

Environment

  • Platform: macOS (Darwin 25.2.0)
  • Shell: zsh

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗