[Bug] claude --resume crashes with "FKH is not a function" in v2.1.120

Resolved 💬 4 comments Opened Apr 25, 2026 by fleups Closed Apr 27, 2026

Bug Description

Running claude -r (or claude --resume) crashes immediately with a JavaScript error:
FKH is not a function. (In 'FKH(K)', 'FKH' is undefined)

Environment

  • Claude Code version: 2.1.120
  • OS: Windows 11 Pro 10.0.26200
  • Shell: cmd / bash

Steps to Reproduce

  1. Have an existing Claude Code session with conversation history
  2. Run claude -r or claude --resume
  3. Crash occurs immediately on startup

Expected Behavior

Session resumes normally.

Actual Behavior

Fatal crash with the following error:

ERROR  FKH is not a function. (In 'FKH(K)', 'FKH' is undefined)

B:/~BUN/root/src/entrypoints/cli.js:9273:5663

Stack trace:

- <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:9273:5663)
- PI (B:/~BUN/root/src/entrypoints/cli.js:512:63749)
- Fw (B:/~BUN/root/src/entrypoints/cli.js:512:76948)
- P5 (B:/~BUN/root/src/entrypoints/cli.js:512:76827)

Root Cause (Analysis)

FKH is the onSessionRestored callback destructured from XJ7(...):

{onBeforeQuery:UKH, onTurnComplete:LVH, onSessionRestored:FKH, render:iW8, ownsInput:ZVH} = XJ7({enabled:S, ...})

Where S = useMemo(() => false, []). When the feature is disabled, XJ7 returns undefined for onSessionRestored, but the code calls it unconditionally when initial messages (K) are present:

s8.useEffect(() => {
  if (K && K.length > 0) ..., FKH(K)  // called without null-check
}, []);

Additional Notes

  • This is a regression from v2.1.119 (working) → v2.1.120 (broken)
  • Workaround: start a new session manually, resume is completely broken
  • The error occurs before any user configuration is read, so it is unrelated to local settings

View original on GitHub ↗

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