2.1.120 regression: claude --resume / --continue crash with "g9H is not a function"
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
- Have at least one prior session in
~/.claude/projects/. - From a shell:
claude --resume <session-id> - Observe the crash.
claude --continuecrashes 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 --newand 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 withK = [prior session messages]→ effect fires → crashclaude --new→ REPL mounts withK = []→ effect is skipped →/resumeuses a different internal function that doesn't referenceg9H
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.
This issue has 11 comments on GitHub. Read the full discussion on GitHub ↗