--continue crashes with "g9H is not a function" on 2.1.120 (macOS arm64)
Summary
In version 2.1.120, running claude --continue immediately throws an unhandled error and the CLI exits. Running claude without --continue works fine. 2.1.119 does not have this issue. The error reproduces deterministically.
Environment
- Claude Code: 2.1.120 (auto-updated 2026-04-25, install via the Bun-bundled binary at
~/.local/share/claude/versions/2.1.120) - macOS: 26.2 (build 25C56), Apple Silicon (arm64)
- Shell: zsh
- Plugins enabled in settings.json:
clangd-lsp@claude-plugins-official skipDangerousModePermissionPrompt: true
Steps to reproduce
- Have at least one previous session in the current project (so there is something to continue).
- Run:
````
claude --continue --dangerously-skip-permissions
- Crash before any UI is rendered.
Error
ERROR g9H is not a function. (In '''g9H(K)''', '''g9H''' is undefined)
/$bunfs/root/src/entrypoints/cli.js:9251:5663
- <anonymous> (/$bunfs/root/src/entrypoints/cli.js:9251:5663)
- WC (/$bunfs/root/src/entrypoints/cli.js:492:63749)
- pj (/$bunfs/root/src/entrypoints/cli.js:492:76948)
- fT (/$bunfs/root/src/entrypoints/cli.js:492:76827)
- pj (/$bunfs/root/src/entrypoints/cli.js:492:76926)
- fT (/$bunfs/root/src/entrypoints/cli.js:492:76827)
- async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:18808:11089)
Likely cause (from reading the minified source)
In Ub8 (REPL component), the FXK hook is called with enabled: S, where S is hardcoded:
let S = s_.useMemo(() => !1, []);
...
let { onBeforeQuery: F9H, onTurnComplete: ZLH, onSessionRestored: g9H,
render: aM_, ownsInput: LLH } = FXK({ enabled: S, ... });
Because enabled is false, FXK returns an object whose onSessionRestored is undefined. But shortly afterwards there is an unconditional call:
s_.useEffect(() => {
if (K && K.length > 0) {
HP_(K, K8());
hY8({ abortController: new AbortController, taskRegistry: YH });
tC8(K);
UQ(K);
sYH.current.current = xz_(K, g8);
g9H(K); // <-- crashes when initialMessages is non-empty and enabled=false
}
}, []);
K is initialMessages, which is non-empty exactly when --continue (or --resume) loaded a prior session. So any user with a prior session hits this on --continue.
Suggested fix: guard the call (g9H?.(K)), or only attach the effect when enabled.
Workaround
Roll back to 2.1.119:
ln -sfn ~/.local/share/claude/versions/2.1.119 ~/.local/bin/claudeThis issue has 3 comments on GitHub. Read the full discussion on GitHub ↗