claude --resume / --continue crashes: `g78 is not a function` (v2.1.119, v2.1.120)
claude --resume <id> crashes immediately: g78 is not a function (v2.1.119, v2.1.120)
Summary
claude --resume <session> crashes on startup before any UI renders, with g78 is not a function thrown from a useEffect in the REPL component. The crash also reproduces with --continue if there are persisted messages to restore.
Reproduces on 2.1.119 and 2.1.120 (native Linux installer). Not yet tested on 2.1.118.
Repro
- Have any project with persisted session messages (e.g. a recently-used session in
~/.claude/projects/<slug>/<uuid>.jsonl). - Run
claude --resume "<label-or-id>"(also reproduces withclaude --continue). - Crash before the TUI mounts.
Stack trace (2.1.120)
ERROR g78 is not a function. (In 'g78(z)', 'g78' is undefined)
/$bunfs/root/src/entrypoints/cli.js:9247:5663
- <anonymous> (cli.js:9247:5663)
- WC (cli.js:492:63749)
- pT (cli.js:492:76948)
- MY (cli.js:492:76827)
- pT (cli.js:492:77745) [repeats]
- async <anonymous> (cli.js:18811:2361)
Root cause
In the bundled cli.js, the REPL component does:
let S = sq.useMemo(() => !1, []); // hardcoded false — feature flag for some remote-session mode
...
let { onBeforeQuery: F78, onTurnComplete: vv8, onSessionRestored: g78,
render: sWq, ownsInput: Vv8 } = Cf9({ enabled: S, setMessages: F4, ... });
Cf9({ enabled: false, ... }) returns an object where onSessionRestored is undefined.
Then a few hundred lines later, in the mount effect that processes initial messages:
sq.useEffect(() => {
if (z && z.length > 0) {
K2q(z, zK()),
y$K({ abortController: new AbortController, taskRegistry: $8 }),
eCK(z),
Bc(z),
t$8.current.current = uwq(z, gK),
g78(z); // <-- crashes when g78 (onSessionRestored) is undefined
}
}, []);
The call site is not guarded by enabled/feature flag. It is invoked unconditionally whenever there are initial messages — i.e. every --resume and every --continue with prior messages.
Suggested fix
Either:
- Make
Cf9always return a no-oponSessionRestoredwhenenabledis false (defensive default), or - Guard the call site:
g78 && g78(z)(org78?.(z)).
The second is a one-character fix.
Workaround used locally
Binary patch on ~/.local/share/claude/versions/2.1.120 — same-length replacement of g78(z) with void 0 (matches the intended no-op when the feature flag is off). Two occurrences in the bundle.
Environment
- Platform: Linux 6.12.75+rpt-rpi-2712 (Raspberry Pi 5)
- Shell: bash
- Claude Code: 2.1.120 (native installer, Bun-bundled binary)
- Also reproduced on: 2.1.119
- npm dist-tags at time of report:
stable: 2.1.112, next: 2.1.119, latest: 2.1.119
Impact
Hard-blocks --resume and --continue for any user on next channel since 2.1.119. The error message also leaks a giant minified stack into the terminal, which is noisy and consumes input tokens on the next session restart.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗