Queue-operation loop causing high CPU and system freezes on Raspberry Pi

Resolved 💬 3 comments Opened Dec 15, 2025 by shanemmattner Closed Dec 18, 2025

Description

Claude Code enters an infinite loop creating queue-operations in the session JSONL file, causing sustained high CPU usage (>100%) that freezes the system.

Environment

  • Claude Code Version: 2.0.64
  • OS: Ubuntu 25.04 (Plucky Puffin)
  • Architecture: aarch64 (Raspberry Pi)
  • Hardware: Raspberry Pi with 8GB RAM

Symptoms

  1. Claude Code process CPU usage spikes to 100%+ and stays there
  2. Session JSONL file exhibits rapid growth (541KB in 30 seconds)
  3. JSONL file contains excessive queue-operation entries (53+ in last 100KB of file)
  4. System becomes unresponsive/frozen due to sustained high CPU
  5. Issue persists across multiple watchdog checks (9+ consecutive detections)

Evidence

Watchdog monitoring logs showing sustained queue-operation spam:

[2025-12-14 17:27:23] [ALERT] RAPID GROWTH: parallel-giggling-sifakis grew 541.9KB in 30s
[2025-12-14 17:54:26] [ALERT] QUEUE LOOP: parallel-giggling-sifakis has 53 queue-operations (bug detected!)
[2025-12-14 17:55:24] [ALERT] QUEUE LOOP: parallel-giggling-sifakis has 53 queue-operations (bug detected!)
[2025-12-14 17:56:25] [ALERT] QUEUE LOOP: parallel-giggling-sifakis has 53 queue-operations (bug detected!)
[2025-12-14 17:57:25] [ALERT] QUEUE LOOP: parallel-giggling-sifakis has 53 queue-operations (bug detected!)
[2025-12-14 17:58:25] [ALERT] QUEUE LOOP: parallel-giggling-sifakis has 53 queue-operations (bug detected!)
[2025-12-14 17:58:55] [ALERT] QUEUE LOOP: parallel-giggling-sifakis has 53 queue-operations (bug detected!)

Normal sessions have 0-5 queue-operations. This session had 53 in the last 100KB alone.

Impact

  • Severity: High - System becomes completely unresponsive
  • Frequency: Has occurred multiple times, requiring system reboots
  • Workaround: Implemented watchdog script to kill Claude processes when CPU > 80% for 60s or when queue-operation spam detected

Expected Behavior

Claude Code should not enter infinite loops that cause system freezes.

Additional Notes

This appears to be an internal bug in Claude Code's queue/operation handling. The issue may be more pronounced on resource-constrained systems like Raspberry Pi, but the underlying bug likely affects all platforms.

View original on GitHub ↗

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