React Error #185: Maximum update depth exceeded when running multiple parallel Task agents
Description
When running 6+ parallel Task tool calls (subagents) simultaneously, Claude Code's terminal UI (React/Ink) crashes with:
\\\\
ERROR Minified React error #185; visit https://react.dev/errors/185
\\
React Error #185 = "Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate."
Steps to Reproduce
- Create a skill that launches 6 parallel Task agents in a single message
- Each Task agent is a \
general-purpose\subagent doing file analysis (Read/Grep/Glob heavy) - All 6 agents produce output simultaneously
- Claude Code UI crashes with the React error
Expected Behavior
Claude Code should handle multiple parallel Task agents without UI crash.
Actual Behavior
The React/Ink terminal UI enters an infinite re-render loop, presumably from too many concurrent state updates from parallel agent outputs.
Environment
- Platform: Windows 10 Pro (WSL2/Git Bash)
- Claude Code: Latest (via Bun)
- Model: claude-opus-4-6
- The crash originates from \
B:/~BUN/root/claude.exe:679\
Workaround
Reducing parallel agent count to 2-3 instead of 6+ appears to avoid the crash. Using \run_in_background: true\ on Task agents may also help.
Suggestion
Consider throttling/batching React state updates from concurrent Task agent outputs, or using \requestAnimationFrame\/\unstable_batchedUpdates\ to coalesce rapid state changes.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗