claude-code - 💡(How to fix) Fix [Bug] `claude --continue` crashes with "g78 is not a function" on session resume [1 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#53084Fetched 2026-04-25 06:12:46
View on GitHub
Comments
1
Participants
1
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
labeled ×4commented ×1

Error Message

Error and stack trace: ERROR g78 is not a function. (In 'g78(z)', 'g78' is undefined)

Code Example

[]
RAW_BUFFERClick to expand / collapse

Bug Description Running claude --continue crashes immediately with "g78 is not a function" before the session loads. Reproduces on multiple macOS machines (Apple Silicon), all on 2.1.120. claude doctor is clean. Starting with plain claude works; have not yet tested whether /resume from inside a fresh session works around it.

Error and stack trace:

ERROR g78 is not a function. (In 'g78(z)', 'g78' is undefined) /$bunfs/root/src/entrypoints/cli.js:9247:5663

  • <anonymous> (/$bunfs/root/src/entrypoints/cli.js:9247:5663)
  • WC (/$bunfs/root/src/entrypoints/cli.js:492:63749)
  • pT (/$bunfs/root/src/entrypoints/cli.js:492:76948)
  • MY (/$bunfs/root/src/entrypoints/cli.js:492:76827)
  • pT (/$bunfs/root/src/entrypoints/cli.js:492:77745)
  • MY (/$bunfs/root/src/entrypoints/cli.js:492:76827)
  • pT (/$bunfs/root/src/entrypoints/cli.js:492:76926)
  • MY (/$bunfs/root/src/entrypoints/cli.js:492:76827)
  • pT (/$bunfs/root/src/entrypoints/cli.js:492:77745)
  • MY (/$bunfs/root/src/entrypoints/cli.js:492:76827)
  • async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:18804:11089)

Looks like g78 is the destructured onSessionRestored from the cowork/remote hook, which is undefined in local sessions but called unconditionally on the resume path when initial messages are present.

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.120
  • Feedback ID: b8595e38-255c-4a4d-938d-91dd2f04218c

Errors

[]

Environment:

  • Claude Code: 2.1.120
  • Install method: native installer (or npm — whichever applies)
  • macOS: 15.x, Apple Silicon (M4 Mac Mini)
  • Affected machines: 2 of 2 tested
  • /resume from fresh session: works / also crashes / not yet tested
  • Last known-good version: unknown
  • Searched existing issues for "g78" and "onSessionRestored": no matches

extent analysis

TL;DR

The issue is likely caused by an undefined onSessionRestored function being called unconditionally on the resume path, and a potential workaround is to test whether using /resume from inside a fresh session works around the crash.

Guidance

  • The error message "g78 is not a function" suggests that the onSessionRestored function is undefined in local sessions, but is being called when resuming a session with initial messages.
  • To verify the issue, try using /resume from inside a fresh session to see if it works around the crash.
  • Check the code to see if there are any conditional statements that should be preventing the onSessionRestored function from being called when it is undefined.
  • Test the issue on different versions of the software to see if it is a regression or a long-standing issue.

Example

No code snippet is provided as the issue does not contain enough information to create a minimal example.

Notes

The issue seems to be specific to the claude --continue command and the onSessionRestored function. The fact that claude doctor is clean and starting with plain claude works suggests that the issue is not related to the overall health of the system.

Recommendation

Apply workaround: Test using /resume from inside a fresh session to see if it works around the crash, as this may provide a temporary solution until the root cause is fixed.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [Bug] `claude --continue` crashes with "g78 is not a function" on session resume [1 comments, 1 participants]