2.1.120 regression: claude --resume / --continue crash with "g9H is not a function"

Resolved 💬 11 comments Opened Apr 25, 2026 by sgalliver Closed Apr 27, 2026

Summary

claude --resume <session-id> and claude --continue crash immediately on 2.1.120 with a JS runtime error. The interactive workaround (claude --new, then /resume <session-id> from the REPL) works fine. Both --resume and --continue worked correctly on 2.1.119.

Repro steps

  1. Have at least one prior session in ~/.claude/projects/.
  2. From a shell: claude --resume <session-id>
  3. Observe the crash. claude --continue crashes the same way.

Error output

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

/$bunfs/root/src/entrypoints/cli.js:9251:5663

(Full stack trace shows repeated calls through pj / fT callbacks in line 492 before reaching the crash site at line 9251.)

Environment

  • Platform: macOS (arm64)
  • Install method: native auto-updater (~/.local/share/claude/versions/)
  • Version that broke: 2.1.120 (auto-installed 2026-04-24)
  • Last working version: 2.1.119 (confirmed working after rolling back)
  • Shell: fish (via zsh login shell), also zsh and bash

Version timeline

| Version | Installed | Status |
|---|---|---|
| 2.1.118 | 2026-04-22 | Working |
| 2.1.119 | 2026-04-23 | Working |
| 2.1.120 | 2026-04-24 15:53 | Broken |

Workaround

Either:

  • Roll back the symlink: ln -sfn ~/.local/share/claude/versions/2.1.119 ~/.local/bin/claude
  • Or use claude --new and then type /resume <session-id> from inside the REPL (this takes a different code path that doesn't hit the bug)

Analysis (from reading obfuscated source — not verified against real source)

The REPL component at cli.js:9251 destructures an onSessionRestored callback from a hook that appears to be gated by a feature flag:

let { onSessionRestored: g9H, ... } = FXK({ enabled: S, ... })
// S = useMemo(() => false, [])  — always false

When enabled is false, the hook returns no onSessionRestored, so g9H is undefined. A useEffect on REPL mount then calls g9H(K) unconditionally when K (the initial messages array) is non-empty:

useEffect(() => {
  if (K && K.length > 0) {
    ..., g9H(K)   // 💥 crashes when undefined
  }
}, [])

The two paths diverge because:

  • claude --resume / --continue → REPL mounts with K = [prior session messages] → effect fires → crash
  • claude --new → REPL mounts with K = [] → effect is skipped → /resume uses a different internal function that doesn't reference g9H

The fix would be g9H?.(K) instead of g9H(K), or ensuring the hook always returns a safe no-op for onSessionRestored even when disabled.

View original on GitHub ↗

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