Infinite rendering loop causing high CPU and memory growth

Status Fixed / completed
Maintainer reply None cached
Activity 2 comments · opened Oct 16, 2025 · closed Oct 17, 2025

Summary

Claude Code entered an infinite rendering loop causing constant redraws, high CPU usage, and memory growth until requiring SIGKILL termination.

Symptoms

  • Visual: Bottom ~10 lines of terminal constantly blinking/redrawing
  • CPU: 96% sustained usage on single core
  • Memory: Growing from 1.2GB → 2.0GB over 4 hours
  • Unresponsive: Process ignored SIGTERM, required kill -9

System Information

  • OS: Linux 6.8.0-84-generic
  • Claude Code Model: claude-sonnet-4-5-20250929
  • Process Runtime: 4+ hours before forced termination

Context When Bug Occurred

  • Working with file editing operations
  • Git operations (commits/pushes) completed successfully
  • Bug triggered after tool output completion
  • Multiple tools used in sequence (Read, Edit, Bash for git commands)

Process State

State: R (running)
CPU: 96% sustained
Memory: 1.2GB → 2.0GB (growing ~200MB/hour)
Threads: 15
Context Switches: Very high (1M+ voluntary)

Behavior

  • Terminal showed constant redraws of same content
  • No new output generated, just redrawing existing lines
  • Process stuck in UI render loop (not I/O, not computation)
  • Ignored SIGTERM, required SIGKILL

Expected Behavior

  • Output should stabilize after tool completion
  • Process should respond to SIGTERM
  • Memory should remain stable when idle

Impact

  • Instance became unusable
  • High resource consumption
  • Required force kill

Workaround

Force kill with kill -9 <PID> was necessary.

Additional Notes

A second Claude Code instance running concurrently on the same system functioned normally, suggesting the bug is triggered by specific conditions rather than being systemic.

View original on GitHub ↗

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