Skip to content

[BUG] Maximum call stack exceeded #16368

Open

Description

@vjeux

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • 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

Additional Information

bug.txt

Activity

  1. added
    bugSomething isn't working
    on Jan 5, 2026
  2. mrtwebdesign commented on Jan 8, 2026

    @mrtwebdesign

    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

  3. markovejnovic commented on Jan 8, 2026

    @markovejnovic

    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.

    $ claude --version
    2.1.1 (Claude Code)
    

    on

    Darwin 25.2.0 arm64 arm
    
  4. markovejnovic commented on Jan 8, 2026

    @markovejnovic

    @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 #16760

  5. self-assigned this
    on Jan 19, 2026
  6. wolffiex commented on Jan 27, 2026

    @wolffiex
    Collaborator

    If anyone manages to repro this with --debug turned on, I'd love to see the log

  7. vjeux commented on Jan 27, 2026

    @vjeux
    Author

    @wolffiex dm'd you on twitter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:corebugSomething isn't workinghas reproHas detailed reproduction stepsplatform:macosIssue specifically occurs on macOS

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions