[BUG] --resume crashes with "undefined is not an object (evaluating '_.startsWith')" when filePath is undefined in tool result

Resolved 💬 3 comments Opened Apr 2, 2026 by jbasalone Closed Apr 9, 2026

Preflight Checklist

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

What's Wrong?

undefined is not an object (evaluating '_.startsWith') at kF7 (the diff renderer for file edit results)

Root cause: The filePath property is undefined in a stored tool result, and the renderer doesn't null-check before calling .startsWith()

*note this not the latest release but the stable brew release.

✗ ➭ brew info claude-code
==> claude-code ✔: 2.1.81
https://www.anthropic.com/claude-code
Installed
/opt/homebrew/Caskroom/claude-code/2.1.81 (193.3MB)
Installed using the formulae.brew.sh API on 2025-12-17 at 08:41:28
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/c/claude-code.rb
==> Name
Claude Code
==> Description
Terminal-based AI coding assistant
==> Artifacts
claude (Binary)

==> Downloading https://formulae.brew.sh/api/cask/claude-code.json
==> Analytics
install: 177,103 (30 days), 433,346 (90 days), 641,494 (365 days)

What Should Happen?

claude should resume a session with claude --resume

Error Messages/Logs

{11:07}~ ➭ CLAUDE_CODE_SYNTAX_HIGHLIGHT=0 claude --resume 6bf926a2-0707-4376-ab20-e1085b1315cb

  ERROR  undefined is not an object (evaluating '_.startsWith')

 /$bunfs/root/src/entrypoints/cli.js:3142:1937

 3139 `).forEach((B,m)=>{if(!B)return;if(m>0||Z+Xq(B)>k){if(G.length>0)M.push({content:[...G],contentWidth:Z}),G=[],Z=0}G.push(rz.createElement(h,{key:`part-${y}-${m}`,backgroundCo
 :   lor:E},B)),Z+=Xq(B)})}),G.length>0)M.push({content:G,contentWidth:Z});return M.map(({content:N,contentWidth:y},L)=>{let
     E=`${$}-${O}-${L}`,u=$==="add"?K?"diffAddedDimmed":"diffAdded":K?"diffRemovedDimmed":"diffRemoved",x=L===0?O:void 0,B=(x!==void 0?x.toString().padStart(q):" ".repeat(q))+"
     ",m=B.length+W+y,S=Math.max(0,T-m);return rz.createElement(p,{key:E,flexDirection:"row"},rz.createElement(CD,{fromLeftEdge:!0},rz.createElement(h,{color:R?"text":void
     0,backgroundColor:u,dimColor:K},B,J)),rz.createElement(h,{color:R?"text":void 0,backgroundColor:u,dimColor:K},N," ".repeat(S)))})}function sGR(_,T,q,K,R){let
     $=Math.max(1,Math.floor(q)),O=nGR(_),A=rGR(O),H=tGR(A,T),j=Math.max(...H.map(({i:w})=>w),0),z=Math.max(j.toString().length+1,0);return
     H.flatMap((w)=>{let{type:f,code:Y,i:D,wordDiff:P,matchedLine:J}=w;if(P&&J){let Z=oGR(w,$,z,K,R);if(Z!==null)return Z}let W=2,k=Math.max(1,$-z-1-W);return
     fv(Y,k,"wrap").split(`
 3140 `).map((Z,N)=>{let y=`${f}-${D}-${N}`,L=N===0?D:void 0,E=(L!==void 0?L.toString().padStart(z):" ".repeat(z))+" ",u=f==="add"?"+":f==="remove"?"-":"
 :   ",x=E.length+1+Xq(Z),B=Math.max(0,$-x),m=f==="add"?K?"diffAddedDimmed":"diffAdded":f==="remove"?K?"diffRemovedDimmed":"diffRemoved":void 0;return
     rz.createElement(p,{key:y,flexDirection:"row"},rz.createElement(CD,{fromLeftEdge:!0},rz.createElement(h,{color:R?"text":void
     0,backgroundColor:m,dimColor:K||f==="nochange"},E,u)),rz.createElement(h,{color:R?"text":void 0,backgroundColor:m,dimColor:K},Z," ".repeat(B)))})})}function tGR(_,T){let
     q=T,K=[],R=[..._];while(R.length>0){let $=R.shift(),{code:O,type:A,originalCode:H,wordDiff:j,matchedLine:z}=$,w={code:O,type:A,i:q,originalCode:H,wordDiff:j,matchedLine:z};swi
     tch(A){case"nochange":q++,K.push(w);break;case"add":q++,K.push(w);break;case"remove":{K.push(w);let f=0;while(R[0]?.type==="remove"){q++;let
     Y=R.shift(),{code:D,type:P,originalCode:J,wordDiff:W,matchedLine:k}=Y,M={code:D,type:P,i:q,originalCode:J,wordDiff:W,matchedLine:k};K.push(M),f++}q-=f;break}}}return K}var
     aU7,rz,lGR=0.4;var sU7=X(()=>{U_();Ck_();eK();aU7=I(a_(),1),rz=I(P_(),1)});function eU7(){if(tU7)return abT;tU7=!0;try{abT=Q88()}catch{abT=null}return abT}var
     abT=null,tU7=!1;function Lcq(){if(oA(process.env.CLAUDE_CODE_SYNTAX_HIGHLIGHT))return"env";if(!DA())return"build";return null}function
     obT(){if(_F7)return;if(_F7=!0,Lcq()!==null)return;let _=eU7();if(_)TF7=_.ColorDiff,qF7=_.ColorFile,KF7=_.getSyntaxTheme}async function n1_(){obT()}function RF7(){return
     obT(),TF7}function $F7(){return obT(),qF7}function OF7(_){return obT(),KF7?.(_)??null}function Ccq(_){return
     _.some((T)=>T.type==="assistant"&&T.message.content.some((q)=>q.type==="tool_use"&&eGR.has(q.name??"")))}var TF7=null,qF7=null,KF7=null,_F7=!1,eGR;var
     r1_=X(()=>{nT();vz();eGR=new Set([L7,h4,QP])});function _hR(_){return Math.max(_.oldStart+_.oldLines-1,_.newStart+_.newLines-1,1).toString().length+3}function
     ThR(_,T,q,K,R,$,O,A){let H=RF7();if(!H)return null;let j=A?_hR(_):0,z=j>0&&j<$?j:0,w=`${R}|${$}|${O?1:0}|${z}|${T??""}|${q}`,f=AF7.get(_),Y=f?.get(w);if(Y)return Y;let D=new
     H(_,T,q,K).render(R,$,O);if(D===null)return null;let P=null,J=null;if(z>0)P=D.map((k)=>K0(k,0,z)),J=D.map((k)=>K0(k,z));let
     W={lines:D,gutterWidth:z,gutters:P,contents:J};if(!f)f=new Map,AF7.set(_,f);return f.set(w,W),W}var HF7,yW,jF7,AF7,wZ;var
     Yq_=X(()=>{U_();j2_();sU7();r1_();Yx();oC();HF7=I(a_(),1),yW=I(P_(),1),jF7=I(P_(),1),AF7=new WeakMap;wZ=jF7.memo(function(T){let
     q=HF7.c(26),{patch:K,dim:R,filePath:$,firstLine:O,fileContent:A,width:H,skipHighlighting:j}=T,z=j===void
     0?!1:j,[w]=D6(),Y=mw().syntaxHighlightingDisabled??!1,D=Math.max(1,Math.floor(H)),P=!1,J;if(q[0]!==R||q[1]!==A||q[2]!==$||q[3]!==O||q[4]!==K||q[5]!==D||q[6]!==z||q[7]!==Y||q[8
     ]!==w)J=z||Y?null:ThR(K,O,$,A??null,w,D,R,!1),q[0]=R,q[1]=A,q[2]=$,q[3]=O,q[4]=K,q[5]=D,q[6]=z,q[7]=Y,q[8]=w,q[9]=J;else J=q[9];let W=J;if(!W){let
     y;if(q[10]!==R||q[11]!==K||q[12]!==H)y=yW.createElement(p,null,yW.createElement(oU7,{patch:K,dim:R,width:H})),q[10]=R,q[11]=K,q[12]=H,q[13]=y;else y=q[13];return
     y}let{lines:k,gutterWidth:M,gutters:G,contents:Z}=W;if(M>0&&G&&Z){let
     y;if(q[14]!==M||q[15]!==G)y=yW.createElement(CD,{fromLeftEdge:!0},yW.createElement(N2_,{lines:G,width:M})),q[14]=M,q[15]=G,q[16]=y;else y=q[16];let
     L=D-M,E;if(q[17]!==Z||q[18]!==L)E=yW.createElement(N2_,{lines:Z,width:L}),q[17]=Z,q[18]=L,q[19]=E;else E=q[19];let
     u;if(q[20]!==y||q[21]!==E)u=yW.createElement(p,{flexDirection:"row"},y,E),q[20]=y,q[21]=E,q[22]=u;else u=q[22];return u}let
     N;if(q[23]!==k||q[24]!==D)N=yW.createElement(p,null,yW.createElement(N2_,{lines:k,width:D})),q[23]=k,q[24]=D,q[25]=N;else N=q[25];return N})});function sbT(_){let
     T=zF7.c(27),{filePath:q,structuredPatch:K,firstLine:R,fileContent:$,style:O,verbose:A,previewHint:H}=_,{columns:j}=R8(),z=K.reduce($hR,0),w=K.reduce(KhR,0),f;if(T[0]!==z)f=z>0
     ?KA.createElement(KA.Fragment,null,"Added ",KA.createElement(h,{bold:!0},z)," ",z>1?"lines":"line"):null,T[0]=z,T[1]=f;else f=T[1];let Y=z>0&&w>0?",
     ":null,D;if(T[2]!==z||T[3]!==w)D=w>0?KA.createElement(KA.Fragment,null,z===0?"R":"r","emoved ",KA.createElement(h,{bold:!0},w),"
     ",w>1?"lines":"line"):null,T[2]=z,T[3]=w,T[4]=D;else D=T[4];let P;if(T[5]!==f||T[6]!==Y||T[7]!==D)P=KA.createElement(h,null,f,Y,D),T[5]=f,T[6]=Y,T[7]=D,T[8]=P;else P=T[8];let
     J=P;if(H){if(O!=="condensed"&&!A){let G;if(T[9]!==H)G=KA.createElement(Kq,null,KA.createElement(h,{dimColor:!0},H)),T[9]=H,T[10]=G;else G=T[10];return G}}else
     if(O==="condensed"&&!A)return J;let W;if(T[11]!==J)W=KA.createElement(h,null,J),T[11]=J,T[12]=W;else W=T[12];let
     k;if(T[13]!==j||T[14]!==$||T[15]!==q||T[16]!==R||T[17]!==K){let G;if(T[19]!==j||T[20]!==$||T[21]!==q||T[22]!==R)G=(Z)=>KA.createElement(p,{flexDirection:"column",key:Z.newStar
     t},KA.createElement(wZ,{patch:Z,dim:!1,width:j-12,filePath:q,firstLine:R,fileContent:$})),T[19]=j,T[20]=$,T[21]=q,T[22]=R,T[23]=G;else
     G=T[23];k=RS(K.map(G),qhR),T[13]=j,T[14]=$,T[15]=q,T[16]=R,T[17]=K,T[18]=k}else k=T[18];let
     M;if(T[24]!==W||T[25]!==k)M=KA.createElement(Kq,null,KA.createElement(p,{flexDirection:"column"},W,k)),T[24]=W,T[25]=k,T[26]=M;else M=T[26];return M}function qhR(_){return
     KA.createElement(CD,{fromLeftEdge:!0,key:`ellipsis-${_}`},KA.createElement(h,{dimColor:!0},"..."))}function KhR(_,T){return _+T.lines.filter(RhR).length}function RhR(_){return
      _.startsWith("-")}function $hR(_,T){return _+T.lines.filter(OhR).length}function OhR(_){return _.startsWith("+")}var zF7,KA;var
     Scq=X(()=>{U_();Yq_();M9();s9();zF7=I(a_(),1),KA=I(P_(),1)});function fF7(_){let T=Ecq.c(20),{code:q,filePath:K,dim:R,skipColoring:$}=_,O=R===void 0?!1:R,A=$===void
     0?!1:$,H;if(T[0]!==q)H=Qc(q),T[0]=q,T[1]=H;else H=T[1];let j=H;if(A){let J;if(T[2]!==j)J=Dq_.default.createElement(J4,null,j),T[2]=j,T[3]=J;else J=T[3];let
     W;if(T[4]!==O||T[5]!==J)W=Dq_.default.createElement(h,{dimColor:O},J),T[4]=O,T[5]=J,T[6]=W;else W=T[6];return W}let z;if(T[7]!==K)z=wF7.extname(K).slice(1),T[7]=K,T[8]=z;else
     z=T[8];let w=z,f;if(T[9]!==j)f=Dq_.default.createElement(J4,null,j),T[9]=j,T[10]=f;else f=T[10];let
     Y;if(T[11]!==j||T[12]!==w)Y=Dq_.default.createElement(AhR,{codeWithSpaces:j,language:w}),T[11]=j,T[12]=w,T[13]=Y;else Y=T[13];let
     D;if(T[14]!==f||T[15]!==Y)D=Dq_.default.createElement(tbT.Suspense,{fallback:f},Y),T[14]=f,T[15]=Y,T[16]=D;else D=T[16];let
     P;if(T[17]!==O||T[18]!==D)P=Dq_.default.createElement(h,{dimColor:O},D),T[17]=O,T[18]=D,T[19]=P;else P=T[19];return P}function AhR(_){let
     T=Ecq.c(10),{codeWithSpaces:q,language:K}=_,R;if(T[0]===Symbol.for("react.memo_cache_sentinel"))R=tQ(),T[0]=R;else R=T[0];let
     $=tbT.use(R),O;if(T[1]!==q||T[2]!==$||T[3]!==K){_:{if(!$){O=q;break _}let j="markdown";if(K)if($.supportsLanguage(K))j=K;else v(`Language not supported while highlighting
     code, falling back to markdown: ${K}`);try{O=$.highlight(q,{language:j})}catch(z){let w=z;if(w instanceof Error&&w.message.includes("Unknown language")){v(`Language not
     supported while highlighting code, falling back to markdown: ${w}`);let f;if(T[5]!==q||T[6]!==$)f=$.highlight(q,{language:"markdown"}),T[5]=q,T[6]=$,T[7]=f;else
     f=T[7];O=f;break _}O=q}}T[1]=q,T[2]=$,T[3]=K,T[4]=O}else O=T[4];let A=O,H;if(T[8]!==A)H=Dq_.default.createElement(J4,null,A),T[8]=A,T[9]=H;else H=T[9];return H}var
     Ecq,wF7,Dq_,tbT;var YF7=X(()=>{U_();AT();P7();fO_();Ecq=I(a_(),1),wF7=require("path"),Dq_=I(P_(),1),tbT=I(P_(),1)});function jhR(_){let
     T=bcq.c(13),{line:q,gutterWidth:K}=_,R;if(T[0]!==K||T[1]!==q)R=K0(q,0,K),T[0]=K,T[1]=q,T[2]=R;else R=T[2];let $=R,O;if(T[3]!==K||T[4]!==q)O=K0(q,K),T[3]=K,T[4]=q,T[5]=O;else
     O=T[5];let A=O,H;if(T[6]!==$)H=qj.createElement(CD,{fromLeftEdge:!0},qj.createElement(h,null,qj.createElement(J4,null,$))),T[6]=$,T[7]=H;else H=T[7];let
     j;if(T[8]!==A)j=qj.createElement(h,null,qj.createElement(J4,null,A)),T[8]=A,T[9]=j;else j=T[9];let
     z;if(T[10]!==H||T[11]!==j)z=qj.createElement(p,{flexDirection:"row"},H,j),T[10]=H,T[11]=j,T[12]=z;else z=T[12];return z}var bcq,qj,Pq_,HhR=80,mG;var
     Jq_=X(()=>{U_();j2_();YF7();r1_();Yx();oC();bcq=I(a_(),1),qj=I(P_(),1),Pq_=I(P_(),1),mG=Pq_.memo(function(T){let q=bcq.c(23),{code:K,filePath:R,width:$,dim:O}=T,A=O===void
     0?!1:O,H=Pq_.useRef(null),[j,z]=Pq_.useState($||HhR),[w]=D6(),Y=mw().syntaxHighlightingDisabled??!1,D;_:{if(Y){D=null;break _}let
     y;if(q[0]===Symbol.for("react.memo_cache_sentinel"))y=$F7(),q[0]=y;else y=q[0];let L=y;if(!L){D=null;break _}let E;if(q[1]!==K||q[2]!==R)E=new L(K,R),q[1]=K,q[2]=R,q[3]=E;else
      E=q[3];D=E}let P=D,J,W;if(q[4]!==$)J=()=>{if(!$&&H.current){let{width:y}=L2_(H.current);if(y>0)z(y-2)}},W=[$],q[4]=$,q[5]=J,q[6]=W;else J=q[5],W=q[6];Pq_.useEffect(J,W);let
     k;_:{if(P===null){k=null;break _}let y;if(q[7]!==P||q[8]!==A||q[9]!==j||q[10]!==w)y=P.render(w,j,A),q[7]=P,q[8]=A,q[9]=j,q[10]=w,q[11]=y;else y=q[11];k=y}let
     M=k,G;_:{G=0;break _}let Z=G,N;if(q[16]!==K||q[17]!==A||q[18]!==R||q[19]!==Z||q[20]!==M||q[21]!==Y)N=qj.createElement(p,{ref:H},M?qj.createElement(p,{flexDirection:"column"},M
     .map((y,L)=>Z>0?qj.createElement(jhR,{key:L,line:y,gutterWidth:Z}):qj.createElement(h,{key:L},qj.createElement(J4,null,y)))):qj.createElement(fF7,{code:K,filePath:R,dim:A,skip
     Coloring:Y})),q[16]=K,q[17]=A,q[18]=R,q[19]=Z,q[20]=M,q[21]=Y,q[22]=N;else N=q[22];return N})});function a1_(_){let T=PF7.c(43),{file_path:q,operation:K,patch:R,firstLine:$,fi
     leContent:O,content:A,style:H,verbose:j}=_,{columns:z}=R8(),w;if(T[0]!==K)w=H1.createElement(h,{color:"subtle"},"User rejected ",K," to "),T[0]=K,T[1]=w;else w=T[1];let
     f;if(T[2]!==q||T[3]!==j)f=j?q:JF7.relative(MT(),q),T[2]=q,T[3]=j,T[4]=f;else f=T[4];let Y;if(T[5]!==f)Y=H1.createElement(h,{bold:!0,color:"subtle"},f),T[5]=f,T[6]=Y;else
     Y=T[6];let D;if(T[7]!==w||T[8]!==Y)D=H1.createElement(p,{flexDirection:"row"},w,Y),T[7]=w,T[8]=Y,T[9]=D;else D=T[9];let P=D;if(H==="condensed"&&!j){let
     k;if(T[10]!==P)k=H1.createElement(Kq,null,P),T[10]=P,T[11]=k;else k=T[11];return k}if(K==="write"&&A!==void 0){let k,M;if(T[12]!==A||T[13]!==j){let u=A.split(`

 3141: `);k=u.length-DF7,M=j?A:u.slice(0,DF7).join(`
 3142 `),T[12]=A,T[13]=j,T[14]=k,T[15]=M}else k=T[14],M=T[15];let Z=M||"(No
 :   content)",N=z-12,y;if(T[16]!==q||T[17]!==Z||T[18]!==N)y=H1.createElement(mG,{code:Z,filePath:q,width:N,dim:!0}),T[16]=q,T[17]=Z,T[18]=N,T[19]=y;else y=T[19];let
     L;if(T[20]!==k||T[21]!==j)L=!j&&k>0&&H1.createElement(h,{dimColor:!0},"\u2026 +",k," lines"),T[20]=k,T[21]=j,T[22]=L;else L=T[22];let
     E;if(T[23]!==y||T[24]!==L||T[25]!==P)E=H1.createElement(Kq,null,H1.createElement(p,{flexDirection:"column"},P,y,L)),T[23]=y,T[24]=L,T[25]=P,T[26]=E;else E=T[26];return
     E}if(!R||R.length===0){let k;if(T[27]!==P)k=H1.createElement(Kq,null,P),T[27]=P,T[28]=k;else k=T[28];return k}let
     J;if(T[29]!==z||T[30]!==O||T[31]!==q||T[32]!==$||T[33]!==R){let k;if(T[35]!==z||T[36]!==O||T[37]!==q||T[38]!==$)k=(M)=>H1.createElement(p,{flexDirection:"column",key:M.newStar
     t},H1.createElement(wZ,{patch:M,dim:!0,width:z-12,filePath:q,firstLine:$,fileContent:O})),T[35]=z,T[36]=O,T[37]=q,T[38]=$,T[39]=k;else
     k=T[39];J=RS(R.map(k),zhR),T[29]=z,T[30]=O,T[31]=q,T[32]=$,T[33]=R,T[34]=J}else J=T[34];let
     W;if(T[40]!==J||T[41]!==P)W=H1.createElement(Kq,null,H1.createElement(p,{flexDirection:"column"},P,J)),T[40]=J,T[41]=P,T[42]=W;else W=T[42];return W}function zhR(_){return
     H1.createElement(CD,{fromLeftEdge:!0,key:`ellipsis-${_}`},H1.createElement(h,{dimColor:!0},"..."))}var PF7,JF7,H1,DF7=10;var
     xcq=X(()=>{U_();l8();Yq_();Jq_();M9();s9();PF7=I(a_(),1),JF7=require("path"),H1=I(P_(),1)});function
     ebT(_){if(!_)return"Update";if(_.file_path?.startsWith(S1()))return"Updated plan";if(_.edits!=null)return"Update";if(_.old_string==="")return"Create";return"Update"}function
     Icq(_){if(!_?.file_path)return null;return i4(_.file_path)}function WF7({file_path:_},{verbose:T}){if(!_)return null;if(_.startsWith(S1()))return"";return
     z5.createElement(ZW,{filePath:_},T?_:i4(_))}function XF7(){return null}function kF7({filePath:_,structuredPatch:T,originalFile:q},K,{style:R,verbose:$}){let
     O=_.startsWith(S1());return z5.createElement(sbT,{filePath:_,structuredPatch:T,firstLine:q.split(`
 3143 `)[0]??null,fileContent:q,style:R,verbose:$,previewHint:O?"/plan to preview":void 0})}function
 :   MF7(_,T){let{style:q,verbose:K}=T,R=_.file_path,$=_.old_string??"",O=_.new_string??"",A=_.replace_all??!1;if("edits"in _&&_.edits!=null)return
     z5.createElement(a1_,{file_path:R,operation:"update",firstLine:null,verbose:K});if($==="")return
     z5.createElement(a1_,{file_path:R,operation:"write",content:O,firstLine:O.split(`
 3144 `)[0]??null,verbose:K});try{let j=$T().existsSync(R)?$T().readFileSync(R,{encoding:"utf8"}):"",z=Q1_(j,$)||$,w=j0_($,z,O),{patch:f}=NbT({filePath:R,fileContents:j,oldString:z
 :   ,newString:w,replaceAll:A});return z5.createElement(a1_,{file_path:R,operation:"update",patch:f,firstLine:j.split(`
 3145 `)[0]??null,fileContent:j,style:q,verbose:K})}catch(j){return z_(j),z5.createElement(Kq,{height:1},z5.createElement(h,null,"(No changes)"))}}function
 :   GF7(_,T){let{verbose:q}=T;if(!q&&typeof _==="string"&&l7(_,"tool_use_error")){let K=l7(_,"tool_use_error");if(K?.includes("File has not been read yet"))return
     z5.createElement(Kq,null,z5.createElement(h,{dimColor:!0},"File must be read first"));if(K?.includes(YX))return
     z5.createElement(Kq,null,z5.createElement(h,{color:"error"},"File not found"));return z5.createElement(Kq,null,z5.createElement(h,{color:"error"},"Error editing file"))}return
      z5.createElement(o4,{result:_,verbose:q})}var z5;var ucq=X(()=>{U_();Scq();O3();xcq();eT_();s9();P7();A8();l1_();g8();VT();cw();z5=I(P_(),1)});async function hF7(){if(!await
     Yw())return null;if(await NF7())return null;let{stdout:T,code:q}=await
     zq(N8(),["--no-optional-locks","diff","HEAD","--shortstat"],{timeout:_xT,preserveOutputOnError:!1});if(q===0){let
     H=WhR(T);if(H&&H.filesCount>YhR)return{stats:H,perFileStats:new Map,hunks:new Map}}let{stdout:K,code:R}=await
     zq(N8(),["--no-optional-locks","diff","HEAD","--numstat"],{timeout:_xT,preserveOutputOnError:!1});if(R!==0)return
     null;let{stats:$,perFileStats:O}=DhR(K),A=pcq-O.size;if(A>0){let H=await JhR(A);if(H){$.filesCount+=H.size;for(let[j,z]of H)O.set(j,z)}}return{stats:$,perFileStats:O,hunks:new
      Map}}async function ZF7(){if(!await Yw())return new Map;if(await NF7())return new Map;let{stdout:T,code:q}=await
     zq(N8(),["--no-optional-locks","diff","HEAD"],{timeout:_xT,preserveOutputOnError:!1});if(q!==0)return new Map;return PhR(T)}function DhR(_){let T=_.trim().split(`

 - kF7 (/$bunfs/root/src/entrypoints/cli.js:3142:1937)
 - EW7 (/$bunfs/root/src/entrypoints/cli.js:2593:44450)
 - SA (/$bunfs/root/src/entrypoints/cli.js:675:21000)
 - BH (/$bunfs/root/src/entrypoints/cli.js:675:39546)
 - G8 (/$bunfs/root/src/entrypoints/cli.js:675:50237)
 - Ce_ (/$bunfs/root/src/entrypoints/cli.js:675:86958)
 - P3_ (/$bunfs/root/src/entrypoints/cli.js:675:85915)
 - Py_ (/$bunfs/root/src/entrypoints/cli.js:675:85736)
 - jy_ (/$bunfs/root/src/entrypoints/cli.js:675:82474)
 - TT (/$bunfs/root/src/entrypoints/cli.js:675:6493)
 - async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:15607:306)

Steps to Reproduce

Repro: claude --resume <session-id> on a session with a file edit tool result that has a missing filePath

Workaround: claude export <session-id> to extract content, then start a new session. However, in my test this did not resume the session id and i Had to load it into context.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.81 (Claude Code)

Platform

AWS Bedrock

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗