[BUG] Claude Code hangs on startup; sometimes crashes with RangeError: Maximum call stack size exceeded

Resolved 💬 5 comments Opened Dec 19, 2025 by ad1arsh Closed Feb 14, 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?

On Linux, Claude Code doesn't even start or frequently hangs on startup (terminal becomes unresponsive; can’t type). When it does eventually error, it often ends with:

RangeError: Maximum call stack size exceeded

The stack trace seems to indicate recursion in the file logger path (writeFn → appendFileSync → logger → appendFileSync…), suggesting a write/logging failure triggers infinite logging.

I also can't seem to engage with the installer as I get:

curl -fsSL https://claude.ai/install.sh | bash -s latest
Setting up Claude Code...
                                                                                                                                                                                
✘ Installation failed                                                                                                                                                           
                                                                                                                                                                                
Could not install - another process is currently installing Claude. Please try again in a moment.                                                                               
                                                                                                                                                                                
                                                                                                                                                                                
Try running with --force to override checks

What Should Happen?

Claude should start reliably and present the interactive UI promptly. It should allow installation or updates.

Error Messages/Logs

This is the specific trace after a simple claude -p "hi":

// (c) Anthropic PBC. All rights reserved. Use is subject to the Legal Agreements outlined here: https://code.claude.com/docs/en/legal-and-compliance.
 9 | 
10 | // Version: 2.0.73
11 | var a8B=Object.create;var{getPrototypeOf:t8B,defineProperty:EYH,getOwnPropertyNames:u_$}=Object;var g_$=Object.prototype.hasOwnProperty,eA=(H,$,A)=>{for(let L of u_$($))if(!g_$.call(H,L)&&L!=="default")EYH(H,L,{get:()=>$[L],enumerable:!0});if(A){for(let L of u_$($))if(!g_$.call(A,L)&&L!=="default")EYH(A,L,{get:()=>$[L],enumerable:!0});return A}},b=(H,$,A)=>{A=H!=null?a8B(t8B(H)):{};let L=$||!H||!H.__esModule?EYH(A,"default",{value:H,enumerable:!0}):A;for(let I of u_$(H))if(!g_$.call(L,I))EYH(L,I,{get:()=>H[I],enumerable:!0});return L};var N=(H,$)=>()=>($||H(($={exports:{}}).exports,$),$.exports);var H0=(H,$)=>{for(var A in $)EYH(H,A,{get:$[A],enumerable:!0,configurable:!0,set:(L)=>$[A]=()=>L})};var K=(H,$)=>()=>(H&&($=H(H=0)),$);var yhA=N((Zz1,s8B)=>{s8B.exports=require("/$bunfs/root/image-processor.node")});var jhA=N((Pz1,e8B)=>{e8B.exports=require("/$bunfs/root/color-diff.node")});var vhA=N((Yz1,HfB)=>{HfB.exports=require("/$bunfs/root/file-index.node")});var bhA=N((wz1,$fB)=>{$fB.exports=require("/$bunfs/r | ... truncated 
12 | `);D=M[0]||"";for(let G=M.length-1;G>=1;G--){let U=M[G];if(U)yield U}}if(D)yield D}finally{await A.close()}}var $0,$dH,WEB=5,KEB,FEB;var QL=K(()=>{m$();$0=b(require("fs")),$dH=require("fs/promises");KEB={cwd(){return process.cwd()},existsSync(H){return t4("existsSync",()=>$0.existsSync(H))},async stat(H){return $dH.stat(H)},statSync(H){return t4("statSync",()=>$0.statSync(H))},lstatSync(H){return t4("lstatSync",()=>$0.lstatSync(H))},readFileSync(H,$){return t4("readFileSync",()=>$0.readFileSync(H,{encoding:$.encoding}))},readFileBytesSync(H){return t4("readFileBytesSync",()=>$0.readFileSync(H))},readSync(H,$){return t4("readSync",()=>{let A=void 0;try{A=$0.openSync(H,"r");let L=Buffer.alloc($.length),I=$0.readSync(A,L,0,$.length,0);return{buffer:L,bytesRead:I}}finally{if(A)$0.closeSync(A)}})},writeFileSync(H,$,A){return t4("writeFileSync",()=>{let L=$0.existsSync(H);if(!A.flush){let D={encoding:A.encoding};if(!L)D.mode=A.mode??384;else if(A.mode!==void 0)D.mode=A.mode;$0.writeFileSync(H,$,D);return}let I;try{ | ... truncated 

RangeError: Maximum call stack size exceeded.
      at join (unknown:1:1)
      at f (/$bunfs/root/claude:12:27948)
      at write (/$bunfs/root/claude:12:28064)
      at k (/$bunfs/root/claude:14:36)
      at t4 (/$bunfs/root/claude:11:8510)
      at appendFileSync (/$bunfs/root/claude:12:1200)
      at writeFn (/$bunfs/root/claude:12:28553)
      at f (/$bunfs/root/claude:12:27941)
      at write (/$bunfs/root/claude:12:28064)
      at k (/$bunfs/root/claude:14:36)

Steps to Reproduce

Run claude command in the terminal in vscode.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.0.73

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

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