React error #185: Maximum update depth exceeded in CLI

Resolved 💬 3 comments Opened Jan 5, 2026 by TC407-api Closed Jan 8, 2026

Bug Description

Claude Code CLI crashes with React error #185 (Maximum update depth exceeded) during normal operation.

Error Message

Error: Minified React error #185; visit https://react.dev/errors/185 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at UQ (file:///C:/Users/Travi/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:252:16256)
    at Y1 (file:///C:/Users/Travi/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:252:15769)
    at _7 (file:///C:/Users/Travi/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:252:31880)
    at Z9 (file:///C:/Users/Travi/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:252:31479)
    at xA (file:///C:/Users/Travi/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:4674:631)
    at onInput (file:///C:/Users/Travi/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:...)

Environment

  • Claude Code version: 2.0.76
  • OS: Windows 11
  • Node.js: (installed via npm global)
  • Terminal: PowerShell / Windows Terminal

Analysis

React error #185 indicates "Maximum update depth exceeded" - a component is calling setState in a way that triggers an infinite re-render loop. Based on the stack trace, the issue appears to be in the onInput handler, suggesting it may be related to keyboard/input handling in the terminal UI.

Steps to Reproduce

Error occurred during normal CLI usage. Specific trigger unclear but appears related to input handling.

Expected Behavior

CLI should handle input without entering an infinite update loop.

Workarounds Attempted

  • Reinstalling Claude Code
  • Clearing npm cache

Additional Context

The minified error makes debugging difficult. Would be helpful to have source maps or a dev build option for better error tracing.

View original on GitHub ↗

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