claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

Unexpected CLI Crashes During Execution

Open menoncello opened this issue 1 year ago • 4 comments

Bug Description

Claude Code is crashing all the time

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 1.0.56
  • Feedback ID: 4127140f-f9a4-4bbe-83e7-592a3d0629f1

Errors

[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n    at genericNodeError (node:internal/errors:983:15)\n    at wrappedFn (node:internal/errors:537:14)\n    at checkExecSyncError (node:child_process:882:11)\n    at execSync (node:child_process:954:15)\n    at A7 (file:///Users/eduardomenoncello/node_modules/@anthropic-ai/claude-code/cli.js:797:5848)\n    at file:///Users/eduardomenoncello/node_modules/@anthropic-ai/claude-code/cli.js:709:48013\n    at Q (file:///Users/eduardomenoncello/node_modules/@anthropic-ai/claude-code/cli.js:609:14408)\n    at fY (file:///Users/eduardomenoncello/node_modules/@anthropic-ai/claude-code/cli.js:709:45724)\n    at QK (file:///Users/eduardomenoncello/node_modules/@anthropic-ai/claude-code/cli.js:709:44590)\n    at SB (file:///Users/eduardomenoncello/node_modules/@anthropic-ai/claude-code/cli.js:709:50639)","timestamp":"2025-07-21T11:57:29.789Z"},{"error":"Error: ENOENT: no such file or directory, open '/proc/version'\n    at Module.readFileSync (node:fs:442:20)\n    at Object.readFileSync (file:///Users/eduardomenoncello/node_modules/@anthropic-ai/claude-code/cli.js:615:7077)\n    at file:///Users/eduardomenoncello/node_modules/@anthropic-ai/claude-code/cli.js:615:8638\n    at Q (file:///Users/eduardomenoncello/node_modules/@anthropic-ai/claude-code/cli.js:609:14408)\n    at kT4 (file:///Users/eduardomenoncello/node_modules/@anthropic-ai/claude-code/cli.js:709:62815)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-07-21T11:57:30.391Z"}]

file:///Users/eduardomenoncello/node_modules/@anthropic-ai/claude-code/cli.js:7 import{createRequire as iMB}from"node:module";var dMB=Object.create;var{getPrototypeOf:cMB,defineProperty:Dy1,getOwnPropertyNames:lMB}=Object;var pMB=Object.prototype.hasOwnProperty;var F1=(A,B,Q)=>{Q=A!=null?dMB(cMB(A)):{};let I=B||!A||!A.__esModule?Dy1(Q,"default",{value:A,enumerable:!0}):Q;for(let D of lMB(A))if(!pMB.call(I,D))Dy1(I,D,{get:()=>A[D],enumerable:!0});return I};var E=(A,B)=>()=>(B||A((B={exports:{}}).exports,B),B.exports);var xh=(A,B)=>{for(var Q in B)Dy1(A,Q,{get:B[Q],enumerable:!0,configurable:!0,set:(I)=>B[Q]=()=>I})};var R31=(A,B)=>()=>(A&&(B=A(A=0)),B);var Z1=iMB(import.meta.url);var dUA=E((mZ8,mUA)=>{mUA.exports=function A(B){return B.map(function(Q){if(Q==="")return"''";if(Q&&typeof Q==="object")return Q.op.replace(/(.)/g,"\$1");if(/["\s\]/.test(Q)&&!/'/.test(Q))return"'"+Q.replace(/(['])/g,"\$1")+"'";if(/["'\s]/.test(Q))return'"'+Q.replace(/(["\$!])/g,"\\$1")+'"';return String(Q).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^{|}])/g,"$1\$2")}).join(" ")}});var sUA=E((dZ8,aUA)=>{var nUA="(?:"+["\|\|","\&\&",";;","\|\&","\<\(","\<\<\<",">>",">\&","<\&","[&;()|<>]"].join("|")+")",cUA=new RegExp("^"+nUA+"$"),lUA="|&;()<> \t",xyB='"((\\"|[^"])?)"',fyB="'((\\'|[^'])?)'",vyB=/^#$/,pUA="'",iUA='"',My1="$",vy="",byB=4294967296;for(M71=0;M71<4;M71++)vy+=(byBMath.random()).toString(16);var M71,hyB=new RegExp("^"+vy);function gyB(A,B){var Q=B.lastIndex,I=[],D;while(D=B.exec(A))if(I.push(D),B.lastIndex===D.index)B.lastIndex+=1;return B.lastIndex=Q,I}function uyB(A,B,Q){var I=typeof A==="function"?A(Q):A[Q];if(typeof I==="undefined"&&Q!="")I="";else if(typeof I==="undefined")I="$";if(typeof I==="object")return B+vy+JSON.stringify(I)+vy;return B+I}function myB(A,B,Q){if(!Q)Q={};var I=Q.escape||"\",D="(\"+I+['"+lUA+]|[^\\s'"+lUA+"])+",G=new RegExp(["("+nUA+")","("+D+"|"+xyB+"|"+fyB+")+"].join("|"),"g"),Z=gyB(A,G);if(Z.length===0)return[];if(!B)B={};var F=!1;return Z.map(function(Y){var W=Y[0];if(!W||F)return;if(cUA.test(W))return{op:W};var J=!1,X=!1,C="",V=!1,K;function H(){K+=1;var M,L,T=W.charAt(K);if(T==="{"){if(K+=1,W.charAt(K)==="}")throw new Error("Bad substitution: "+W.slice(K-2,K+1));if(M=W.indexOf("}",K),M<0)throw new Error("Bad substitution: "+W.slice(K));L=W.slice(K,M),K=M}else if(/[@#?$!-]/.test(T))L=T,K+=1;else{var R=W.slice(K);if(M=R.match(/[^\w\d]/),!M)L=R,K=W.length;else L=R.slice(0,M.index),K+=M.index-1}return uyB(B,"",L)}for(K=0;K<W.length;K++){var z=W.charAt(K);if(V=V||!J&&(z===""||z==="?"),X)C+=z,X=!1;else if(J)if(z===J)J=!1;else if(J==pUA)C+=z;else if(z===I)if(K+=1,z=W.charAt(K),z===iUA||z===I||z===My1)C+=z;else C+=I+z;else if(z===My1)C+=H();else C+=z;else if(z===iUA||z===pUA)J=z;else if(cUA.test(z))return{op:W};else if(vyB.test(z)){F=!0;var q={comment:A.slice(Y.index+K+1)};if(C.length)return[C,q];return[q]}else if(z===I)X=!0;else if(z===My1)C+=H();else C+=z}if(V)return{op:"glob",pattern:C};return C}).reduce(function(Y,W){return typeof W==="undefined"?Y:Y.concat(W)},[])}aUA.exports=function A(B,Q,I){var D=myB(B,Q,I);if(typeof Q!=="function")return D;return D.reduce(function(G,Z){if(typeof Z==="object")return G.concat(Z);var F=Z.split(RegExp("("+vy+".?"+vy+")","g"));if(F.length===1)return G.concat(F[0]);return G.concat(F.filter(Boolean).map(function(Y){if(hyB.test(Y))return JSON.parse(Y.split(vy)[1]);return Y}))},[])}});var or=E((dyB)=>{dyB.quote=dUA();dyB.parse=sUA()});var VV=E((eUA)=>{Object.defineProperty(eUA,"__esModule",{value:!0});var rUA=Object.prototype.toString;function pyB(A){switch(rUA.call(A)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return R71(A,Error)}}function Dg(A,B){return rUA.call(A)===[object ${B}]}function iyB(A){return Dg(A,"ErrorEvent")}function nyB(A){return Dg(A,"DOMError")}function ayB(A){return Dg(A,"DOMException")}function syB(A){return Dg(A,"String")}function oUA(A){return typeof A==="object"&&A!==null&&"sentry_template_string"in A&&"sentry_template_values"in A}function ryB(A){return A===null||oUA(A)||typeof A!=="object"&&typeof A!=="function"}function tUA(A){return Dg(A,"Object")}function oyB(A){return typeof Event!=="undefined"&&R71(A,Event)}function tyB(A){return typeof Element!=="undefined"&&R71(A,Element)}function eyB(A){return Dg(A,"RegExp")}function AkB(A){return Boolean(A&&A.then&&typeof A.then==="function")}function BkB(A){return tUA(A)&&"nativeEvent"in A&&"preventDefault"in A&&"stopPropagation"in A}function QkB(A){return typeof A==="number"&&A!==A}function R71(A,B){try{return A instanceof B}catch(Q){return!1}}function IkB(A){return!!(typeof A==="object"&&A!==null&&(A.__isVue||A._isVue))}eUA.isDOMError=nyB;eUA.isDOMException=ayB;eUA.isElement=tyB;eUA.isError=pyB;eUA.isErrorEvent=iyB;eUA.isEvent=oyB;eUA.isInstanceOf=R71;eUA.isNaN=QkB;eUA.isParameterizedString=oUA;eUA.isPlainObject=tUA;eUA.isPrimitive=ryB;eUA.isRegExp=eyB;eUA.isString=syB;eUA.isSyntheticEvent=BkB;eUA.isThenable=AkB;eUA.isVueViewModel=IkB});var tr=E((BwA)=>{Object.defineProperty(BwA,"__esModule",{value:!0});var O71=VV();function $kB(A,B=0){if(typeof A!=="string"||B===0)return A;return A.length<=B?A:${A.slice(0,B)}...}function qkB(A,B){let Q=A,I=Q.length;if(I<=150)return Q;if(B>I)B=I;let D=Math.max(B-60,0);if(D<5)D=0;let G=Math.min(D+140,I);if(G>I-5)G=I;if(G===I)D=Math.max(G-140,0);if(Q=Q.slice(D,G),D>0)Q='{snip} ${Q};if(G<I)Q+=" {snip}";return Q}function NkB(A,B){if(!Array.isArray(A))return"";let Q=[];for(let I=0;I<A.length;I++){let D=A[I];try{if(O71.isVueViewModel(D))Q.push("[VueViewModel]");else Q.push(String(D))}catch(G){Q.push("[value cannot be serialized]")}}return Q.join(B)}function AwA(A,B,Q=!1){if(!O71.isString(A))return!1;if(O71.isRegExp(B))return B.test(A);if(O71.isString(B))return Q?A===B:A.includes(B);return!1}function LkB(A,B=[],Q=!1){return B.some((I)=>AwA(A,I,Q))}BwA.isMatchingPattern=AwA;BwA.safeJoin=NkB;BwA.snipLine=qkB;BwA.stringMatchesSomePattern=LkB;BwA.truncate=$kB});var GwA=E((DwA)=>{Object.defineProperty(DwA,"__esModule",{value:!0});var Ry1=VV(),SkB=tr();function jkB(A,B,Q=250,I,D,G,Z){if(!G.exception||!G.exception.values||!Z||!Ry1.isInstanceOf(Z.originalException,Error))return;let F=G.exception.values.length>0?G.exception.values[G.exception.values.length-1]:void 0;if(F)G.exception.values=_kB(Oy1(A,B,D,Z.originalException,I,G.exception.values,F,0),Q)}function Oy1(A,B,Q,I,D,G,Z,F){if(G.length>=Q+1)return G;let Y=[...G];if(Ry1.isInstanceOf(I[D],Error)){QwA(Z,F);let W=A(B,I[D]),J=Y.length;IwA(W,D,J,F),Y=Oy1(A,B,Q,I[D],D,[W,...Y],W,J)}if(Array.isArray(I.errors))I.errors.forEach((W,J)=>{if(Ry1.isInstanceOf(W,Error)){QwA(Z,F);let X=A(B,W),C=Y.length;IwA(X,errors[${J}],C,F),Y=Oy1(A,B,Q,W,D,[X,...Y],X,C)}});return Y}function QwA(A,B){A.mechanism=A.mechanism||{type:"generic",handled:!0},A.mechanism={...A.mechanism,...A.type==="AggregateError"&&{is_exception_group:!0},exception_id:B}}function IwA(A,B,Q,I){A.mechanism=A.mechanism||{type:"generic",handled:!0},A.mechanism={...A.mechanism,type:"chained",source:B,exception_id:Q,parent_id:I}}function _kB(A,B){return A.map((Q)=>{if(Q.value)Q.value=SkB.truncate(Q.value,B);return Q})}DwA.applyAggregateErrorsToEvent=jkB});var wF=E((ZwA)=>{Object.defineProperty(ZwA,"__esModule",{value:!0});function T71(A){return A&&A.Math==Math?A:void 0}var Ty1=typeof globalThis=="object"&&T71(globalThis)||typeof window=="object"&&T71(window)||typeof self=="object"&&T71(self)||typeof global=="object"&&T71(global)||function(){return this}()||{};function kkB(){return Ty1}function xkB(A,B,Q){let I=Q||Ty1,D=I.SENTRY=I.SENTRY||{};return D[A]||(D[A]=B())}ZwA.GLOBAL_OBJ=Ty1;ZwA.getGlobalObject=kkB;ZwA.getGlobalSingleton=xkB});var Py1=E((FwA)=>{Object.defineProperty(FwA,"__esModule",{value:!0});var hkB=VV(),gkB=wF(),Gg=gkB.getGlobalObject(),ukB=80;function mkB(A,B={}){if(!A)return"";try{let Q=A,I=5,D=[],G=0,Z=0,F=" > ",Y=F.length,W,J=Array.isArray(B)?B:B.keyAttrs,X=!Array.isArray(B)&&B.maxStringLength||ukB;while(Q&&G++<I){if(W=dkB(Q,J),W==="html"||G>1&&Z+D.lengthY+W.length>=X)break;D.push(W),Z+=W.length,Q=Q.parentNode}return D.reverse().join(F)}catch(Q){return""}}function dkB(A,B){let Q=A,I=[],D,G,Z,F,Y;if(!Q||!Q.tagName)return"";if(Gg.HTMLElement){if(Q instanceof HTMLElement&&Q.dataset&&Q.dataset.sentryComponent)return Q.dataset.sentryComponent}I.push(Q.tagName.toLowerCase());let W=B&&B.length?B.filter((X)=>Q.getAttribute(X)).map((X)=>[X,Q.getAttribute(X)]):null;if(W&&W.length)W.forEach((X)=>{I.push([${X[0]}="${X[1]}"])});else{if(Q.id)I.push(#${Q.id});if(D=Q.className,D&&hkB.isString(D)){G=D.split(/\s+/);for(Y=0;Y<G.length;Y++)I.push(.${G[Y]})}}let J=["aria-label","type","name","title","alt"];for(Y=0;Y<J.length;Y++)if(Z=J[Y],F=Q.getAttribute(Z),F)I.push([${Z}="${F}"]);return I.join("")}function ckB(){try{return Gg.document.location.href}catch(A){return""}}function lkB(A){if(Gg.document&&Gg.document.querySelector)return Gg.document.querySelector(A);return null}function pkB(A){if(!Gg.HTMLElement)return null;let B=A,Q=5;for(let I=0;I<Q;I++){if(!B)return null;if(B instanceof HTMLElement&&B.dataset.sentryComponent)return B.dataset.sentryComponent;B=B.parentNode}return null}FwA.getComponentName=pkB;FwA.getDomElement=lkB;FwA.getLocationHref=ckB;FwA.htmlTreeAsString=mkB});var mU=E((YwA)=>{Object.defineProperty(YwA,"__esModule",{value:!0});var rkB=typeof SENTRY_DEBUG==="undefined"||SENTRY_DEBUG;YwA.DEBUG_BUILD=rkB});var sE=E((JwA)=>{Object.defineProperty(JwA,"__esModule",{value:!0});var tkB=mU(),Sy1=wF(),ekB="Sentry Logger ",jy1=["debug","info","warn","error","log","assert","trace"],_y1={};function WwA(A){if(!("console"in Sy1.GLOBAL_OBJ))return A();let B=Sy1.GLOBAL_OBJ.console,Q={},I=Object.keys(_y1);I.forEach((D)=>{let G=_y1[D];Q[D]=B[D],B[D]=G});try{return A()}finally{I.forEach((D)=>{B[D]=Q[D]})}}function AxB(){let A=!1,B={enable:()=>{A=!0},disable:()=>{A=!1},isEnabled:()=>A};if(tkB.DEBUG_BUILD)jy1.forEach((Q)=>{B[Q]=(...I)=>{if(A)WwA(()=>{Sy1.GLOBAL_OBJ.consoleQ})}});else jy1.forEach((Q)=>{B[Q]=()=>{return}});return B}var BxB=AxB();JwA.CONSOLE_LEVELS=jy1;JwA.consoleSandbox=WwA;JwA.logger=BxB;JwA.originalConsoleMethods=_y1});var yy1=E((VwA)=>{Object.defineProperty(VwA,"__esModule",{value:!0});var ZxB=mU(),er=sE(),FxB=/^(?:(\w+):)//(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?/(.+)/;function YxB(A){return A==="http"||A==="https"}function WxB(A,B=!1){let{host:Q,path:I,pass:D,port:G,projectId:Z,protocol:F,publicKey:Y}=A;return${F}://${Y}${B&&D?:${D}:""}@${Q}${G?:${G}:""}/${I?${I}/:I}${Z}}function XwA(A){let B=FxB.exec(A);if(!B){er.consoleSandbox(()=>{console.error(Invalid Sentry Dsn: ${A})});return}let[Q,I,D="",G,Z="",F]=B.slice(1),Y="",W=F,J=W.split("/");if(J.length>1)Y=J.slice(0,-1).join("/"),W=J.pop();if(W){let X=W.match(/^\d+/);if(X)W=X[0]}return CwA({host:G,pass:D,path:Y,projectId:W,port:Z,protocol:Q,publicKey:I})}function CwA(A){return{protocol:A.protocol,publicKey:A.publicKey||"",pass:A.pass||"",host:A.host,port:A.port||"",path:A.path||"",projectId:A.projectId}}function JxB(A){if(!ZxB.DEBUG_BUILD)return!0;let{port:B,projectId:Q,protocol:I}=A;if(["protocol","publicKey","host","projectId"].find((Z)=>{if(!A[Z])return er.logger.error(Invalid Sentry Dsn: ${Z} missing),!0;return!1}))return!1;if(!Q.match(/^\d+$/))return er.logger.error(Invalid Sentry Dsn: Invalid projectId ${Q}),!1;if(!YxB(I))return er.logger.error(Invalid Sentry Dsn: Invalid protocol ${I}),!1;if(B&&isNaN(parseInt(B,10)))return er.logger.error(Invalid Sentry Dsn: Invalid port ${B}),!1;return!0}function XxB(A){let B=typeof A==="string"?XwA(A):CwA(A);if(!B||!JxB(B))return;return B}VwA.dsnFromString=XwA;VwA.dsnToString=WxB;VwA.makeDsn=XxB});var ky1=E((EwA)=>{Object.defineProperty(EwA,"__esModule",{value:!0});class KwA extends Error{constructor(A,B="warn"){super(A);this.message=A,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=B}}EwA.SentryError=KwA});var KV=E((NwA)=>{Object.defineProperty(NwA,"__esModule",{value:!0});var HxB=Py1(),zxB=mU(),Zg=VV(),UxB=sE(),HwA=tr();function wxB(A,B,Q){if(!(B in A))return;let I=A[B],D=Q(I);if(typeof D==="function")$wA(D,I);A[B]=D}function wwA(A,B,Q){try{Object.defineProperty(A,B,{value:Q,writable:!0,configurable:!0})}catch(I){zxB.DEBUG_BUILD&&UxB.logger.log(Failed to add non-enumerable property "${B}" to object,A)}}function $wA(A,B){try{let Q=B.prototype||{};A.prototype=B.prototype=Q,wwA(A,"sentry_original",B)}catch(Q){}}function $xB(A){return A.sentry_original}function qxB(A){return Object.keys(A).map((B)=>${encodeURIComponent(B)}=${encodeURIComponent(A[B])}).join("&")}function qwA(A){if(Zg.isError(A))return{message:A.message,name:A.name,stack:A.stack,...UwA(A)};else if(Zg.isEvent(A)){let B={type:A.type,target:zwA(A.target),currentTarget:zwA(A.currentTarget),...UwA(A)};if(typeof CustomEvent!=="undefined"&&Zg.isInstanceOf(A,CustomEvent))B.detail=A.detail;return B}else return A}function zwA(A){try{return Zg.isElement(A)?HxB.htmlTreeAsString(A):Object.prototype.toString.call(A)}catch(B){return""}}function UwA(A){if(typeof A==="object"&&A!==null){let B={};for(let Q in A)if(Object.prototype.hasOwnProperty.call(A,Q))B[Q]=A[Q];return B}else return{}}function NxB(A,B=40){let Q=Object.keys(qwA(A));if(Q.sort(),!Q.length)return"[object has no keys]";if(Q[0].length>=B)return HwA.truncate(Q[0],B);for(let I=Q.length;I>0;I--){let D=Q.slice(0,I).join(", ");if(D.length>B)continue;if(I===Q.length)return D;return HwA.truncate(D,B)}return""}function LxB(A){return xy1(A,new Map)}function xy1(A,B){if(MxB(A)){let Q=B.get(A);if(Q!==void 0)return Q;let I={};B.set(A,I);for(let D of Object.keys(A))if(typeof A[D]!=="undefined")I[D]=xy1(A[D],B);return I}if(Array.isArray(A)){let Q=B.get(A);if(Q!==void 0)return Q;let I=[];return B.set(A,I),A.forEach((D)=>{I.push(xy1(D,B))}),I}return A}function MxB(A){if(!Zg.isPlainObject(A))return!1;try{let B=Object.getPrototypeOf(A).constructor.name;return!B||B==="Object"}catch(B){return!0}}function RxB(A){let B;switch(!0){case(A===void 0||A===null):B=new String(A);break;case(typeof A==="symbol"||typeof A==="bigint"):B=Object(A);break;case Zg.isPrimitive(A):B=new A.constructor(A);break;default:B=A;break}return B}NwA.addNonEnumerableProperty=wwA;NwA.convertToPlainObject=qwA;NwA.dropUndefinedKeys=LxB;NwA.extractExceptionKeysForMessage=NxB;NwA.fill=wxB;NwA.getOriginalFunction=$xB;NwA.markFunctionWrapped=$wA;NwA.objectify=RxB;NwA.urlEncode=qxB});var P71=E((MwA)=>{Object.defineProperty(MwA,"__esModule",{value:!0});function LwA(A,B=!1){return!(B||A&&!A.startsWith("/")&&!A.match(/^[A-Z]:/)&&!A.startsWith(".")&&!A.match(/^a-zA-Z:///))&&A!==void 0&&!A.includes("node_modules/")}function fxB(A){let B=/^\s*[-]{4,}$/,Q=/at (?:async )?(?:(.+?)\s+()?(?:(.+):(\d+):(\d+)?|([^)]+)))?/;return(I)=>{let D=I.match(Q);if(D){let G,Z,F,Y,W;if(D[1]){F=D[1];let C=F.lastIndexOf(".");if(F[C-1]===".")C--;if(C>0){G=F.slice(0,C),Z=F.slice(C+1);let V=G.indexOf(".Module");if(V>0)F=F.slice(V+1),G=G.slice(0,V)}Y=void 0}if(Z)Y=G,W=Z;if(Z==="")W=void 0,F=void 0;if(F===void 0)W=W||"",F=Y?${Y}.${W}:W;let J=D[2]&&D[2].startsWith("file://")?D[2].slice(7):D[2],X=D[5]==="native";if(J&&J.match(//[A-Z]:/))J=J.slice(1);if(!J&&D[5]&&!X)J=D[5];return{filename:J,module:A?A(J):void 0,function:F,lineno:parseInt(D[3],10)||void 0,colno:parseInt(D[4],10)||void 0,in_app:LwA(J,X)}}if(I.match(B))return{filename:I};return}}MwA.filenameIsInApp=LwA;MwA.node=fxB});var S71=E((_wA)=>{Object.defineProperty(_wA,"__esModule",{value:!0});var TwA=P71(),PwA=50,RwA=/(error: (.*))/,OwA=/captureMessage|captureException/;function SwA(...A){let B=A.sort((Q,I)=>Q[0]-I[0]).map((Q)=>Q[1]);return(Q,I=0)=>{let D=[],G=Q.split(`

Error: Bad substitution: lit.getText at H (file:///Users/eduardomenoncello/node_modules/@anthropic-ai/claude-code/cli.js:7:2204) at file:///Users/eduardomenoncello/node_modules/@anthropic-ai/claude-code/cli.js:7:2863 at Array.map () at myB (file:///Users/eduardomenoncello/node_modules/@anthropic-ai/claude-code/cli.js:7:1942) at Object.A (file:///Users/eduardomenoncello/node_modules/@anthropic-ai/claude-code/cli.js:7:3027) at mXA (file:///Users/eduardomenoncello/node_modules/@anthropic-ai/claude-code/cli.js:2088:2929) at qb (file:///Users/eduardomenoncello/node_modules/@anthropic-ai/claude-code/cli.js:2094:77) at Object.isReadOnly (file:///Users/eduardomenoncello/node_modules/@anthropic-ai/claude-code/cli.js:2168:4260) at Object.isConcurrencySafe (file:///Users/eduardomenoncello/node_modules/@anthropic-ai/claude-code/cli.js:2168:4176) at file:///Users/eduardomenoncello/node_modules/@anthropic-ai/claude-code/cli.js:2293:5294

Node.js v22.14.0

menoncello avatar Jul 21 '25 11:07 menoncello

Same

file:///Users/overtime/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:712
`),I.add(A.uuid)}}async getAllTranscripts(){await this.loadAllSessions();let A=[...this.messages.values()],B=new Set(A.map((Q)=>Q.parentUuid));return A.filter((Q)=>!B.has(Q.uuid)).map((Q)=>this.getTranscript(Q)).filter((Q)=>Q.length)}getTranscript(A){let B=[],Q=A;while(Q)B.unshift(Q),Q=Q.parentUuid?this.messages.get(Q.parentUuid):void 0;return B}async getLastLog(A){let{messages:B}=await t9A(A);if(B.size===0)return null;let I=Array.from(B.values()).sort((Z,F)=>new Date(F.timestamp).getTime()-new Date(Z.timestamp).getTime())[0];if(!I)return null;let D=[],G=I;while(G)D.unshift(G),G=G.parentUuid?B.get(G.parentUuid):void 0;return D}getAllCheckpoints(A){let B=new Map,Q=A[A.length-1]?.sessionId;if(Q){let I=this.checkpoints.get(Q)?.values()||[];for(let D of I)B.set(D.commit,D)}return Array.from(B.values())}loadAllSessions=N0(async()=>{let A=cp(EB1),B=h1();if(this.didLoad)return this;try{B.statSync(A)}catch{return this}let I=B.readdirSync(A).filter((G)=>G.isFile()&&G.name.endsWith(".jsonl")).map((G)=>lp(A,G.name)),D=await Promise.all(I.sort((G,Z)=>{let F=B.statSync(G),Y=B.statSync(Z);return F.mtime.getTime()-Y.mtime.getTime()}).map(async(G)=>{let Z=CC(vT4(G,".jsonl"));if(!Z)return{sessionId:Z,sessionMessages:new Set};let F=new Map,Y=new Map,W=new Map;try{await B.stat(G);for(let J of await id1(G))if(J.type==="user"||J.type==="assistant"||J.type==="attachment"||J.type==="system")F.set(J.uuid,J);else if(J.type==="summary"&&J.leafUuid)Y.set(J.leafUuid,J.summary);else if(J.type==="checkpoint")W.set(J.commit,J)}catch{}return{sessionId:Z,sessionMessages:F,summaries:Y,checkpoints:W}}));for(let{sessionId:G,sessionMessages:Z,summaries:F,checkpoints:Y}of D){if(!G)continue;for(let[W,J]of Z.entries())this.messages.set(W,J);for(let[W,J]of F.entries())this.summaries.set(W,J);this.checkpoints.set(G,Array.from(Y.values()))}return this.didLoad=!0,this})}async function Rw1(A){let B=pJ2(A);return await CM().insertMessageChain(B),B[B.length-1]?.uuid||null}async function Ow1(A){await CM().insertMessageChain(pJ2(A),!0)}async function r9A(A){await CM().insertCheckpoint(A)}async function uJ2(){let A=CM();A.sessionFile=Mw1()}function hT4(A){let B=A.find((D)=>D.type==="user");if(!B||B.type!=="user")return"No prompt";let Q=B.message?.content,I="";if(typeof Q==="string")I=Q;else if(Array.isArray(Q))I=Q.find((G)=>G.type==="text")?.text||"No prompt";else I="No prompt";if(I=I.replace(/\n/g," ").trim(),I.length>45)I=I.slice(0,45)+"...";return I}function gT4(A){return A.map((B)=>{let{isSidechain:Q,parentUuid:I,...D}=B;return D})}function mJ2(A,B=0,Q,I){let D=A[A.length-1],G=A[0],Z=hT4(A),F=new Date(G.timestamp),Y=new Date(D.timestamp),W=I?.map((J)=>({commit:J.commit,timestamp:new Date(J.timestamp),label:J.label}));return{date:D.timestamp,messages:gT4(A),fullPath:"n/a",value:B,created:F,modified:Y,firstPrompt:Z,messageCount:A.length,isSidechain:G.isSidechain,leafUuid:D.uuid,summary:Q,checkpoints:W,gitBranch:D.gitBranch}}async function dJ2(){let A=await CM().getAllTranscripts(),B=CM().summaries;return A.map((Q,I)=>{let D=Q[Q.length-1],G=D?B.get(D.uuid):void 0,Z=D?CM().getAllCheckpoints(Q):void 0;return mJ2(Q,I,G,Z)}).sort((Q,I)=>{return I.modified.getTime()-Q.modified.getTime()})}async function cJ2(A,B){await CM().appendEntry({type:"summary",summary:B,leafUuid:A})}async function o9A(A){let B=new Map,Q=new Map,I=new Map;try{let D=await id1(A);for(let G of D)if(G.type==="user"||G.type==="assistant"||G.type==="attachment"||G.type==="system")B.set(G.uuid,G);else if(G.type==="summary"&&G.leafUuid)Q.set(G.leafUuid,G.summary);else if(G.type==="checkpoint")I.set(G.commit,G)}catch{}return{messages:B,summaries:Q,checkpoints:I}}async function t9A(A){let B=lp(cp(cA()),`${A}.jsonl`);return o9A(B)}var uT4=N0(async(A)=>{let{messages:B,checkpoints:Q}=await t9A(A);return{messageSet:new Set(B.keys()),checkpointSet:new Set(Q.keys())}},(A)=>A);async function lJ2(A){let B=await CM().getLastLog(A);if(B!==null&&B!==void 0){let Q=B[B.length-1],{summaries:I,checkpoints:D}=await t9A(A),G=Q?I.get(Q.uuid):void 0;return mJ2(B,0,G,Array.from(D.values()))}return null}function pJ2(A){return A.filter((B)=>{if(B.type==="progress")return!1;if(B.type==="attachment"&&hJ2()!=="ant")return!1;return!0})}var Tw1=[],dT4=100;function cT4(A){return A.toISOString().replace(/[:.]/g,"-")}var BQA=cT4(new Date);function lT4(){return AQA(jw.errors(),BQA+".txt")}var e9A=!1;function v1(A){if(e9A)return;e9A=!0;try{if(process.env.CLAUDE_CODE_USE_BEDROCK||process.env.CLAUDE_CODE_USE_VERTEX||process.env.DISABLE_ERROR_REPORTING||process.env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC)return;if(_4(!1))console.error(A);let B=A.stack||A.message,Q={error:B,timestamp:new Date().toISOString()};if(Tw1.length>=dT4)Tw1.shift();Tw1.push(Q),pT4(lT4(),{error:B})}catch{}finally{e9A=!1}Lw1(A)}function iJ2(){return[...Tw1]}function QQA(A){if(!h1().existsSync(A))return[];try{return JSON.parse(h1().readFileSync(A,{encoding:"utf8"}))}catch{return[]}}function pT4(A,B){return}async function pp(){let A=await dJ2();return iT4(A.filter((B)=>B.messages.length)).map((B,Q)=>({...B,value:Q}))}async function nJ2(A){return await lJ2(A)}async function aJ2(A){return(await pp())[A]||null}function iT4(A){return A.sort((B,Q)=>{let I=Q.modified.getTime()-B.modified.getTime();if(I!==0)return I;let D=Q.created.getTime()-B.created.getTime();if(D!==0)return D;return B.created.getTime()-Q.created.getTime()})}function dD(A,B){if(X9(FA.red(`MCP server "${A}" ${B}`)),(RQ()||{}).cleanupPeriodDays===0)return;try{let I=jw.mcpLogs(A),D=B instanceof Error?B.stack||B.message:String(B),G=new Date().toISOString(),Z=AQA(I,BQA+".txt");if(!h1().existsSync(I))h1().mkdirSync(I);if(!h1().existsSync(Z))h1().writeFileSync(Z,"[]",{encoding:"utf8",flush:!1});let F={error:D,timestamp:G,sessionId:OB(),cwd:h1().cwd()},Y=QQA(Z);Y.push(F),h1().writeFileSync(Z,JSON.stringify(Y,null,2),{encoding:"utf8",flush:!1})}catch{}}function S2(A,B){SA(`MCP server "${A}": ${B}`);try{let Q=jw.mcpLogs(A),I=new Date().toISOString(),D=AQA(Q,BQA+".txt");if(!h1().existsSync(Q))h1().mkdirSync(Q);if(!h1().existsSync(D))h1().writeFileSync(D,"[]",{encoding:"utf8",flush:!1});let G={debug:B,timestamp:I,sessionId:OB(),cwd:h1().cwd()},Z=QQA(D);Z.push(G),h1().writeFileSync(D,JSON.stringify(Z,null,2),{encoding:"utf8",flush:!1})}catch{}}import*as jw1 from"node:os";import{PassThrough as aT4}from"stream";function VM(A){if(A<60000){let D=(A/1000).toFixed(1);return`${D.endsWith(".0")?D.slice(0,-2):D}s`}let B=Math.floor(A/3600000),Q=Math.floor(A%3600000/60000),I=(A%60000/1000).toFixed(1);if(B>0)return`${B}h ${Q}m ${I}s`;if(Q>0)return`${Q}m ${I}s`;return`${I}s`}function YD(A){let B=A>=1000;return new Intl.NumberFormat("en",{notation:"compact",minimumFractionDigits:B?1:0,maximumFractionDigits:1}).format(A).toLowerCase()}function sJ2(A,B={}){let{style:Q="narrow",numeric:I="always",now:D=new Date}=B,G=A.getTime()-D.getTime(),Z=Math.trunc(G/1000),F=[{unit:"year",seconds:31536000,shortUnit:"y"},{unit:"month",seconds:2592000,shortUnit:"mo"},{unit:"week",seconds:604800,shortUnit:"w"},{unit:"day",seconds:86400,shortUnit:"d"},{unit:"hour",seconds:3600,shortUnit:"h"},{unit:"minute",seconds:60,shortUnit:"m"},{unit:"second",seconds:1,shortUnit:"s"}];for(let{unit:W,seconds:J,shortUnit:X}of F)if(Math.abs(Z)>=J){let C=Math.trunc(Z/J);if(Q==="narrow"&&J<86400)return Z<0?`${Math.abs(C)}${X} ago`:`in ${C}${X}`;return new Intl.RelativeTimeFormat("en",{style:"long",numeric:I}).format(C,W)}if(Q==="narrow")return Z<=0?"0s ago":"in 0s";return new Intl.RelativeTimeFormat("en",{style:Q,numeric:I}).format(0,"second")}function IQA(A,B={}){let{now:Q=new Date,...I}=B;if(A>Q)return sJ2(A,{...I,now:Q});return sJ2(A,{...I,numeric:"always",now:Q})}function ip(A,B=!1){if(!A)return;let Q=new Date(A*1000),I=Q.getMinutes(),D=Q.toLocaleTimeString("en-US",{hour:"numeric",minute:I===0?void 0:"2-digit",hour12:!0}),G=Intl.DateTimeFormat().resolvedOptions().timeZone;return D.replace(/ ([AP]M)/i,(Z,F)=>F.toLowerCase())+(B?` (${G})`:"")}var GX2=F1(BX2(),1);class GQA{capacity;buffer;head=0;size=0;constructor(A){this.capacity=A;this.buffer=new Array(A)}add(A){if(this.buffer[this.head]=A,this.head=(this.head+1)%this.capacity,this.size<this.capacity)this.size++}addAll(A){for(let B of A)this.add(B)}getRecent(A){let B=[],Q=this.size<this.capacity?0:this.head,I=Math.min(A,this.size);for(let D=0;D<I;D++){let G=(Q+this.size-I+D)%this.capacity;B.push(this.buffer[G])}return B}toArray(){if(this.size===0)return[];let A=[],B=this.size<this.capacity?0:this.head;for(let Q=0;Q<this.size;Q++){let I=(B+Q)%this.capacity;A.push(this.buffer[I])}return A}clear(){this.head=0,this.size=0}length(){return this.size}}var QX2=137,IX2=143;function DX2(A){let B=null,Q="";A.on("data",(D)=>{if(B)B.write(D);else Q+=D});let I=()=>Q;return{get:I,asStream(){return B=new aT4({highWaterMark:10485760}),B.write(I()),Q="",B}}}function ZX2(A,B,Q,I){let D="running",G,Z=DX2(A.stdout),F=DX2(A.stderr);if(I){let C=new GQA(10),V=0,K=(H)=>{let q=H.toString().split(`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

RangeError: Invalid string length
    at Socket.<anonymous> (file:///Users/overtime/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:712:8701)
    at Socket.emit (node:events:519:35)
    at Socket.emit (node:domain:489:12)
    at addChunk (node:internal/streams/readable:559:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
    at Readable.push (node:internal/streams/readable:390:5)
    at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)

Node.js v24.2.0

overtimepog avatar Jul 22 '25 00:07 overtimepog

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/1470
  2. https://github.com/anthropics/claude-code/issues/4102
  3. https://github.com/anthropics/claude-code/issues/2565

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

github-actions[bot] avatar Aug 15 '25 21:08 github-actions[bot]

This issue has been automatically closed as a duplicate of #1470.

If this is incorrect, please re-open this issue or create a new one.

🤖 Generated with Claude Code

github-actions[bot] avatar Aug 19 '25 09:08 github-actions[bot]

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Aug 27 '25 14:08 github-actions[bot]