[BUG] crashes with `code: "ECOMPROMISED"`

Resolved 💬 16 comments Opened Jul 15, 2025 by 0xdeafbeef Closed Aug 24, 2025
💡 Likely answer: A maintainer (ashwin-ant, collaborator) responded on this thread — see the highlighted reply below.

Environment

  • Platform (select one):
  • [x] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.52 (Claude Code) native install
  • Operating System: fedora 42
  • Terminal: gnome term

Bug Description

Randomly crashes after some time, even when idle with

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

Bun v1.2.15 (Linux x64 baseline)

Steps to Reproduce

  1. claude
  2. wait some time - can be from 4 to 30 minutes.

Additional Context

Delete of shell-snapshots, reboot doesn't help.

output of

 strace -e trace=file -f -o ../claude_trace.log claude

claude_trace.zip

View original on GitHub ↗

16 Comments

0xdeafbeef · 1 year ago

Everything works with pnpm version, so it's a problem with native install / bun.

arusso · 1 year ago

This is happening to me as well -- I can trigger it by running a second instance of claude in a different window/pane. Otherwise, I don't see this crash.

I'm on 1.0.53 native install.

ajimix · 1 year ago

I'm also having this issue since yesterday. I cannot even do a single prompt, it immediately crashes

0xdeafbeef · 1 year ago

@ajimix @arusso which shells do you use? In my case it's fish, so it's strange to have zsh related error.

Also rm ~/.local/bin/claude && pnpm install -g @anthropic-ai/claude-code

mitigates it

ajimix · 1 year ago
@ajimix @arusso which shells do you use? In my case it's fish, so it's strange to have zsh related error. Also rm ~/.local/bin/claude && pnpm install -g @anthropic-ai/claude-code mitigates it

I also have fish

Reverting to v1.0.51 fixes the issue

ewindisch · 12 months ago

<img width="829" height="653" alt="Image" src="https://github.com/user-attachments/assets/d042cb76-cf4d-4bdc-a75e-babaecae488a" />

Based on this analysis, it looks like starting a new claude-code instance may delete "stale" lock files which may be determined by the age of lock files without checking if a session is still active.

arusso · 12 months ago
@ajimix @arusso which shells do you use? In my case it's fish, so it's strange to have zsh related error. Also rm ~/.local/bin/claude && pnpm install -g @anthropic-ai/claude-code mitigates it

I'm running zsh.

ajimix · 12 months ago
Based on this analysis, it looks like starting a new claude-code instance may delete "stale" lock files which may be determined by the age of lock files without checking if a session is still active.

for me it happens only with a single running instance. I tested restarting my mac, starting claude and after some seconds (not always the same amount of seconds) it crashes, even without doing a single prompt. The only way I managed to fix it is to revert to version 1.0.51

0xdeafbeef · 12 months ago
file:///home/user/.local/share/pnpm/global/5/.pnpm/@anthropic-ai+claude-code@1.0.52/node_modules/@anthropic-ai/claude-
GFS4: `),console.error(A)};if(!I5[DZ]){if(nj1=global[DZ]||[],EpA(I5,nj1),I5.close=function(A){function B(Q,D){return A.(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/user/.claude/shell-snapshots/snapshot-zsh-1752657596985-8rx0v4.sh.lock'] {
  errno: -2,
  code: 'ECOMPROMISED',
  syscall: 'stat',
  path: '/home/user/.claude/shell-snapshots/snapshot-zsh-1752657596985-8rx0v4.sh.lock'
}

Node.js v22.17.0

pnpm install also failed

 claude --version
1.0.53 (Claude Code)
deeptshuk · 12 months ago

Did we get any resolution for this issue?
If I revert back to 1.0.51, it is not able to run shell commands for me. Although it doesn't crash, still it is mentioning that the ~/.claude/shell-snapshots/snapshot-zsh-1752767241610-b5v5cp.sh.lock is not available

umihico · 12 months ago

I think #3580 is the same and now latest 1.0.55 fixed this as they mentioned there.

0xdeafbeef · 12 months ago
I think #3580 is the same and now latest 1.0.55 fixed this as they mentioned there.

I've installed 1.0.56 native and it still crashes,

this time with

Error: zsh:source:1: no such file or directory:
     /home/user/.claude/shell-snapshots/snapshot-zsh-1753105122306-mnjnbp.sh

npm version is ok

ashwin-ant collaborator · 10 months ago

Are people still encountering this?

ewindisch · 10 months ago
Are people still encountering this?

I can't speak for others, but it seems resolved on my end.

0xdeafbeef · 10 months ago

seems to be fixed

github-actions[bot] · 10 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.