UKH is not a function: crash on --resume when onSessionRestored callback is undefined
Resolved 💬 5 comments Opened Apr 25, 2026 by bundybear626 Closed Apr 28, 2026
Description
Running claude --resume <session-id> crashes immediately with a runtime error: UKH is not a function. (In 'UKH(K)', 'UKH' is undefined).
Steps to Reproduce
claude --resume 49f27d6a-b17a-4d0b-a5e1-3ffa5795061d
Error
ERROR UKH is not a function. (In 'UKH(K)', 'UKH' is undefined)
/$bunfs/root/src/entrypoints/cli.js:9247:5663
Root Cause (from minified source)
In the resume callback eJ$, UKH is the onSessionRestored destructured from RW4():
let{onBeforeQuery:FKH,onTurnComplete:vvH,onSessionRestored:UKH,...}=RW4({...})
Later, it is called unconditionally:
if(K&&K.length>0)
$L$(K,K6()),yO6(...),eR6(K),Bc(K),
tOH.current.current=u3$(K,U6),
UKH(K) // <-- crashes when UKH is undefined
UKH should be guarded: UKH?.(K) or if(UKH) UKH(K).
Stack Trace
- <anonymous> (/$bunfs/root/src/entrypoints/cli.js:9247:5663)
- JR (/$bunfs/root/src/entrypoints/cli.js:492:63749)
- Bw (/$bunfs/root/src/entrypoints/cli.js:492:76948)
- Xz (/$bunfs/root/src/entrypoints/cli.js:492:76827)
- Bw (/$bunfs/root/src/entrypoints/cli.js:492:77745)
- Xz (/$bunfs/root/src/entrypoints/cli.js:492:76827)
- Bw (/$bunfs/root/src/entrypoints/cli.js:492:76926)
- Xz (/$bunfs/root/src/entrypoints/cli.js:492:76827)
- Bw (/$bunfs/root/src/entrypoints/cli.js:492:77745)
- Xz (/$bunfs/root/src/entrypoints/cli.js:492:76827)
- async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:18811:2361)
Environment
- Claude Code version: 2.1.119
- Platform: Linux (Ubuntu)
- Node: n/a (Bun runtime via
/$bunfs)
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗