[Bug] Crashes whiles working in latest version

Resolved 💬 3 comments Opened Dec 30, 2025 by wfranco-dspot Closed Jan 2, 2026

Bug Description
Last version is crashing constantly.

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 2.0.76
  • Feedback ID: ac26e3f9-982d-48c9-b1ca-4df0ba2dc681

Errors

v22.14.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:4591
`}var yY7,_W9="IMPORTANT: Assist with authorized security testing, defensive security, CTF challenges, and educational contexts. Refuse requests for destructive techniques, DoS attacks, mass targeting, supply chain compromise, or detection evasion for malicious purposes. Dual-use security tools (C2 frameworks, credential testing, exploit development) require clear authorization context: pentesting engagements, CTF competitions, security research, or defensive use cases.",bY7="Claude Opus 4.5",fY7="claude-opus-4-5-20251101",R99="You are an agent for Claude Code, Anthropic's official CLI for Claude. Given the user's message, you should use the tools available to complete the task. Do what has been asked; nothing more, nothing less. When you complete the task simply respond with a detailed writeup.";var zd=O(()=>{n5();NK();K2();in1();UT();wV();P0A();u6();z$A();Tw();BD();mZ();yb();$T();PHA();F8();NY();C8();o0();yY7={low:45,medium:75,high:99}});import{randomUUID as PW9}from"crypto";function Z91(A){let Q={},B=process.env.CLAUDE_CODE_EXTRA_BODY,G={};if(B)try{let Y=R5(B);if(Y&&typeof Y==="object"&&!Array.isArray(Y))G=Y;else k(`CLAUDE_CODE_EXTRA_BODY env var must be a JSON object, but was given ${B}`,{level:"error"})}catch(Y){k(`Error parsing CLAUDE_CODE_EXTRA_BODY: ${Y instanceof Error?Y.message:String(Y)}`,{level:"error"})}let Z={...Q,...G};if(A&&A.length>0)if(Z.anthropic_beta&&Array.isArray(Z.anthropic_beta)){let Y=Z.anthropic_beta,J=A.filter((X)=>!Y.includes(X));Z.anthropic_beta=[...Y,...J]}else Z.anthropic_beta=A;return Z}function WD1(A){if(F0(process.env.DISABLE_PROMPT_CACHING))return!1;if(F0(process.env.DISABLE_PROMPT_CACHING_HAIKU)){let Q=UK();if(A===Q)return!1}if(F0(process.env.DISABLE_PROMPT_CACHING_SONNET)){let Q=CM();if(A===Q)return!1}if(F0(process.env.DISABLE_PROMPT_CACHING_OPUS)){let Q=H1A();if(A===Q)return!1}return!0}function WfA(){return pG("prompt_cache_1h_experiment","use_1h_cache",!1)?{type:"ephemeral",ttl:"1h"}:{type:"ephemeral"}}function dY7(A,Q,B){return}function Ja(){let A=Ug(),Q=Y3()?.accountUuid??"",B=h0();return{user_id:`user_${A}_account_${Q}_session_${B}`}}async function St2(A,Q){if(Q)return!0;try{let B=UK(),G=qC(B);return await ay2(d71(()=>oC({apiKey:A,maxRetries:3,model:B}),async(Z)=>{let Y=[{role:"user",content:"test"}];return await Z.beta.messages.create({model:B,max_tokens:1,messages:Y,temperature:1,...G.length>0?{betas:G}:{},metadata:Ja(),...Z91()}),!0},{maxRetries:2,model:B}))}catch(B){let G=B;if(B instanceof _o)G=B.originalError;if(t(G),G instanceof Error&&G.message.includes('{"type":"error","error":{"type":"authentication_error","message":"invalid x-api-key"}}'))return!1;throw G}}function pY7(A,Q=!1,B){if(Q)if(typeof A.message.content==="string")return{role:"user",content:[{type:"text",text:A.message.content,...B?{cache_control:WfA()}:{}}]};else return{role:"user",content:A.message.content.map((G,Z)=>({...G,...Z===A.message.content.length-1?B?{cache_control:WfA()}:{}:{}}))};return{role:"user",content:A.message.content}}function cY7(A,Q=!1,B){if(Q)if(typeof A.message.content==="string")return{role:"assistant",content:[{type:"text",text:A.message.content,...B?{cache_control:WfA()}:{}}]};else return{role:"assistant",content:A.message.content.map((G,Z)=>({...G,...Z===A.message.content.length-1&&G.type!=="thinking"&&G.type!=="redacted_thinking"?B?{cache_control:WfA()}:{}:{}}))};return{role:"assistant",content:A.message.content}}async function Cd({messages:A,systemPrompt:Q,maxThinkingTokens:B,tools:G,signal:Z,options:Y}){let J;for await(let X of d00(A,async function*(){yield*SW9(A,Q,B,G,Z,Y)}))if(X.type==="assistant")J=X;if(!J)throw Error("No assistant message found");return J}async function*zHA({messages:A,systemPrompt:Q,maxThinkingTokens:B,tools:G,signal:Z,options:Y}){return yield*d00(A,async function*(){yield*SW9(A,Q,B,G,Z,Y)})}function lY7(A){if(!("isLsp"in A)||!A.isLsp)return!1;let Q=EKA();return Q.status==="pending"||Q.status==="not-started"}async function*SW9(A,Q,B,G,Z,Y){if(!zB()&&(await iy("tengu-off-switch",{activated:!1})).activated&&UZA(Y.model)){n("tengu_off_switch_query",{}),yield cY0(Error(y2A),Y.model);return}let J=x4()==="bedrock"&&Y.model.includes("application-inference-profile")?await IrA(Y.model)??Y.model:Y.model;_G("query_tool_schema_build_start");let X=wiQ(Y.model,Y.sdkBetas),I=rv(),W=I?UiQ():null;if(W&&x4()!=="bedrock"){if(!X.includes(W))X.push(W)}let K=await Promise.all(G.map((wA)=>HX1(wA,{getToolPermissionContext:Y.getToolPermissionContext,tools:G,agents:Y.agents,model:Y.model,betas:X,deferLoading:I&&(wA.isMcp===!0||lY7(wA))})));if(I){let wA=G.filter((zA)=>zA.isMcp).length;k(`Tool search enabled: ${wA} MCP tools will be deferred`)}_G("query_tool_schema_build_end"),n("tengu_api_before_normalize",{preNormalizedMessageCount:A.length}),_G("query_message_normalization_start");let V=GJ(A,G);_G("query_message_normalization_end"),n("tengu_api_after_normalize",{postNormalizedMessageCount:V.length});let H=czB(V);Q=[pzB(H),K11({isNonInteractive:Y.isNonInteractiveSession,hasAppendSystemPrompt:Y.hasAppendSystemPrompt}),...Q,jW9(Y.mcpTools)].filter(Boolean),my2(Q);let D=Y.enablePromptCaching??WD1(Y.model),F=nY7(Q,D),E=X.length>0,z=[...K,...Y.extraToolSchemas??[]],$=HD()?{systemPrompt:Q.join(`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

RangeError: Maximum call stack size exceeded
(Use `node --trace-uncaught ...` to show where the exception was thrown)

View original on GitHub ↗

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