[BUG] Can only run one claude code in a terminal tab.

Resolved 💬 20 comments Opened Jul 15, 2025 by domgolonka Closed Jul 19, 2025
💡 Likely answer: A maintainer (wolffiex, collaborator) responded on this thread — see the highlighted reply below.

Environment

  • Platform (select one):
  • [ ] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.52 (Claude Code
  • Operating System: Linux Mint 22.1 Cinnamon
  • Terminal: Terminal APp

Bug Description

Every time I open a new terminal tab, and open claude, I get this error message on the previous claude code:

``file:///home/dominik/.nvm/versions/node/v22.13.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:168
GFS4:
),console.error(A)};if(!I5[DZ]){if(nj1=global[DZ]||[],EpA(I5,nj1),I5.close=function(A){function B(Q,D){return A.call(I5,Q,function(I){if(!I)KpA();if(typeof D==="function")D.apply(this,arguments)})}return Object.defineProperty(B,A71,{value:A}),B}(I5.close),I5.closeSync=function(A){function B(Q){A.apply(I5,arguments),KpA()}return Object.defineProperty(B,A71,{value:A}),B}(I5.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){O_(I5[DZ]),C1("assert").equal(I5[DZ].length,0)})}var nj1;if(!global[DZ])EpA(global,I5[DZ]);sj1.exports=aj1(r39(I5));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!I5.__patched)sj1.exports=aj1(I5),I5.__patched=!0;function aj1(A){n39(A),A.gracefulify=aj1,A.createReadStream=L,A.createWriteStream=O;var B=A.readFile;A.readFile=Q;function Q(y,p,d){if(typeof p==="function")d=p,p=null;return t(y,p,d);function t(s,f,o,W1){return B(s,f,function(y1){if(y1&&(y1.code==="EMFILE"||y1.code==="ENFILE"))ob([t,[s,f,o],y1,W1||Date.now(),Date.now()]);else if(typeof o==="function")o.apply(this,arguments)})}}var D=A.writeFile;A.writeFile=I;function I(y,p,d,t){if(typeof d==="function")t=d,d=null;return s(y,p,d,t);function s(f,o,W1,y1,k1){return D(f,o,W1,function(IA){if(IA&&(IA.code==="EMFILE"||IA.code==="ENFILE"))ob([s,[f,o,W1,y1],IA,k1||Date.now(),Date.now()]);else if(typeof y1==="function")y1.apply(this,arguments)})}}var Z=A.appendFile;if(Z)A.appendFile=G;function G(y,p,d,t){if(typeof d==="function")t=d,d=null;return s(y,p,d,t);function s(f,o,W1,y1,k1){return Z(f,o,W1,function(IA){if(IA&&(IA.code==="EMFILE"||IA.code==="ENFILE"))ob([s,[f,o,W1,y1],IA,k1||Date.now(),Date.now()]);else if(typeof y1==="function")y1.apply(this,arguments)})}}var F=A.copyFile;if(F)A.copyFile=Y;function Y(y,p,d,t){if(typeof d==="function")t=d,d=0;return s(y,p,d,t);function s(f,o,W1,y1,k1){return F(f,o,W1,function(IA){if(IA&&(IA.code==="EMFILE"||IA.code==="ENFILE"))ob([s,[f,o,W1,y1],IA,k1||Date.now(),Date.now()]);else if(typeof y1==="function")y1.apply(this,arguments)})}}var W=A.readdir;A.readdir=C;var J=/^v[0-5]\./;function C(y,p,d){if(typeof p==="function")d=p,p=null;var t=J.test(process.version)?function f(o,W1,y1,k1){return W(o,s(o,W1,y1,k1))}:function f(o,W1,y1,k1){return W(o,W1,s(o,W1,y1,k1))};return t(y,p,d);function s(f,o,W1,y1){return function(k1,IA){if(k1&&(k1.code==="EMFILE"||k1.code==="ENFILE"))ob([t,[f,o,W1],k1,y1||Date.now(),Date.now()]);else{if(IA&&IA.sort)IA.sort();if(typeof W1==="function")W1.call(this,k1,IA)}}}}if(process.version.substr(0,4)==="v0.8"){var X=a39(A);q=X.ReadStream,M=X.WriteStream}var V=A.ReadStream;if(V)q.prototype=Object.create(V.prototype),q.prototype.open=R;var K=A.WriteStream;if(K)M.prototype=Object.create(K.prototype),M.prototype.open=P;Object.defineProperty(A,"ReadStream",{get:function(){return q},set:function(y){q=y},enumerable:!0,configurable:!0}),Object.defineProperty(A,"WriteStream",{get:function(){return M},set:function(y){M=y},enumerable:!0,configurable:!0});var E=q;Object.defineProperty(A,"FileReadStream",{get:function(){return E},set:function(y){E=y},enumerable:!0,configurable:!0});var U=M;Object.defineProperty(A,"FileWriteStream",{get:function(){return U},set:function(y){U=y},enumerable:!0,configurable:!0});function q(y,p){if(this instanceof q)return V.apply(this,arguments),this;else return q.apply(Object.create(q.prototype),arguments)}function R(){var y=this;m(y.path,y.flags,y.mode,function(p,d){if(p){if(y.autoClose)y.destroy();y.emit("error",p)}else y.fd=d,y.emit("open",d),y.read()})}function M(y,p){if(this instanceof M)return K.apply(this,arguments),this;else return M.apply(Object.create(M.prototype),arguments)}function P(){var y=this;m(y.path,y.flags,y.mode,function(p,d){if(p)y.destroy(),y.emit("error",p);else y.fd=d,y.emit("open",d)})}function L(y,p){return new A.ReadStream(y,p)}function O(y,p){return new A.WriteStream(y,p)}var j=A.open;A.open=m;function m(y,p,d,t){if(typeof d==="function")t=d,d=null;return s(y,p,d,t);function s(f,o,W1,y1,k1){return j(f,o,W1,function(IA,VA){if(IA&&(IA.code==="EMFILE"||IA.code==="ENFILE"))ob([s,[f,o,W1,y1],IA,k1||Date.now(),Date.now()]);else if(typeof y1==="function")y1.apply(this,arguments)})}}return A}function ob(A){O_("ENQUEUE",A[0].name,A[1]),I5[DZ].push(A),rj1()}var e51;function KpA(){var A=Date.now();for(var B=0;B<I5[DZ].length;++B)if(I5[DZ][B].length>2)I5[DZ][B][3]=A,I5[DZ][B][4]=A;rj1()}function rj1(){if(clearTimeout(e51),e51=void 0,I5[DZ].length===0)return;var A=I5[DZ].shift(),B=A[0],Q=A[1],D=A[2],I=A[3],Z=A[4];if(I===void 0)O_("RETRY",B.name,Q),B.apply(null,Q);else if(Date.now()-I>=60000){O_("TIMEOUT",B.name,Q);var G=Q.pop();if(typeof G==="function")G.call(null,D)}else{var F=Date.now()-Z,Y=Math.max(Z-I,1),W=Math.min(Y1.2,100);if(F>=W)O_("RETRY",B.name,Q),B.apply(null,Q.concat([I]));else I5[DZ].push(A)}if(e51===void 0)e51=setTimeout(rj1,0)}});var zpA=H((eX4,HpA)=>{function bC(A,B){if(typeof B==="boolean")B={forever:B};if(this._originalTimeouts=JSON.parse(JSON.stringify(A)),this._timeouts=A,this._options=B||{},this._maxRetryTime=B&&B.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever)this._cachedTimeouts=this._timeouts.slice(0)}HpA.exports=bC;bC.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};bC.prototype.stop=function(){if(this._timeout)clearTimeout(this._timeout);this._timeouts=[],this._cachedTimeouts=null};bC.prototype.retry=function(A){if(this._timeout)clearTimeout(this._timeout);if(!A)return!1;var B=new Date().getTime();if(A&&B-this._operationStart>=this._maxRetryTime)return this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(A);var Q=this._timeouts.shift();if(Q===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),Q=this._timeouts.shift();else return!1;var D=this,I=setTimeout(function(){if(D._attempts++,D._operationTimeoutCb){if(D._timeout=setTimeout(function(){D._operationTimeoutCb(D._attempts)},D._operationTimeout),D._options.unref)D._timeout.unref()}D._fn(D._attempts)},Q);if(this._options.unref)I.unref();return!0};bC.prototype.attempt=function(A,B){if(this._fn=A,B){if(B.timeout)this._operationTimeout=B.timeout;if(B.cb)this._operationTimeoutCb=B.cb}var Q=this;if(this._operationTimeoutCb)this._timeout=setTimeout(function(){Q._operationTimeoutCb()},Q._operationTimeout);this._operationStart=new Date().getTime(),this._fn(this._attempts)};bC.prototype.try=function(A){console.log("Using RetryOperation.try() is deprecated"),this.attempt(A)};bC.prototype.start=function(A){console.log("Using RetryOperation.start() is deprecated"),this.attempt(A)};bC.prototype.start=bC.prototype.try;bC.prototype.errors=function(){return this._errors};bC.prototype.attempts=function(){return this._attempts};bC.prototype.mainError=function(){if(this._errors.length===0)return null;var A={},B=null,Q=0;for(var D=0;D<this._errors.length;D++){var I=this._errors[D],Z=I.message,G=(A[Z]||0)+1;if(A[Z]=G,G>=Q)B=I,Q=G}return B}});var wpA=H((t39)=>{var o39=zpA();t39.operation=function(A){var B=t39.timeouts(A);return new o39(B,{forever:A&&A.forever,unref:A&&A.unref,maxRetryTime:A&&A.maxRetryTime})};t39.timeouts=function(A){if(A instanceof Array)return[].concat(A);var B={retries:10,factor:2,minTimeout:1000,maxTimeout:1/0,randomize:!1};for(var Q in A)B[Q]=A[Q];if(B.minTimeout>B.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");var D=[];for(var I=0;I<B.retries;I++)D.push(this.createTimeout(I,B));if(A&&A.forever&&!D.length)D.push(this.createTimeout(I,B));return D.sort(function(Z,G){return Z-G}),D};t39.createTimeout=function(A,B){var Q=B.randomize?Math.random()+1:1,D=Math.round(QB.minTimeoutMath.pow(B.factor,A));return D=Math.min(D,B.maxTimeout),D};t39.wrap=function(A,B,Q){if(B instanceof Array)Q=B,B=null;if(!Q){Q=[];for(var D in A)if(typeof A[D]==="function")Q.push(D)}for(var I=0;I<Q.length;I++){var Z=Q[I],G=A[Z];A[Z]=function F(Y){var W=t39.operation(B),J=Array.prototype.slice.call(arguments,1),C=J.pop();J.push(function(X){if(W.retry(X))return;if(X)arguments[0]=W.mainError();C.apply(this,arguments)}),W.attempt(function(){Y.apply(A,J)})}.bind(A,G),A[Z].options=B}}});var NpA=H((BV4,B71)=>{B71.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")B71.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")B71.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var qpA=H((QV4,eb)=>{var b8=global.process,T_=function(A){return A&&typeof A==="object"&&typeof A.removeListener==="function"&&typeof A.emit==="function"&&typeof A.reallyExit==="function"&&typeof A.listeners==="function"&&typeof A.kill==="function"&&typeof A.pid==="number"&&typeof A.on==="function"};if(!T_(b8))eb.exports=function(){return function(){}};else{if(tj1=C1("assert"),P_=NpA(),ej1=/^win/i.test(b8.platform),tb=C1("events"),typeof tb!=="function")tb=tb.EventEmitter;if(b8.__signal_exit_emitter__)$D=b8.__signal_exit_emitter__;else $D=b8.__signal_exit_emitter__=new tb,$D.count=0,$D.emitted={};if(!$D.infinite)$D.setMaxListeners(1/0),$D.infinite=!0;eb.exports=function(A,B){if(!T_(global.process))return function(){};if(tj1.equal(typeof A,"function","a callback must be provided for exit handler"),S_===!1)Q71();var Q="exit";if(B&&B.alwaysLast)Q="afterexit";var D=function(){if($D.removeListener(Q,A),$D.listeners("exit").length===0&&$D.listeners("afterexit").length===0)va()};return $D.on(Q,A),D},va=function A(){if(!S_||!T_(global.process))return;S_=!1,P_.forEach(function(B){try{b8.removeListener(B,ba[B])}catch(Q){}}),b8.emit=ga,b8.reallyExit=D71,$D.count-=1},eb.exports.unload=va,rM=function A(B,Q,D){if($D.emitted[B])return;$D.emitted[B]=!0,$D.emit(B,Q,D)},ba={},P_.forEach(function(A){ba[A]=function B(){if(!T_(global.process))return;var Q=b8.listeners(A);if(Q.length===$D.count){if(va(),rM("exit",null,A),rM("afterexit",null,A),ej1&&A==="SIGHUP")A="SIGINT";b8.kill(b8.pid,A)}}}),eb.exports.signals=function(){return P_},S_=!1,Q71=function A(){if(S_||!T_(global.process))return;S_=!0,$D.count+=1,P_=P_.filter(function(B){try{return b8.on(B,ba[B]),!0}catch(Q){return!1}}),b8.emit=By1,b8.reallyExit=Ay1},eb.exports.load=Q71,D71=b8.reallyExit,Ay1=function A(B){if(!T_(global.process))return;b8.exitCode=B||0,rM("exit",b8.exitCode,null),rM("afterexit",b8.exitCode,null),D71.call(b8,b8.exitCode)},ga=b8.emit,By1=function A(B,Q){if(B==="exit"&&T_(global.process)){if(Q!==void 0)b8.exitCode=Q;var D=ga.apply(this,arguments);return rM("exit",b8.exitCode,null),rM("afterexit",b8.exitCode,null),D}else return ga.apply(this,arguments)}}var tj1,P_,ej1,tb,$D,va,rM,ba,S_,Q71,D71,Ay1,ga,By1});var LpA=H((I89,Qy1)=>{var $pA=Symbol();function Q89(A,B,Q){let D=B[$pA];if(D)return B.stat(A,(Z,G)=>{if(Z)return Q(Z);Q(null,G.mtime,D)});let I=new Date(Math.ceil(Date.now()/1000)1000+5);B.utimes(A,I,I,(Z)=>{if(Z)return Q(Z);B.stat(A,(G,F)=>{if(G)return Q(G);let Y=F.mtime.getTime()%1000===0?"s":"ms";Object.defineProperty(B,$pA,{value:Y}),Q(null,F.mtime,Y)})})}function D89(A){let B=Date.now();if(A==="s")B=Math.ceil(B/1000)1000;return new Date(B)}I89.probe=Q89;I89.getMtime=D89});var PpA=H((V89,ua)=>{var F89=C1("path"),Zy1=oj1(),Y89=wpA(),W89=qpA(),MpA=LpA(),bN={};function ha(A,B){return B.lockfilePath||${A}.lock}function Gy1(A,B,Q){if(!B.realpath)return Q(null,F89.resolve(A));B.fs.realpath(A,Q)}function Iy1(A,B,Q){let D=ha(A,B);B.fs.mkdir(D,(I)=>{if(!I)return MpA.probe(D,B.fs,(Z,G,F)=>{if(Z)return B.fs.rmdir(D,()=>{}),Q(Z);Q(null,G,F)});if(I.code!=="EEXIST")return Q(I);if(B.stale<=0)return Q(Object.assign(new Error("Lock file is already being held"),{code:"ELOCKED",file:A}));B.fs.stat(D,(Z,G)=>{if(Z){if(Z.code==="ENOENT")return Iy1(A,{...B,stale:0},Q);return Q(Z)}if(!RpA(G,B))return Q(Object.assign(new Error("Lock file is already being held"),{code:"ELOCKED",file:A}));OpA(A,B,(F)=>{if(F)return Q(F);Iy1(A,{...B,stale:0},Q)})})})}function RpA(A,B){return A.mtime.getTime()<Date.now()-B.stale}function OpA(A,B,Q){B.fs.rmdir(ha(A,B),(D)=>{if(D&&D.code!=="ENOENT")return Q(D);Q()})}function I71(A,B){let Q=bN[A];if(Q.updateTimeout)return;if(Q.updateDelay=Q.updateDelay||B.update,Q.updateTimeout=setTimeout(()=>{Q.updateTimeout=null,B.fs.stat(Q.lockfilePath,(D,I)=>{let Z=Q.lastUpdate+B.stale<Date.now();if(D){if(D.code==="ENOENT"||Z)return Dy1(A,Q,Object.assign(D,{code:"ECOMPROMISED"}));return Q.updateDelay=1000,I71(A,B)}if(Q.mtime.getTime()!==I.mtime.getTime())return Dy1(A,Q,Object.assign(new Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let F=MpA.getMtime(Q.mtimePrecision);B.fs.utimes(Q.lockfilePath,F,F,(Y)=>{let W=Q.lastUpdate+B.stale<Date.now();if(Q.released)return;if(Y){if(Y.code==="ENOENT"||W)return Dy1(A,Q,Object.assign(Y,{code:"ECOMPROMISED"}));return Q.updateDelay=1000,I71(A,B)}Q.mtime=F,Q.lastUpdate=Date.now(),Q.updateDelay=null,I71(A,B)})})},Q.updateDelay),Q.updateTimeout.unref)Q.updateTimeout.unref()}function Dy1(A,B,Q){if(B.released=!0,B.updateTimeout)clearTimeout(B.updateTimeout);if(bN[A]===B)delete bN[A];B.options.onCompromised(Q)}function J89(A,B,Q){B={stale:1e4,update:null,realpath:!0,retries:0,fs:Zy1,onCompromised:(D)=>{throw D},...B},B.retries=B.retries||0,B.retries=typeof B.retries==="number"?{retries:B.retries}:B.retries,B.stale=Math.max(B.stale||0,2000),B.update=B.update==null?B.stale/2:B.update||0,B.update=Math.max(Math.min(B.update,B.stale/2),1000),Gy1(A,B,(D,I)=>{if(D)return Q(D);let Z=Y89.operation(B.retries);Z.attempt(()=>{Iy1(I,B,(G,F,Y)=>{if(Z.retry(G))return;if(G)return Q(Z.mainError());let W=bN[I]={lockfilePath:ha(I,B),mtime:F,mtimePrecision:Y,options:B,lastUpdate:Date.now()};I71(I,B),Q(null,(J)=>{if(W.released)return J&&J(Object.assign(new Error("Lock is already released"),{code:"ERELEASED"}));TpA(I,{...B,realpath:!1},J)})})})})}function TpA(A,B,Q){B={fs:Zy1,realpath:!0,...B},Gy1(A,B,(D,I)=>{if(D)return Q(D);let Z=bN[I];if(!Z)return Q(Object.assign(new Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));Z.updateTimeout&&clearTimeout(Z.updateTimeout),Z.released=!0,delete bN[I],OpA(I,B,Q)})}function C89(A,B,Q){B={stale:1e4,realpath:!0,fs:Zy1,...B},B.stale=Math.max(B.stale||0,2000),Gy1(A,B,(D,I)=>{if(D)return Q(D);B.fs.stat(ha(I,B),(Z,G)=>{if(Z)return Z.code==="ENOENT"?Q(null,!1):Q(Z);return Q(null,!RpA(G,B))})})}function X89(){return bN}W89(()=>{for(let A in bN){let B=bN[A].options;try{B.fs.rmdirSync(ha(A,B))}catch(Q){}}});V89.lock=J89;V89.unlock=TpA;V89.check=C89;V89.getLocks=X89});var _pA=H((DV4,SpA)=>{var U89=oj1();function w89(A){let B=["mkdir","realpath","stat","rmdir","utimes"],Q={...A};return B.forEach((D)=>{Q[D]=(...I)=>{let Z=I.pop(),G;try{G=A[${D}Sync](...I)}catch(F){return Z(F)}Z(null,G)}}),Q}function N89(A){return(...B)=>new Promise((Q,D)=>{B.push((I,Z)=>{if(I)D(I);else Q(Z)}),A(...B)})}function q89(A){return(...B)=>{let Q,D;if(B.push((I,Z)=>{Q=I,D=Z}),A(...B),Q)throw Q;return D}}function $89(A){if(A={...A},A.fs=w89(A.fs||U89),typeof A.retries==="number"&&A.retries>0||A.retries&&typeof A.retries.retries==="number"&&A.retries.retries>0)throw Object.assign(new Error("Cannot use retries with the sync api"),{code:"ESYNC"});return A}SpA.exports={toPromise:N89,toSync:q89,toSyncOptions:$89}});var ma=H((IV4,sM)=>{var Ag=PpA(),{toPromise:Z71,toSync:G71,toSyncOptions:Fy1}=_pA();async function jpA(A,B){let Q=await Z71(Ag.lock)(A,B);return Z71(Q)}function L89(A,B){let Q=G71(Ag.lock)(A,Fy1(B));return G71(Q)}function M89(A,B){return Z71(Ag.unlock)(A,B)}function R89(A,B){return G71(Ag.unlock)(A,Fy1(B))}function O89(A,B){return Z71(Ag.check)(A,B)}function T89(A,B){return G71(Ag.check)(A,Fy1(B))}sM.exports=jpA;sM.exports.lock=jpA;sM.exports.unlock=M89;sM.exports.lockSync=L89;sM.exports.unlockSync=R89;sM.exports.check=O89;sM.exports.checkSync=T89});var spA=H((SV4,rpA)=>{var{defineProperty:W71,getOwnPropertyDescriptor:y89,getOwnPropertyNames:k89}=Object,x89=Object.prototype.hasOwnProperty,J71=(A,B)=>W71(A,"name",{value:B,configurable:!0}),f89=(A,B)=>{for(var Q in B)W71(A,Q,{get:B[Q],enumerable:!0})},v89=(A,B,Q,D)=>{if(B&&typeof B==="object"||typeof B==="function"){for(let I of k89(B))if(!x89.call(A,I)&&I!==Q)W71(A,I,{get:()=>B[I],enumerable:!(D=y89(B,I))||D.enumerable})}return A},b89=(A)=>v89(W71({},"__esModule",{value:!0}),A),mpA={};f89(mpA,{AlgorithmId:()=>lpA,EndpointURLScheme:()=>ppA,FieldPosition:()=>ipA,HttpApiKeyAuthLocation:()=>cpA,HttpAuthLocation:()=>dpA,IniSectionType:()=>npA,RequestHandlerProtocol:()=>apA,SMITHY_CONTEXT_KEY:()=>d89,getDefaultClientConfiguration:()=>u89,resolveDefaultRuntimeConfig:()=>m89});rpA.exports=b89(mpA);var dpA=((A)=>{return A.HEADER="header",A.QUERY="query",A})(dpA||{}),cpA=((A)=>{return A.HEADER="header",A.QUERY="query",A})(cpA||{}),ppA=((A)=>{return A.HTTP="http",A.HTTPS="https",A})(ppA||{}),lpA=((A)=>{return A.MD5="md5",A.CRC32="crc32",A.CRC32C="crc32c",A.SHA1="sha1",A.SHA256="sha256",A})(lpA||{}),g89=J71((A)=>{let B=[];if(A.sha256!==void 0)B.push({algorithmId:()=>"sha256",checksumConstructor:()=>A.sha256});if(A.md5!=null)B.push({algorithmId:()=>"md5",checksumConstructor:()=>A.md5});return{addChecksumAlgorithm(Q){B.push(Q)},checksumAlgorithms(){return B}}},"getChecksumConfiguration"),h89=J71((A)=>{let B={};return A.checksumAlgorithms().forEach((Q)=>{B[Q.algorithmId()]=Q.checksumConstructor()}),B},"resolveChecksumRuntimeConfig"),u89=J71((A)=>{return g89(A)},"getDefaultClientConfiguration"),m89=J71((A)=>{return h89(A)},"resolveDefaultRuntimeConfig"),ipA=((A)=>{return A[A.HEADER=0]="HEADER",A[A.TRAILER=1]="TRAILER",A})(ipA||{}),d89="__smithy_context",npA=((A)=>{return A.PROFILE="profile",A.SSO_SESSION="sso-session",A.SERVICES="services",A})(npA||{}),apA=((A)=>{return A.HTTP_0_9="http/0.9",A.HTTP_1_0="http/1.0",A.TDS_8_0="tds/8.0",A})(apA||{})});var QlA=H((_V4,BlA)=>{var{defineProperty:C71,getOwnPropertyDescriptor:c89,getOwnPropertyNames:p89}=Object,l89=Object.prototype.hasOwnProperty,oM=(A,B)=>C71(A,"name",{value:B,configurable:!0}),i89=(A,B)=>{for(var Q in B)C71(A,Q,{get:B[Q],enumerable:!0})},n89=(A,B,Q,D)=>{if(B&&typeof B==="object"||typeof B==="function"){for(let I of p89(B))if(!l89.call(A,I)&&I!==Q)C71(A,I,{get:()=>B[I],enumerable:!(D=c89(B,I))||D.enumerable})}return A},a89=(A)=>n89(C71({},"__esModule",{value:!0}),A),opA={};i89(opA,{Field:()=>o89,Fields:()=>t89,HttpRequest:()=>e89,HttpResponse:()=>A59,IHttpRequest:()=>tpA.HttpRequest,getHttpHandlerExtensionConfiguration:()=>r89,isValidHostname:()=>AlA,resolveHttpHandlerRuntimeConfig:()=>s89});BlA.exports=a89(opA);var r89=oM((A)=>{return{setHttpHandler(B){A.httpHandler=B},httpHandler(){return A.httpHandler},updateHttpClientConfig(B,Q){A.httpHandler?.updateHttpClientConfig(B,Q)},httpHandlerConfigs(){return A.httpHandler.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),s89=oM((A)=>{return{httpHandler:A.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),tpA=spA(),o89=class{static{oM(this,"Field")}constructor({name:A,kind:B=tpA.FieldPosition.HEADER,values:Q=[]}){this.name=A,this.kind=B,this.values=Q}add(A){this.values.push(A)}set(A){this.values=A}remove(A){this.values=this.values.filter((B)=>B!==A)}toString(){return this.values.map((A)=>A.includes(",")||A.includes(" ")?"${A}":A).join(", ")}get(){return this.values}},t89=class{constructor({fields:A=[],encoding:B="utf-8"}){this.entries={},A.forEach(this.setField.bind(this)),this.encoding=B}static{oM(this,"Fields")}setField(A){this.entries[A.name.toLowerCase()]=A}getField(A){return this.entries[A.toLowerCase()]}removeField(A){delete this.entries[A.toLowerCase()]}getByType(A){return Object.values(this.entries).filter((B)=>B.kind===A)}},e89=class A{static{oM(this,"HttpRequest")}constructor(B){this.method=B.method||"GET",this.hostname=B.hostname||"localhost",this.port=B.port,this.query=B.query||{},this.headers=B.headers||{},this.body=B.body,this.protocol=B.protocol?B.protocol.slice(-1)!==":"?${B.protocol}::B.protocol:"https:",this.path=B.path?B.path.charAt(0)!=="/"?/${B.path}:B.path:"/",this.username=B.username,this.password=B.password,this.fragment=B.fragment}static clone(B){let Q=new A({...B,headers:{...B.headers}});if(Q.query)Q.query=epA(Q.query);return Q}static isInstance(B){if(!B)return!1;let Q=B;return"method"in Q&&"protocol"in Q&&"hostname"in Q&&"path"in Q&&typeof Q.query==="object"&&typeof Q.headers==="object"}clone(){return A.clone(this)}};function epA(A){return Object.keys(A).reduce((B,Q)=>{let D=A[Q];return{...B,[Q]:Array.isArray(D)?[...D]:D}},{})}oM(epA,"cloneQuery");var A59=class{static{oM(this,"HttpResponse")}constructor(A){this.statusCode=A.statusCode,this.reason=A.reason,this.headers=A.headers||{},this.body=A.body}static isInstance(A){if(!A)return!1;let B=A;return typeof B.statusCode==="number"&&typeof B.headers==="object"}};function AlA(A){return/^[a-z0-9][a-z0-9\.\-][a-z0-9]$/.test(A)}oM(AlA,"isValidHostname")});var x_=H((xV4,FlA)=>{var{defineProperty:V71,getOwnPropertyDescriptor:B59,getOwnPropertyNames:Q59}=Object,D59=Object.prototype.hasOwnProperty,X71=(A,B)=>V71(A,"name",{value:B,configurable:!0}),I59=(A,B)=>{for(var Q in B)V71(A,Q,{get:B[Q],enumerable:!0})},Z59=(A,B,Q,D)=>{if(B&&typeof B==="object"||typeof B==="function"){for(let I of Q59(B))if(!D59.call(A,I)&&I!==Q)V71(A,I,{get:()=>B[I],enumerable:!(D=B59(B,I))||D.enumerable})}return A},G59=(A)=>Z59(V71({},"__esModule",{value:!0}),A),DlA={};I59(DlA,{getHostHeaderPlugin:()=>Y59,hostHeaderMiddleware:()=>ZlA,hostHeaderMiddlewareOptions:()=>GlA,resolveHostHeaderConfig:()=>IlA});FlA.exports=G59(DlA);var F59=QlA();function IlA(A){return A}X71(IlA,"resolveHostHeaderConfig");var ZlA=X71((A)=>(B)=>async(Q)=>{if(!F59.HttpRequest.isInstance(Q.request))return B(Q);let{request:D}=Q,{handlerProtocol:I=""}=A.requestHandler.metadata||{};if(I.indexOf("h2")>=0&&!D.headers[":authority"])delete D.headers.host,D.headers[":authority"]=D.hostname+(D.port?":"+D.port:"");else if(!D.headers.host){let Z=D.hostname;if(D.port!=null)Z+=:${D.port};D.headers.host=Z}return B(Q)},"hostHeaderMiddleware"),GlA={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Y59=X71((A)=>({applyToStack:X71((B)=>{B.add(ZlA(A),GlA)},"applyToStack")}),"getHostHeaderPlugin")});var f_=H((fV4,ClA)=>{var{defineProperty:K71,getOwnPropertyDescriptor:W59,getOwnPropertyNames:J59}=Object,C59=Object.prototype.hasOwnProperty,Yy1=(A,B)=>K71(A,"name",{value:B,configurable:!0}),X59=(A,B)=>{for(var Q in B)K71(A,Q,{get:B[Q],enumerable:!0})},V59=(A,B,Q,D)=>{if(B&&typeof B==="object"||typeof B==="function"){for(let I of J59(B))if(!C59.call(A,I)&&I!==Q)K71(A,I,{get:()=>B[I],enumerable:!(D=W59(B,I))||D.enumerable})}return A},K59=(A)=>V59(K71({},"__esModule",{value:!0}),A),YlA={};X59(YlA,{getLoggerPlugin:()=>E59,loggerMiddleware:()=>WlA,loggerMiddlewareOptions:()=>JlA});ClA.exports=K59(YlA);var WlA=Yy1(()=>(A,B)=>async(Q)=>{try{let D=await A(Q),{clientName:I,commandName:Z,logger:G,dynamoDbDocumentClientOptions:F={}}=B,{overrideInputFilterSensitiveLog:Y,overrideOutputFilterSensitiveLog:W}=F,J=Y??B.inputFilterSensitiveLog,C=W??B.outputFilterSensitiveLog,{$metadata:X,...V}=D.output;return G?.info?.({clientName:I,commandName:Z,input:J(Q.input),output:C(V),metadata:X}),D}catch(D){let{clientName:I,commandName:Z,logger:G,dynamoDbDocumentClientOptions:F={}}=B,{overrideInputFilterSensitiveLog:Y}=F,W=Y??B.inputFilterSensitiveLog;throw G?.error?.({clientName:I,commandName:Z,input:W(Q.input),error:D,metadata:D.$metadata}),D}},"loggerMiddleware"),JlA={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},E59=Yy1((A)=>({applyToStack:Yy1((B)=>{B.add(WlA(),JlA)},"applyToStack")}),"getLoggerPlugin")});var qlA=H((vV4,NlA)=>{var{defineProperty:E71,getOwnPropertyDescriptor:H59,getOwnPropertyNames:z59}=Object,U59=Object.prototype.hasOwnProperty,H71=(A,B)=>E71(A,"name",{value:B,configurable:!0}),w59=(A,B)=>{for(var Q in B)E71(A,Q,{get:B[Q],enumerable:!0})},N59=(A,B,Q,D)=>{if(B&&typeof B==="object"||typeof B==="function"){for(let I of z59(B))if(!U59.call(A,I)&&I!==Q)E71(A,I,{get:()=>B[I],enumerable:!(D=H59(B,I))||D.enumerable})}return A},q59=(A)=>N59(E71({},"__esModule",{value:!0}),A),XlA={};w59(XlA,{AlgorithmId:()=>HlA,EndpointURLScheme:()=>ElA,FieldPosition:()=>zlA,HttpApiKeyAuthLocation:()=>KlA,HttpAuthLocation:()=>VlA,IniSectionType:()=>UlA,RequestHandlerProtocol:()=>wlA,SMITHY_CONTEXT_KEY:()=>O59,getDefaultClientConfiguration:()=>M59,resolveDefaultRuntimeConfig:()=>R59});NlA.exports=q59(XlA);var VlA=((A)=>{return A.HEADER="header",A.QUERY="query",A})(VlA||{}),KlA=((A)=>{return A.HEADER="header",A.QUERY="query",A})(KlA||{}),ElA=((A)=>{return A.HTTP="http",A.HTTPS="https",A})(ElA||{}),HlA=((A)=>{return A.MD5="md5",A.CRC32="crc32",A.CRC32C="crc32c",A.SHA1="sha1",A.SHA256="sha256",A})(HlA||{}),$59=H71((A)=>{let B=[];if(A.sha256!==void 0)B.push({algorithmId:()=>"sha256",checksumConstructor:()=>A.sha256});if(A.md5!=null)B.push({algorithmId:()=>"md5",checksumConstructor:()=>A.md5});return{addChecksumAlgorithm(Q){B.push(Q)},checksumAlgorithms(){return B}}},"getChecksumConfiguration"),L59=H71((A)=>{let B={};return A.checksumAlgorithms().forEach((Q)=>{B[Q.algorithmId()]=Q.checksumConstructor()}),B},"resolveChecksumRuntimeConfig"),M59=H71((A)=>{return $59(A)},"getDefaultClientConfiguration"),R59=H71((A)=>{return L59(A)},"resolveDefaultRuntimeConfig"),zlA=((A)=>{return A[A.HEADER=0]="HEADER",A[A.TRAILER=1]="TRAILER",A})(zlA||{}),O59="__smithy_context",UlA=((A)=>{return A.PROFILE="profile",A.SSO_SESSION="sso-session",A.SERVICES="services",A})(UlA||{}),wlA=((A)=>{return A.HTTP_0_9="http/0.9",A.HTTP_1_0="http/1.0",A.TDS_8_0="tds/8.0",A})(wlA||{})});var TlA=H((bV4,OlA)=>{var{defineProperty:z71,getOwnPropertyDescriptor:T59,getOwnPropertyNames:P59}=Object,S59=Object.prototype.hasOwnProperty,tM=(A,B)=>z71(A,"name",{value:B,configurable:!0}),_59=(A,B)=>{for(var Q in B)z71(A,Q,{get:B[Q],enumerable:!0})},j59=(A,B,Q,D)=>{if(B&&typeof B==="object"||typeof B==="function"){for(let I of P59(B))if(!S59.call(A,I)&&I!==Q)z71(A,I,{get:()=>B[I],enumerable:!(D=T59(B,I))||D.enumerable})}return A},y59=(A)=>j59(z71({},"__esModule",{value:!0}),A),$lA={};_59($lA,{Field:()=>f59,Fields:()=>v59,HttpRequest:()=>b59,HttpResponse:()=>g59,IHttpRequest:()=>LlA.HttpRequest,getHttpHandlerExtensionConfiguration:()=>k59,isValidHostname:()=>RlA,resolveHttpHandlerRuntimeConfig:()=>x59});OlA.exports=y59($lA);var k59=tM((A)=>{return{setHttpHandler(B){A.httpHandler=B},httpHandler(){return A.httpHandler},updateHttpClientConfig(B,Q){A.httpHandler?.updateHttpClientConfig(B,Q)},httpHandlerConfigs(){return A.httpHandler.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),x59=tM((A)=>{return{httpHandler:A.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),LlA=qlA(),f59=class{static{tM(this,"Field")}constructor({name:A,kind:B=LlA.FieldPosition.HEADER,values:Q=[]}){this.name=A,this.kind=B,this.values=Q}add(A){this.values.push(A)}set(A){this.values=A}remove(A){this.values=this.values.filter((B)=>B!==A)}toString(){return this.values.map((A)=>A.includes(",")||A.includes(" ")?"${A}":A).join(", ")}get(){return this.values}},v59=class{constructor({fields:A=[],encoding:B="utf-8"}){this.entries={},A.forEach(this.setField.bind(this)),this.encoding=B}static{tM(this,"Fields")}setField(A){this.entries[A.name.toLowerCase()]=A}getField(A){return this.entries[A.toLowerCase()]}removeField(A){delete this.entries[A.toLowerCase()]}getByType(A){return Object.values(this.entries).filter((B)=>B.kind===A)}},b59=class A{static{tM(this,"HttpRequest")}constructor(B){this.method=B.method||"GET",this.hostname=B.hostname||"localhost",this.port=B.port,this.query=B.query||{},this.headers=B.headers||{},this.body=B.body,this.protocol=B.protocol?B.protocol.slice(-1)!==":"?${B.protocol}::B.protocol:"https:",this.path=B.path?B.path.charAt(0)!=="/"?/${B.path}:B.path:"/",this.username=B.username,this.password=B.password,this.fragment=B.fragment}static clone(B){let Q=new A({...B,headers:{...B.headers}});if(Q.query)Q.query=MlA(Q.query);return Q}static isInstance(B){if(!B)return!1;let Q=B;return"method"in Q&&"protocol"in Q&&"hostname"in Q&&"path"in Q&&typeof Q.query==="object"&&typeof Q.headers==="object"}clone(){return A.clone(this)}};function MlA(A){return Object.keys(A).reduce((B,Q)=>{let D=A[Q];return{...B,[Q]:Array.isArray(D)?[...D]:D}},{})}tM(MlA,"cloneQuery");var g59=class{static{tM(this,"HttpResponse")}constructor(A){this.statusCode=A.statusCode,this.reason=A.reason,this.headers=A.headers||{},this.body=A.body}static isInstance(A){if(!A)return!1;let B=A;return typeof B.statusCode==="number"&&typeof B.headers==="object"}};function RlA(A){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(A)}tM(RlA,"isValidHostname")});var v_=H((mV4,jlA)=>{var{defineProperty:w71,getOwnPropertyDescriptor:h59,getOwnPropertyNames:u59}=Object,m59=Object.prototype.hasOwnProperty,U71=(A,B)=>w71(A,"name",{value:B,configurable:!0}),d59=(A,B)=>{for(var Q in B)w71(A,Q,{get:B[Q],enumerable:!0})},c59=(A,B,Q,D)=>{if(B&&typeof B==="object"||typeof B==="function"){for(let I of u59(B))if(!m59.call(A,I)&&I!==Q)w71(A,I,{get:()=>B[I],enumerable:!(D=h59(B,I))||D.enumerable})}return A},p59=(A)=>c59(w71({},"__esModule",{value:!0}),A),PlA={};d59(PlA,{addRecursionDetectionMiddlewareOptions:()=>_lA,getRecursionDetectionPlugin:()=>a59,recursionDetectionMiddleware:()=>SlA});jlA.exports=p59(PlA);var l59=TlA(),Wy1="X-Amzn-Trace-Id",i59="AWS_LAMBDA_FUNCTION_NAME",n59="_X_AMZN_TRACE_ID",SlA=U71((A)=>(B)=>async(Q)=>{let{request:D}=Q;if(!l59.HttpRequest.isInstance(D)||A.runtime!=="node")return B(Q);let I=Object.keys(D.headers??{}).find((Y)=>Y.toLowerCase()===Wy1.toLowerCase())??Wy1;if(D.headers.hasOwnProperty(I))return B(Q);let Z=process.env[i59],G=process.env[n59],F=U71((Y)=>typeof Y==="string"&&Y.length>0,"nonEmptyString");if(F(Z)&&F(G))D.headers[Wy1]=G;return B({...Q,request:D})},"recursionDetectionMiddleware"),_lA={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},a59=U71((A)=>({applyToStack:U71((B)=>{B.add(SlA(A),_lA)},"applyToStack")}),"getRecursionDetectionPlugin")});var Jy1=H((dV4,ulA)=>{var{defineProperty:N71,getOwnPropertyDescriptor:r59,getOwnPropertyNames:s59}=Object,o59=Object.prototype.hasOwnProperty,q71=(A,B)=>N71(A,"name",{value:B,configurable:!0}),t59=(A,B)=>{for(var Q in B)N71(A,Q,{get:B[Q],enumerable:!0})},e59=(A,B,Q,D)=>{if(B&&typeof B==="object"||typeof B==="function"){for(let I of s59(B))if(!o59.call(A,I)&&I!==Q)N71(A,I,{get:()=>B[I],enumerable:!(D=r59(B,I))||D.enumerable})}return A},A79=(A)=>e59(N71({},"__esModule",{value:!0}),A),ylA={};t59(ylA,{AlgorithmId:()=>vlA,EndpointURLScheme:()=>flA,FieldPosition:()=>blA,HttpApiKeyAuthLocation:()=>xlA,HttpAuthLocation:()=>klA,IniSectionType:()=>glA,RequestHandlerProtocol:()=>hlA,SMITHY_CONTEXT_KEY:()=>Z79,getDefaultClientConfiguration:()=>D79,resolveDefaultRuntimeConfig:()=>I79});ulA.exports=A79(ylA);var klA=((A)=>{return A.HEADER="header",A.QUERY="query",A})(klA||{}),xlA=((A)=>{return A.HEADER="header",A.QUERY="query",A})(xlA||{}),flA=((A)=>{return A.HTTP="http",A.HTTPS="https",A})(flA||{}),vlA=((A)=>{return A.MD5="md5",A.CRC32="crc32",A.CRC32C="crc32c",A.SHA1="sha1",A.SHA256="sha256",A})(vlA||{}),B79=q71((A)=>{let B=[];if(A.sha256!==void 0)B.push({algorithmId:()=>"sha256",checksumConstructor:()=>A.sha256});if(A.md5!=null)B.push({algorithmId:()=>"md5",checksumConstructor:()=>A.md5});return{addChecksumAlgorithm(Q){B.push(Q)},checksumAlgorithms(){return B}}},"getChecksumConfiguration"),Q79=q71((A)=>{let B={};return A.checksumAlgorithms().forEach((Q)=>{B[Q.algorithmId()]=Q.checksumConstructor()}),B},"resolveChecksumRuntimeConfig"),D79=q71((A)=>{return B79(A)},"getDefaultClientConfiguration"),I79=q71((A)=>{return Q79(A)},"resolveDefaultRuntimeConfig"),blA=((A)=>{return A[A.HEADER=0]="HEADER",A[A.TRAILER=1]="TRAILER",A})(blA||{}),Z79="__smithy_context",glA=((A)=>{return A.PROFILE="profile",A.SSO_SESSION="sso-session",A.SERVICES="services",A})(glA||{}),hlA=((A)=>{return A.HTTP_0_9="http/0.9",A.HTTP_1_0="http/1.0",A.TDS_8_0="tds/8.0",A})(hlA||{})});var slA=H((cV4,rlA)=>{var{defineProperty:$71,getOwnPropertyDescriptor:G79,getOwnPropertyNames:F79}=Object,Y79=Object.prototype.hasOwnProperty,L71=(A,B)=>$71(A,"name",{value:B,configurable:!0}),W79=(A,B)=>{for(var Q in B)$71(A,Q,{get:B[Q],enumerable:!0})},J79=(A,B,Q,D)=>{if(B&&typeof B==="object"||typeof B==="function"){for(let I of F79(B))if(!Y79.call(A,I)&&I!==Q)$71(A,I,{get:()=>B[I],enumerable:!(D=G79(B,I))||D.enumerable})}return A},C79=(A)=>J79($71({},"__esModule",{value:!0}),A),mlA={};W79(mlA,{AlgorithmId:()=>llA,EndpointURLScheme:()=>plA,FieldPosition:()=>ilA,HttpApiKeyAuthLocation:()=>clA,HttpAuthLocation:()=>dlA,IniSectionType:()=>nlA,RequestHandlerProtocol:()=>alA,SMITHY_CONTEXT_KEY:()=>H79,getDefaultClientConfiguration:()=>K79,resolveDefaultRuntimeConfig:()=>E79});rlA.exports=C79(mlA);var dlA=((A)=>{return A.HEADER="header",A.QUERY="query",A})(dlA||{}),clA=((A)=>{return A.HEADER="header",A.QUERY="query",A})(clA||{}),plA=((A)=>{return A.HTTP="http",A.HTTPS="https",A})(plA||{}),llA=((A)=>{return A.MD5="md5",A.CRC32="crc32",A.CRC32C="crc32c",A.SHA1="sha1",A.SHA256="sha256",A})(llA||{}),X79=L71((A)=>{let B=[];if(A.sha256!==void 0)B.push({algorithmId:()=>"sha256",checksumConstructor:()=>A.sha256});if(A.md5!=null)B.push({algorithmId:()=>"md5",checksumConstructor:()=>A.md5});return{addChecksumAlgorithm(Q){B.push(Q)},checksumAlgorithms(){return B}}},"getChecksumConfiguration"),V79=L71((A)=>{let B={};return A.checksumAlgorithms().forEach((Q)=>{B[Q.algorithmId()]=Q.checksumConstructor()}),B},"resolveChecksumRuntimeConfig"),K79=L71((A)=>{return X79(A)},"getDefaultClientConfiguration"),E79=L71((A)=>{return V79(A)},"resolveDefaultRuntimeConfig"),ilA=((A)=>{return A[A.HEADER=0]="HEADER",A[A.TRAILER=1]="TRAILER",A})(ilA||{}),H79="__smithy_context",nlA=((A)=>{return A.PROFILE="profile",A.SSO_SESSION="sso-session",A.SERVICES="services",A})(nlA||{}),alA=((A)=>{return A.HTTP_0_9="http/0.9",A.HTTP_1_0="http/1.0",A.TDS_8_0="tds/8.0",A})(alA||{})});var hC=H((pV4,AiA)=>{var{defineProperty:M71,getOwnPropertyDescriptor:z79,getOwnPropertyNames:U79}=Object,w79=Object.prototype.hasOwnProperty,tlA=(A,B)=>M71(A,"name",{value:B,configurable:!0}),N79=(A,B)=>{for(var Q in B)M71(A,Q,{get:B[Q],enumerable:!0})},q79=(A,B,Q,D)=>{if(B&&typeof B==="object"||typeof B==="function"){for(let I of U79(B))if(!w79.call(A,I)&&I!==Q)M71(A,I,{get:()=>B[I],enumerable:!(D=z79(B,I))||D.enumerable})}return A},$79=(A)=>q79(M71({},"__esModule",{value:!0}),A),elA={};N79(elA,{getSmithyContext:()=>L79,normalizeProvider:()=>M79});AiA.exports=$79(elA);var olA=slA(),L79=tlA((A)=>A[olA.SMITHY_CONTEXT_KEY]||(A[olA.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),M79=tlA((A)=>{if(typeof A==="function")return A;let B=Promise.resolve(A);return()=>B},"normalizeProvider")});var Jz=H((lV4,FiA)=>{var{defineProperty:R71,getOwnPropertyDescriptor:R79,getOwnPropertyNames:O79}=Object,T79=Object.prototype.hasOwnProperty,Cy1=(A,B)=>R71(A,"name",{value:B,configurable:!0}),P79=(A,B)=>{for(var Q in B)R71(A,Q,{get:B[Q],enumerable:!0})},S79=(A,B,Q,D)=>{if(B&&typeof B==="object"||typeof B==="function"){for(let I of O79(B))if(!T79.call(A,I)&&I!==Q)R71(A,I,{get:()=>B[I],enumerable:!(D=R79(B,I))||D.enumerable})}return A},_79=(A)=>S79(R71({},"__esModule",{value:!0}),A),BiA={};P79(BiA,{deserializerMiddleware:()=>QiA,deserializerMiddlewareOption:()=>IiA,getSerdePlugin:()=>GiA,serializerMiddleware:()=>DiA,serializerMiddlewareOption:()=>ZiA});FiA.exports=_79(BiA);var QiA=Cy1((A,B)=>(Q,D)=>async(I)=>{let{response:Z}=await Q(I);try{let G=await B(Z,A);return{response:Z,output:G}}catch(G){if(Object.defineProperty(G,"$response",{value:Z}),!("$metadata"in G)){try{G.message+=`

[Error: ENOENT: no such file or directory, stat '/home/dominik/.claude/shell-snapshots/snapshot-bash-1752612394453-locmz4.sh.lock'] {
errno: -2,
code: 'ECOMPROMISED',
syscall: 'stat',
path: '/home/dominik/.claude/shell-snapshots/snapshot-bash-1752612394453-locmz4.sh.lock'
}


## Steps to Reproduce
1. Open Claude code in a terminal
2. Open Claude code in a second terminal tab
3. Look into the first terminal tab and claude code will exit with the above

## Expected Behavior
<!-- What you expected to happen -->

## Actual Behavior
<!-- What actually happened -->

## Additional Context
<!-- Add any other context about the problem here, such as screenshots, logs, etc. -->

View original on GitHub ↗

20 Comments

xhfhope · 1 year ago

Having this issue as well. Same re-creation criteria.
Claude 1.0.53
Ubuntu terminal on Windows with WSL

error: ENOENT: no such file or directory, stat '/home/xhfhope/.claude/shell-snapshots/snapshot-bash-1752626916652-mofldu.sh.lock'
path: "/home/xhfhope/.claude/shell-snapshots/snapshot-bash-1752626916652-mofldu.sh.lock",
syscall: "stat",
errno: -2,
code: "ECOMPROMISED"

umihico · 1 year ago

I'm experiencing the same issue in a devcontainer environment when trying to run Claude Code in parallel tmux sessions.

Environment:

  • Claude CLI version: 1.0.53 (same issue occurs with 1.0.51 downgrade)
  • OS: devcontainer (Linux-based)
  • Shell: zsh
  • Execution environment: tmux sessions

Symptoms:

  1. Initial error when running multiple Claude Code instances simultaneously:

Error: zsh:source:1: no such file or directory: /home/node/.claude/shell-snapshots/snapshot-zsh-c88eff51.sh

  1. Eventually, the session itself becomes corrupted with this error:
[Error: ENOENT: no such file or directory, stat '/home/node/.claude/shell-snapshots/snapshot-zsh-1752639259226-abxvmc.sh.lock'] {
  errno: -2,
  code: 'ECOMPROMISED',
  syscall: 'stat',
  path: '/home/node/.claude/shell-snapshots/snapshot-zsh-1752639259226-abxvmc.sh.lock'
}

Root cause: (AI generated)
This appears to be a race condition where multiple Claude Code instances are trying to access the same shell snapshot files and lock files concurrently. The locking mechanism seems to fail in the devcontainer environment, leading to file corruption and eventually making the sessions unusable.

dmkenney · 1 year ago

Yeah I have the same exact issue. Started happening either yesterday or the day before.

I did not get this issue when installed through npm. I am currently running the version installed through the script that uses bun.

Version: 1.0.53

error: ENOENT: no such file or directory, stat '/home/dylan/.claude/shell-snapshots/snapshot-zsh-1752674431276-2om7yo.sh.lock'
path: "/home/dylan/.claude/shell-snapshots/snapshot-zsh-1752674431276-2om7yo.sh.lock",
syscall: "stat",
errno: -2,
code: "ECOMPROMISED"

wolffiex collaborator · 12 months ago

Hi everyone, I'm really sorry for this trouble. It seems we found the limit of our lockfile implementation 😅

We switched to an in-memory implementation of the snapshot in 1.0.54. If you need to see it for debugging purposes, claude will write to a file when you run with --debug

Please let us know if you have any more trouble!

wolffiex collaborator · 12 months ago

sorry, we had to revert 1.0.54 due to an issue with the in-memory implementation. we are working on this and will try again tomorrow

wolffiex collaborator · 12 months ago

Ok 1.0.55 is out with the fix. Please let us know how it goes for you.

xhfhope · 12 months ago

ENOENT error resolved. No issues running concurrent claude code instances and tasks on Claude 1.0.55 with Ubuntu / Windows WSL. Thank you!

umihico · 12 months ago

1.0.55 worked for my situation. Thank you!

guitaripod · 12 months ago

@umihico Where are you getting 1.0.55 from?

I'm running claude update and 1.0.53 won't update further. I see 1.0.54 mentioned in the changelog.md commits on the master branch. How do I update my Bun install?

wolffiex collaborator · 12 months ago

we had to demote 10.55 due to #3881
stay tuned, taking a different tack with the fix

guitaripod · 12 months ago

claude update updated my (Bun install) app to 1.0.56, and concurrent sessions do not crash anymore ✅

Any chance we could enable the "Releases" UI for this repo, so it's easy to track the versions?

wolffiex collaborator · 12 months ago

Thanks for this suggestion. We can definitely do better tracking our releases and what's in them. Thanks for this feedback.

josh-abram · 12 months ago

Whilst it no longer crashes, I still find that bash commands will error when 2 instances of claude code are open.

e.g:

Bash(find /home/eg/Documents/eg -type f \( -name ".css" -o -name ".html" -o -name "*.js" -o -name
".ts" -o -name ".tsx" -o -name "*.jsx" \) -exec gre…)
⎿ /bin/bash: line 1: /home/eg/.claude/shell-snapshots/snapshot-bash-1753087502412-zay7kq.sh: No such file or
directory

guitaripod · 12 months ago

I've seen that too

mkbrechtel · 11 months ago

I can confirm this too. This happens when i run claude code in two different projects as the same user.

wolffiex collaborator · 11 months ago

@mkbrechtel can you confirm your version?

wolffiex collaborator · 11 months ago

also next time you see this, can you stat one of the shell snapshot files that claude code creates? it must be a problem with the cleanup logic

mkbrechtel · 11 months ago

it appeared again:

● Bash(/usr/bin/python3 test_deploy.py)
  ⎿  Error: /bin/bash: Zeile 1: /home/mkbrechtel/.claude/shell-snapshots/snapshot-bash-1753317274965-5r50j6.sh: Datei oder Verzeichnis nicht gefunden

● Let me try a different approach and check the environment:

● Bash(echo $PATH)
  ⎿  Error: /bin/bash: Zeile 1: /home/mkbrechtel/.claude/shell-snapshots/snapshot-bash-1753317274965-5r50j6.sh: Datei oder Verzeichnis nicht gefunden

● The bash environment appears to have a persistent issue with a missing snapshot file. This is preventing any command execution. The error message is in German and indicates that a file or directory cannot
  be found.

  Would you like me to:
  1. Show you the content of the script so you can run it manually in your terminal
  2. Try to diagnose the bash environment issue further
  3. Wait for you to restart Claude Code and try again

> try again

● Bash(python3 test_deploy.py)
  ⎿  Error: /bin/bash: Zeile 1: /home/mkbrechtel/.claude/shell-snapshots/snapshot-bash-1753317274965-5r50j6.sh: Datei oder Verzeichnis nicht gefunden

● Bash(ls)
  ⎿  Error: /bin/bash: Zeile 1: /home/mkbrechtel/.claude/shell-snapshots/snapshot-bash-1753317274965-5r50j6.sh: Datei oder Verzeichnis nicht gefunden

● Bash(python3 test_deploy.py)
  ⎿  Error: /bin/bash: Zeile 1: /home/mkbrechtel/.claude/shell-snapshots/snapshot-bash-1753317274965-5r50j6.sh: Datei oder Verzeichnis nicht gefunden

● The bash shell continues to have issues with a missing snapshot file. This appears to be a persistent environment problem that's preventing any command execution.
@mkbrechtel can you confirm your version?
mkbrechtel@devio:~ > claude --version
1.0.59 (Claude Code)
next time you see this, can you stat one of the shell snapshot files that claude code creates? it must be a problem with the cleanup logic

while running two Claude Code instances in parallel:

this is the stat of the shell-snapshot file of the claude instance that is working without errors, the one impacting the other(s):

mkbrechtel@devio:~ > stat /home/mkbrechtel/.claude/shell-snapshots/snapshot-bash-1753317322229-zo5yx2.sh
 Datei: /home/mkbrechtel/.claude/shell-snapshots/snapshot-bash-1753317322229-zo5yx2.sh
 Größe: 1666      	Blöcke: 8          EA Block: 4096   regular file
Gerät: 8/1	Inode: 420457      Verknüpfungen: 1
Zugriff: (0664/-rw-rw-r--)  Uid: ( 4747/mkbrechtel)   Gid: ( 4747/mkbrechtel)
Zugriff: 2025-07-24 02:36:22.619554550 +0200
Modifiziert: 2025-07-24 02:35:22.257432982 +0200
Geändert: 2025-07-24 02:35:22.257432982 +0200
Geburt: 2025-07-24 02:35:22.237432278 +0200

there is only one file:

mkbrechtel@devio:~ > ls -l /home/mkbrechtel/.claude/shell-snapshots
insgesamt 4
-rw-rw-r-- 1 mkbrechtel mkbrechtel 1666 24. Jul 02:35 snapshot-bash-1753317322229-zo5yx2.sh

I would suspect there is some overeagerly cleanup happening somewhere.

wolffiex collaborator · 11 months ago

Additional changes went out with 1.0.60 today. Let me know if you're still having problems with this after updating.

github-actions[bot] · 11 months ago

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.