Skip to content

Infinite rendering loop causing high CPU and memory growth #9684

Closed

Description

@d33psky

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.

Activity

  1. github-actions commented on Oct 16, 2025

    @github-actions

    Found 3 possible duplicate issues:

    1. [Bug] Multiple Claude Code instances spawning, causing terminal flicker and CPU exhaustion since v2.0.14 #9658
    2. [Bug] High CPU Usage and Persistent Flickering During Execution #9477
    3. [BUG] Thinking throbber gets stuck in infinite refresh loop #9562

    This issue will be automatically closed as a duplicate in 3 days.

    • If your issue is a duplicate, please close it and 👍 the existing issue instead
    • To prevent auto-closure, add a comment or 👎 this comment

    🤖 Generated with Claude Code

  2. github-actions commented on Oct 24, 2025

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  3. locked as resolved and limited conversation to collaborators on Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions