claude-code - 💡(How to fix) Fix [BUG] claude -c crashes with UKH is not a function on session resume — server-pushed GrowthBook flag pins broken version (2.1.119) [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#53157Fetched 2026-04-26 05:22:56
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×4

Error Message

&&!Fc){if(d("tengu_cost_threshold_reached",{}),AJ(!0),YS$())pKH(!0)}},[S9,ds,Fc]);let hw8=s$.useCallback(async(j$)=>{let r$=DH.getState(),{mode:_8,isBypassPermissionsModeAvailable:Hq}=r$.toolPermissionContext;switch(GV$(8,Hq)){case"allow":return!0;case"deny":return!1;case"classify":return C68(j$.host,j$.port,f5.current,X6.current,r$.toolPermissionContext,new AbortController().signal);case"ask":break}if(yK()&&R$()){let OK=vQK(),qK=await VQK(j$.host,OK);return new Promise((lK)=>{if(!qK){BA(($q)=>[...$q,{hostPattern:j$,resolvePromise:lK}]);return}EQK({requestId:OK,host:j$.host,resolve:lK}),e(($q)=>({...$q,pendingSandboxRequest:{requestId:OK,host:j$.host}}))})}return new Promise((OK)=>{let qK=!1;function lK($q){if(qK)return;qK=!0,OK($q)}BA(($q)=>[...$q,{hostPattern:j$,resolvePromise:lK}]);{let $q=DH.getState().replBridgePermissionCallbacks;if($q){let Y7=mOH.randomUUID();$q.sendRequest(Y7,yD8,{host:j$.host},mOH.randomUUID(),Allow network connection to ${j$.host}?);let U1=$q.onResponse(Y7,(Lz)=>{U1();let _O=Lz.behavior==="allow";BA((Fw)=>{return Fw.filter((Uw)=>Uw.hostPattern.host===j$.host).forEach((Uw)=>Uw.resolvePromise(_O)),Fw.filter((Uw)=>Uw.hostPattern.host!==j$.host)});let NG=pw.current.get(j$.host);if(NG){for(let Fw of NG)Fw();pw.current.delete(j$.host)}}),iM=()=>{U1(),$q.cancelRequest(Y7)},R9=pw.current.get(j$.host)??[];R9.push(iM),pw.current.set(j$.host,R9)}}})},[e,DH]);if(s$.useEffect(()=>{let j$=E6.getSandboxUnavailableReason();if(!j$)return;if(E6.isSandboxRequired()){process.stderr.write(`

9248: Error: sandbox required but unavailable: ${j$} 9249: + sandbox.failIfUnavailable is set \u2014 refusing to start without a working sandbox. 9250:

  • <anonymous> (/$bunfs/root/src/entrypoints/cli.js:9247:5663)
  • JR (/$bunfs/root/src/entrypoints/cli.js:492:63749)

Root Cause

Root cause (investigated): In 2.1.119, the RW4() hook doesn't return onSessionRestored when called with enabled: false, but the REPL calls it unconditionally on session restore. The symbol onSessionRestored appears 0 times in the 2.1.119 binary and 3 times in 2.1.120, confirming the fix landed in 2.1.120.

Code Example

&&!Fc){if(d("tengu_cost_threshold_reached",{}),AJ(!0),YS$())pKH(!0)}},[S9,ds,Fc]);let hw8=s$.useCallback(async(j$)=>{let
     r$=DH.getState(),{mode:_8,isBypassPermissionsModeAvailable:Hq}=r$.toolPermissionContext;switch(GV$(_8,Hq)){case"allow":return!0;case"deny":return!1;case"classify":return C68(j$.host,j$.port,f5.current,X6.current,r$.toolPermissionContext,new
     AbortController().signal);case"ask":break}if(yK()&&R_$()){let OK=vQK(),qK=await VQK(j$.host,OK);return new
     Promise((lK)=>{if(!qK){BA(($q)=>[...$q,{hostPattern:j$,resolvePromise:lK}]);return}EQK({requestId:OK,host:j$.host,resolve:lK}),e(($q)=>({...$q,pendingSandboxRequest:{requestId:OK,host:j$.host}}))})}return new Promise((OK)=>{let
     qK=!1;function lK($q){if(qK)return;qK=!0,OK($q)}BA(($q)=>[...$q,{hostPattern:j$,resolvePromise:lK}]);{let $q=DH.getState().replBridgePermissionCallbacks;if($q){let
     Y7=mOH.randomUUID();$q.sendRequest(Y7,yD8,{host:j$.host},mOH.randomUUID(),`Allow network connection to ${j$.host}?`);let U1=$q.onResponse(Y7,(Lz)=>{U1();let _O=Lz.behavior==="allow";BA((Fw)=>{return
     Fw.filter((Uw)=>Uw.hostPattern.host===j$.host).forEach((Uw)=>Uw.resolvePromise(_O)),Fw.filter((Uw)=>Uw.hostPattern.host!==j$.host)});let NG=pw.current.get(j$.host);if(NG){for(let Fw of
     NG)Fw();pw.current.delete(j$.host)}}),iM=()=>{U1(),$q.cancelRequest(Y7)},R9=pw.current.get(j$.host)??[];R9.push(iM),pw.current.set(j$.host,R9)}}})},[e,DH]);if(s$.useEffect(()=>{let
     j$=E6.getSandboxUnavailableReason();if(!j$)return;if(E6.isSandboxRequired()){process.stderr.write(`

 9248: Error: sandbox required but unavailable: ${j$}
 9249: `+`  sandbox.failIfUnavailable is set \u2014 refusing to start without a working sandbox.
 9250:

 - <anonymous> (/$bunfs/root/src/entrypoints/cli.js:9247:5663)
 - JR (/$bunfs/root/src/entrypoints/cli.js:492:63749)
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Running claude -c to resume a previous session crashes immediately with:

UKH is not a function

Root cause (investigated): In 2.1.119, the RW4() hook doesn't return onSessionRestored when called with enabled: false, but the REPL calls it unconditionally on session restore. The symbol onSessionRestored appears 0 times in the 2.1.119 binary and 3 times in 2.1.120, confirming the fix landed in 2.1.120.

Why the fix doesn't self-apply: The server pushes a GrowthBook feature flag that gets cached in ~/.claude.json at path cachedGrowthBookFeatures.tengu_max_version_config.external. This field is being set to "2.1.119" by the server, causing every Claude startup to reset the local binary symlink back to 2.1.119 — even after manually updating it to 2.1.120.

Steps to reproduce

  1. Use claude for any session
  2. Exit and run claude -c to resume
  3. Crash: UKH is not a function

Expected behavior: Session resumes normally.

What Should Happen?

Expected behavior: Session resumes normally.

Error Messages/Logs

&&!Fc){if(d("tengu_cost_threshold_reached",{}),AJ(!0),YS$())pKH(!0)}},[S9,ds,Fc]);let hw8=s$.useCallback(async(j$)=>{let
     r$=DH.getState(),{mode:_8,isBypassPermissionsModeAvailable:Hq}=r$.toolPermissionContext;switch(GV$(_8,Hq)){case"allow":return!0;case"deny":return!1;case"classify":return C68(j$.host,j$.port,f5.current,X6.current,r$.toolPermissionContext,new
     AbortController().signal);case"ask":break}if(yK()&&R_$()){let OK=vQK(),qK=await VQK(j$.host,OK);return new
     Promise((lK)=>{if(!qK){BA(($q)=>[...$q,{hostPattern:j$,resolvePromise:lK}]);return}EQK({requestId:OK,host:j$.host,resolve:lK}),e(($q)=>({...$q,pendingSandboxRequest:{requestId:OK,host:j$.host}}))})}return new Promise((OK)=>{let
     qK=!1;function lK($q){if(qK)return;qK=!0,OK($q)}BA(($q)=>[...$q,{hostPattern:j$,resolvePromise:lK}]);{let $q=DH.getState().replBridgePermissionCallbacks;if($q){let
     Y7=mOH.randomUUID();$q.sendRequest(Y7,yD8,{host:j$.host},mOH.randomUUID(),`Allow network connection to ${j$.host}?`);let U1=$q.onResponse(Y7,(Lz)=>{U1();let _O=Lz.behavior==="allow";BA((Fw)=>{return
     Fw.filter((Uw)=>Uw.hostPattern.host===j$.host).forEach((Uw)=>Uw.resolvePromise(_O)),Fw.filter((Uw)=>Uw.hostPattern.host!==j$.host)});let NG=pw.current.get(j$.host);if(NG){for(let Fw of
     NG)Fw();pw.current.delete(j$.host)}}),iM=()=>{U1(),$q.cancelRequest(Y7)},R9=pw.current.get(j$.host)??[];R9.push(iM),pw.current.set(j$.host,R9)}}})},[e,DH]);if(s$.useEffect(()=>{let
     j$=E6.getSandboxUnavailableReason();if(!j$)return;if(E6.isSandboxRequired()){process.stderr.write(`

 9248: Error: sandbox required but unavailable: ${j$}
 9249: `+`  sandbox.failIfUnavailable is set \u2014 refusing to start without a working sandbox.
 9250:

 - <anonymous> (/$bunfs/root/src/entrypoints/cli.js:9247:5663)
 - JR (/$bunfs/root/src/entrypoints/cli.js:492:63749)

Steps to Reproduce

Steps to reproduce

  1. Use claude for any session
  2. Exit and run claude -c to resume
  3. Crash: UKH is not a function

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.120

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

No response

extent analysis

TL;DR

The issue can be fixed by updating the cachedGrowthBookFeatures.tengu_max_version_config.external field in ~/.claude.json to "2.1.120" to prevent the local binary symlink from being reset to 2.1.119.

Guidance

  • The root cause of the issue is the cachedGrowthBookFeatures.tengu_max_version_config.external field being set to "2.1.119" by the server, causing the local binary symlink to be reset to 2.1.119.
  • To fix the issue, update the cachedGrowthBookFeatures.tengu_max_version_config.external field in ~/.claude.json to "2.1.120".
  • Verify that the fix worked by running claude -c to resume a previous session and checking that it no longer crashes with the "UKH is not a function" error.
  • If the issue persists, try manually updating the local binary symlink to 2.1.120 and verify that it is not being reset by the server.

Example

No code snippet is provided as it is not necessary to resolve the issue.

Notes

The issue is caused by a specific version mismatch and can be resolved by updating the cachedGrowthBookFeatures.tengu_max_version_config.external field. However, it is unclear why the server is setting this field to "2.1.119" and further investigation may be necessary to prevent similar issues in the future.

Recommendation

Apply the workaround by updating the cachedGrowthBookFeatures.tengu_max_version_config.external field in ~/.claude.json to "2.1.120", as this is the most direct way to resolve the issue.

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