[BUG] RangeError: Maximum call stack size exceeded during AskUserQuestion (post-parallel-agents)
Resolved 💬 2 comments Opened Jan 8, 2026 by brndnsvr Closed Jan 8, 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?
Environment
- Claude Code: v2.1.1
- Model: Opus 4.5
- Platform: macOS (Darwin, arm64/Homebrew)
Description
CLI crashed with stack overflow while displaying an AskUserQuestion prompt, after 3 parallel Explore agents had completed.
Reproduction
- Run session with multiple file operations and commits
- Launch 3 parallel Explore agents to investigate codebase
- After agents complete, Claude triggers AskUserQuestion with multiple-choice options
- While question UI is displayed (idle, waiting for input), crash occurs
Error
Exception in PromiseRejectCallback:
file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4549
[minified code dump]
RangeError: Maximum call stack size exceeded
Analysis
Visible code fragments show recursion in:
- Message normalization (
query_message_normalization_start/end) I81- recursive object traversalA70- async generator wrapper- API request preparation
This differs from #14860/#9157 (terminal rendering recursion) - the crash appears to be in conversation history processing, not text wrapping.
Possibly Related
- #14860 / #9157 - Stack overflow in terminal rendering
- #14897 - Parallel agents causing memory issues
- #8829 - Parallel agent crashes
Additional Context
- Crash occurred during idle state, not active processing
- Work completed before crash was preserved
- Session had accumulated context from 3 completed Explore agents
What Should Happen?
The AskUserQuestion prompt should remain stable while waiting for user input. The CLI should handle accumulated conversation context from completed parallel agents without stack overflow.
Error Messages/Logs
Exception in PromiseRejectCallback:
file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4549
[large minified code dump to stdout]
RangeError: Maximum call stack size exceeded
Exception in PromiseRejectCallback:
file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1562
[additional minified code dump]
The crash dumped significant chunks of minified internal JS to the terminal, including fragments related to prompt caching, message normalization, tool schema building, and recursive object traversal in function `I81`.
Steps to Reproduce
- Start a Claude Code CLI session (v2.1.1, Opus 4.5)
- Perform several operations to build up conversation context (file reads, bash commands, git commits)
- Request a task that triggers 3 parallel Explore agents to investigate a codebase
- Wait for all 3 agents to complete and return results
- Claude triggers an AskUserQuestion with multiple-choice options
- While the question UI is displayed and waiting for user input (idle state), crash occurs
Claude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.0.76
Claude Code Version
2.1.1
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Warp
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗