RangeError: Maximum call stack size exceeded in terminal rendering (noR recursion)
Resolved 💬 5 comments Opened Dec 20, 2025 by birgerlie Closed Dec 24, 2025
Description
Claude Code crashes with a stack overflow error during terminal rendering. The crash occurs in the text wrapping/ANSI escape code handling code, causing infinite recursion.
Error Message
RangeError: Maximum call stack size exceeded.
at DBR (/$bunfs/root/claude:217:3242)
at noR (/$bunfs/root/claude:297:837)
at noR (/$bunfs/root/claude:301:578)
at noR (/$bunfs/root/claude:301:578)
... (repeating)
Symptoms
- Fast scrolling output appears in terminal
- "accept edits" prompt appears with long dash line
- Stack overflow crash
Context
- The
noRfunction appears to be text-wrapping logic that handles ANSI escape codes - It recursively calls itself without hitting a base case under certain conditions
- Likely triggered by specific terminal dimensions, long lines, or unusual escape sequences
Environment
- Claude Code version: 2.0.74
- Platform: macOS (Darwin 25.0.0)
Suggested Fix
The recursive call chain noR → noR → ... needs either:
- A recursion depth guard
- Conversion to iterative approach
- Better base case handling for edge cases
🤖 Generated with Claude Code
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗