[BUG] Maximum call stack exceeded
Status Open
Maintainer reply ✓ Yes — wolffiex
Activity 5 comments · opened Jan 5, 2026
💡 Likely answer: A maintainer (wolffiex, collaborator)
responded on this thread — see the highlighted reply below.
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)
- [ ] I am using the latest version of Claude Code
What's Wrong?
I've been using Claude Code in a loop 24/7 for the past 2 weeks and it's been flawless, just encountered my first fatal, wanted to share it so your team knows about it. Note that it's from a version a month old, so may already have been fixed: 2.0.61 (Claude Code).
What Should Happen?
Should not crash
Error Messages/Logs
⏵⏵ accept edits on (shift+tab to cycle)
Exception in PromiseRejectCallback:
file:///usr/local/bin/claude_code/node_modules/@anthropic-ai/claude-code/cli.js:3094
`)||J.includes("**")||J.includes("*"))return;if(X.includes("prompt is too long")||X.includes("context length")||X.includes("token limit"))return;if(X.includes("thanks")||X.includes("thank you")||X.includes("looks good")||X.includes("that worked")||X.includes("that's all"))return;A.toolUseContext.setAppState((W)=>({...W,promptSuggestion:{text:J,shownAt:Date.now()}}));let I=G.totalUsage.input_tokens+G.totalUsage.cache_creation_input_tokens+G.totalUsage.cache_read_input_tokens;QA("tengu_prompt_suggestion_shown",{source:"forked_agent",...I>0&&{cacheHitRate:G.totalUsage.cache_read_input_tokens/I},...!1})}catch(Q){t(Q instanceof Error?Q:Error("Prompt suggestion generation failed"))}}var Px7="tengu_prompt_suggestion",SX1=!1;var _V0=O(()=>{EX1();AB();t2();v0();M0();m1(); // ....
RangeError: Maximum call stack size exceeded
Exception in PromiseRejectCallback:
file:///usr/local/bin/claude_code/node_modules/@anthropic-ai/claude-code/cli.js:3094
`)||J.includes("**")||J.includes("*"))return;if(X.includes("prompt is too long")||X.includes("context length")||X.includes("token limit"))return;if(X.includes("thanks")||X.includes("thank you")||X.includes("looks good")||X.includes("that worked")||X.includes("that's all"))return;A.toolUseContext.setAppState((W)=>({...W,promptSuggestion:{text:J,shownAt:Date.now()}}));let I=G.totalUsage.input_tokens+G.totalUsage.cache_creation_input_tokens+G.totalUsage.cache_read_input_tokens;QA("tengu_prompt_suggestion_shown",{source:"forked_agent",...I>0&&{cacheHitRate:G.totalUsage.cache_read_input_tokens/I},...!1})}catch(Q){t(Q instanceof Error?Q:Error("Prompt suggestion generation failed"))}}var Px7="tengu_prompt_suggestion",SX1=!1;var _V0=O(()=>{EX1();AB();t2();v0();M0();m1(); // ...
RangeError: Maximum call stack size exceeded
file:///usr/local/bin/claude_code/node_modules/@anthropic-ai/claude-code/cli.js:3094
`)||J.includes("**")||J.includes("*"))return;if(X.includes("prompt is too long")||X.includes("context length")||X.includes("token limit"))return;if(X.includes("thanks")||X.includes("thank you")||X.includes("looks good")||X.includes("that worked")||X.includes("that's all"))return;A.toolUseContext.setAppState((W)=>({...W,promptSuggestion:{text:J,shownAt:Date.now()}}));let I=G.totalUsage.input_tokens+G.totalUsage.cache_creation_input_tokens+G.totalUsage.cache_read_input_tokens;QA("tengu_prompt_suggestion_shown",{source:"forked_agent",...I>0&&{cacheHitRate:G.totalUsage.cache_read_input_tokens/I},...!1})}catch(Q){t(Q instanceof Error?Q:Error("Prompt suggestion generation failed"))}}var Px7="tengu_prompt_suggestion",SX1=!1;var _V0=O(()=>{EX1();AB();t2();v0();M0();m1(); // ...
RangeError: Maximum call stack size exceeded
at m$.next (<anonymous>)
at m$ (file:///usr/local/bin/claude_code/node_modules/@anthropic-ai/claude-code/cli.js:3094:7954)
at m$.next (<anonymous>)
at m$ (file:///usr/local/bin/claude_code/node_modules/@anthropic-ai/claude-code/cli.js:3094:7954)
at m$.next (<anonymous>)
at m$ (file:///usr/local/bin/claude_code/node_modules/@anthropic-ai/claude-code/cli.js:3094:7954)
at m$.next (<anonymous>)
at m$ (file:///usr/local/bin/claude_code/node_modules/@anthropic-ai/claude-code/cli.js:3094:7954)
at m$.next (<anonymous>)
at m$ (file:///usr/local/bin/claude_code/node_modules/@anthropic-ai/claude-code/cli.js:3094:7954)
Node.js v24.10.0
Steps to Reproduce
Not really sure what I did. I did close my laptop while it was running, so maybe that triggered it.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.61
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
5 Comments
Me too.
Error Messages/Logs:
file:///Users/matthewtaylor/.nvm/versions/node/v22.17.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:3437
`,isMeta:!0}),...A]}async function t59(A,Q){if(GrQ())return;let[{tools:B},G,Z,Y]=await Promise.all(pI1(A),rz(Q),hV(),OD...
Full data output: [terminal error text.txt
Claude Model
Opus 4.5
Is this a regression?
Don't know
Last Working Version
Don't know
Claude Code Version
2.1.1
Platform
Claude Code Max subscription
Operating System
macOS 15.7.2 (24G325)
Terminal/Shell
zsh
Additional Information
It's a zsh terminal in Cursor 2.2.44
Happened to me too. Note that I did not close the laptop or anything odd. Just left claude to run for a while while churning through a big repo.
on
@mrtwebdesign, based off of the line number, I'm guessing that your issue may be slightly different to the OP's, but feels related.
https://gist.github.com/markovejnovic/2b4b04fbe8f30d9751563b274d8f2307 is all the logs I have.
Your and my issue are closer to https://github.com/anthropics/claude-code/issues/16760
If anyone manages to repro this with --debug turned on, I'd love to see the log
@wolffiex dm'd you on twitter