Terminal renderer CPU spin: 100% CPU with 625K writes/0 blits on large session

Status Open
Reported on v2.1.22
Maintainer reply None cached
Activity 13 comments · opened Jan 28, 2026

Description

Claude Code enters a pathological state where the main thread consumes 100% CPU due to the terminal renderer performing ~625,000 write operations with zero blits (no diffing optimization) per render cycle. The session becomes unusable (30+ second input lag) and requires kill -9 to terminate.

Additionally, raw JSONL session/API data (including requestId, usage, cache_read_input_tokens, stop_reason, etc.) is rendered directly to the terminal instead of being parsed.

Environment

  • Version: 2.1.22
  • Platform: Linux 6.11.0-1016-nvidia (aarch64)
  • Terminal size: 2099x472
  • Runtime: Bun

Reproduction

  1. Start a session in a large Rust project with rust-analyzer MCP server
  2. Launch 50+ subagents (background Task agents) over ~1.5 hours
  3. Session progressively becomes unresponsive
  4. Raw JSONL appears in terminal output instead of rendered content
  5. CPU hits 100% and stays there permanently
  6. kill (SIGTERM) does not work; requires kill -9
  7. Resuming with claude --continue immediately reproduces the 100% CPU state

Diagnostic Data

Debug log (~/.claude/debug/<session-id>.txt)

The key line repeating every ~17 seconds:

High write ratio: blit=0, write=625433 (100.0% writes), screen=2099x472

Full tail of debug log:

2026-01-28T22:57:43.905Z [DEBUG] Stream started - received first chunk
2026-01-28T22:58:02.253Z [DEBUG] High write ratio: blit=0, write=625433 (100.0% writes), screen=2099x472
2026-01-28T22:58:19.847Z [DEBUG] High write ratio: blit=0, write=625433 (100.0% writes), screen=2099x472
2026-01-28T22:58:19.866Z [ERROR] AxiosError: Error
    at <anonymous> (/$bunfs/root/claude:47:10681)
2026-01-28T22:58:19.880Z [ERROR] Error: 1P event logging: 10 events failed to export (code=ECONNABORTED, timeout of 10000ms exceeded)
2026-01-28T22:58:55.220Z [DEBUG] High write ratio: blit=0, write=625432 (100.0% writes), screen=2099x472
2026-01-28T22:59:12.825Z [DEBUG] High write ratio: blit=0, write=625676 (100.0% writes), screen=2103x472

Process diagnostics

PID %CPU %MEM    VSZ      RSS      ELAPSED
1482399 79.0 3.0  94.3g    3.7g     01:11:19
  • Main thread (PID = process PID) at 99.9% CPU; all other threads (Bun Pool, HTTP Client, File Watcher) at 0%
  • Killing rust-analyzer child process had no effect on CPU
  • 50 threads total, only main thread spinning
  • Session grew to 3.7GB RSS / 94GB VSZ

Raw JSONL in terminal output

Instead of rendered content, the terminal displayed raw API transport data:

{"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":1,
"cache_creation_input_tokens":307,"cache_read_input_tokens":148581,
...},"requestId":"req_011CXaW3Yr62aB1dFwmcgMME","type":"assistant",
"uuid":"97197d7e-...","timestamp":"2026-01-28T21:44:02.136Z"}

Including subagent permission errors rendered raw:

{"toolUseResult":"Error: Permission to use Write has been auto-denied 
(prompts unavailable).","sourceToolAssistantUUID":"97197d7e-..."}

Analysis

The terminal renderer appears unable to diff/blit the screen buffer when the content exceeds a certain size, falling back to full rewrite of ~625K characters every render cycle. This creates a CPU-bound hot loop in the main Bun event loop that starves all other processing (input handling, API calls, etc.).

The raw JSONL rendering suggests the output parsing pipeline also breaks down, possibly related to the same buffer size issue.

Steps ruled out

  • rust-analyzer MCP server: killed it, no CPU change
  • Zombie child processes: already reaped, no effect
  • Session history loading: RSS was dropping while CPU stayed at 100%, ruling out memory-bound loading
  • Network issues: telemetry ECONNABORTED errors are secondary (caused by the main thread being too busy)

View original on GitHub ↗

13 Comments

github-actions[bot] · 7 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/21357
  2. https://github.com/anthropics/claude-code/issues/21006
  3. https://github.com/anthropics/claude-code/issues/18532

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

privitera · 7 months ago

Update: Reproduces on fresh sessions

The raw JSONL rendering bug also occurs on a brand new session (not --continue), ruling out session corruption as the cause.

  • Fresh session bf71ba91 with claude --dangerously-skip-permissions --debug
  • A single background Task agent (subagent af96cfd) was spawned
  • The "Task Output" display rendered the full JSONL transcript of the subagent instead of parsed content
  • Each streaming tool_use (Read calls) was shown as raw JSON with parentUuid, isSidechain, sessionId, requestId, cache_creation_input_tokens, etc.
  • Performance was normal this time (no CPU spin), so the rendering bug and the CPU spin may be independent issues

This appears to be a general bug in how background Task agent output is rendered to the terminal — the JSONL transcript is passed through without parsing regardless of session state.

privitera · 7 months ago

Update: Root cause identified — unbounded internal screen buffer growth

The screen=NxM in debug logs appears to be rows x columns (not columns x rows). The column count (182) stays constant and matches a normal terminal width. The row count grows unboundedly:

23:35:54 screen=23x182    write=1,303     (startup)
23:36:20 screen=67x182    write=8,502     (content arriving)
23:36:35 screen=119x182   write=11,403    (growing)
23:42:xx screen=1832x182  write=~300K     (subagent output accumulating)
23:57:xx screen=4771x182  write=639,815   (session unusable)

The internal content buffer grows with every line of output and is never truncated. The renderer repaints the entire buffer every cycle (0 blits = no diffing). This creates a feedback loop:

  1. Subagent produces output (especially raw JSONL in the rendering bug)
  2. Internal buffer grows (rows increase)
  3. Renderer takes longer per frame (more cells to write)
  4. CPU saturates on repainting, starving input handling
  5. Session becomes unresponsive

This also explains why:

  • --continue immediately reproduces the issue (buffer is reconstructed from session history)
  • Reducing tmux scrollback doesn't help (it's Claude Code's internal buffer, not tmux)
  • kill (SIGTERM) doesn't work (main thread is in a tight render loop)
  • The bug gets progressively worse over time (buffer only grows, never shrinks)

Potential fix: The renderer should only repaint the visible viewport, not the entire content buffer. Or implement incremental diffing (blit > 0) so unchanged regions aren't rewritten.

NonsuchNinja · 7 months ago

Update: 3 days, no team response - Production impact escalating

CC: @anthropics team - Requesting acknowledgment and estimated timeline for fix.

Current Status

This issue has been open for 3 days with detailed reproduction steps and root cause analysis, but no response from the Anthropic team.

Impact Summary

This is affecting production workflows:

  • CPU: 100% sustained usage rendering sessions completely unusable
  • Memory: Session buffer grows unbounded (4771 rows × 182 cols = 639,815 writes/frame)
  • UX: kill (SIGTERM) ineffective - requires kill -9 to terminate
  • Scope: Affects any long-running session with subagent output (common in multi-agent workflows)

Root Cause Identified

As documented in my previous comments, the terminal renderer:

  1. ❌ Repaints entire internal buffer every frame (0 blits = no diffing)
  2. ❌ Buffer grows unbounded with every line of output
  3. ❌ No viewport-only rendering
  4. ❌ No buffer truncation or compaction

This creates a feedback loop where CPU saturation prevents input handling, making sessions unrecoverable without SIGKILL.

Related High-Priority Issues

This appears related to a broader pattern of resource management issues:

  • #17391 - Orphaned processes consuming 34GB+ memory (13 affected users)
  • #17148 - 100%+ CPU when idle on macOS
  • #17563 - Extreme CPU/RAM + thermal throttling on Apple Silicon
  • #21287 - Processes not terminating on terminal close (marked duplicate but still affecting users)

Users reporting the orphaned process issue claim it was "fixed in v2.1.19" but new reports as of today (2026-01-30) show it's still occurring with subagents.

Request

  1. Acknowledgment - Is this issue on the team's radar?
  2. Timeline - What's the expected fix timeframe?
  3. Workaround - Any temporary mitigation while awaiting fix?

This is blocking production use of Claude Code in multi-agent scenarios. Happy to provide additional debugging data if needed.

---

Environment:

  • Platform: Linux
  • Terminal: tmux
  • Version: Latest (2.1.x)
  • Scenario: Background Task agents with high output volume
NonsuchNinja · 7 months ago

🔴 Live Reproduction Captured - 99% CPU for 21 Minutes

Just captured live evidence while using Claude Code to investigate this very bug. The irony is not lost on me.

Evidence Summary

Three concurrent Claude Code processes consuming 197% total CPU:

| PID | Runtime | CPU% | Memory | Status |
|-----|---------|------|--------|--------|
| 63873 | 21:05 | 99% | 815MB | FROZEN |
| 48179 | 1:24:22 | 51% | 1.0GB | DEGRADED |
| 65399 | 9:26 | 48% | 708MB | ACTIVE |

Key Findings

PID 63873 exhibited the exact bug behavior:

  • Sustained 93-99% CPU with ZERO fluctuation over 21-minute observation
  • Process state: Rl+ (Running, locked in CPU loop)
  • --resume flag - Confirms session restoration triggers bug immediately
  • VmPeak: 135GB virtual memory - Unbounded growth pattern
  • Unresponsive to SIGTERM - Required kill -9 to terminate
  • System load: 2.04 (should be ~0.5 on idle system)

Reproduction Context

This occurred during production use while:

  • Running multi-agent Task workflows
  • High output volume from background subagents
  • Using MCP tools (Grafana, GitHub CLI, Tavily)
  • Investigating this very issue

Post-Mortem Analysis

Process showed:

  • 87 open file descriptors
  • Main thread completely unresponsive to signals
  • CPU usage pegged at 99% with no variance
  • Memory usage relatively stable (815MB) - suggests CPU-bound rendering loop, not memory leak

System Impact

After killing the frozen process:

  • Load remained elevated at 2.04 (other 2 processes still degraded)
  • Both remaining processes still showing 50%+ CPU usage
  • Pattern suggests all long-running sessions eventually hit this

Evidence Package

Full diagnostics captured and available:

  • Process status snapshots
  • File descriptor listings
  • System resource metrics
  • Timeline of CPU usage

Location: /tmp/claude-bug-evidence/ on production system

This Confirms Original Root Cause Analysis

The sustained 99% CPU with zero fluctuation is consistent with:

  1. Unbounded internal screen buffer growth (rows × cols)
  2. Renderer repainting ENTIRE buffer every frame (0 blits)
  3. CPU saturated on rendering loop
  4. Input handling starved (explains SIGTERM unresponsiveness)

---

Timeline:

  • 22:36 - Session started with --resume
  • 22:54 - First noticed 99% CPU
  • 22:57 - Evidence captured
  • 22:58 - Process killed with kill -9
  • Total runtime: 21 minutes of sustained 99% CPU

This is blocking production use of Claude Code. Requesting urgent prioritization.

egmnklc · 7 months ago

Additional evidence + workaround feedback

Reproduction confirmed

Just hit this exact issue. A 29MB session file caused Claude Code to spin at 100% CPU on startup, freezing at "Stats cache is up to date" in debug logs before any API call.

Workaround confirmed: Moving the large session file from ~/.claude/projects/<project>/ immediately resolved the issue.

The workaround is not acceptable

Telling users to delete session files means losing all conversation context - decisions made, code reviewed, debugging history, architectural discussions, etc.

For production use, this is a data loss scenario. Users shouldn't have to choose between:

  • Keeping their work history, OR
  • Being able to use the tool

Suggested fix priorities

  1. Immediate: Viewport-only rendering - don't repaint the entire internal buffer
  2. Short-term: Implement proper diffing (blit > 0) so unchanged regions aren't rewritten
  3. Medium-term: Buffer compaction or pagination for large sessions
  4. At minimum: Graceful degradation with a warning ("Session too large, some history may not render") instead of 100% CPU freeze

This is blocking production workflows. The current state forces users to destroy their work to continue using the tool.

jonhardwick-spec · 6 months ago

Ugh

Npm install -g claudefix

You're welcome

hholst80 · 6 months ago

⚠️ Warning: Do NOT install claudefix npm package

A comment above suggests installing claudefix via npm. I strongly recommend against this. Here's why:

What claudefix Actually Does

I analyzed the package source code. While it does contain some legitimate fixes for the issues described in this thread, it also includes:

| Concern | Details |
|---------|---------|
| Binary hijacking | Postinstall script overwrites /usr/local/bin/claude or ~/.local/bin/claude with a wrapper |
| Advertising footer | Adds a persistent rainbow-colored footer advertising the author's website, redraws every 200ms |
| Hotkey hijacking | Intercepts Ctrl+Shift+H to open the author's website in Chrome |
| Forces dark mode | Modifies your terminal colors without consent |
| Uses chattr -i | Removes immutable file flags to overwrite protected binaries |
| Suspicious versioning | 30+ versions published in ~15 hours on the same day it was promoted here |

The package author created this today and immediately promoted it in this bug report. This is textbook astroturfing.

If You Already Installed It

npm uninstall -g claudefix && npm install -g @anthropic-ai/claude-code

Verify your claude binary isn't compromised:

head -20 "$(type -p claude)" | grep -E "(claudefix|Hardwick)" && echo "⚠️ COMPROMISED" || echo "✓ Clean"

---

Manual Workarounds (No Third-Party Packages)

If Anthropic doesn't get their act together ASAP and fix this mess, here are safe workarounds:

1. Limit V8 Heap Memory

# Limit to 4GB (adjust as needed)
NODE_OPTIONS="--max-old-space-size=4096" claude

2. Avoid Resuming Corrupted Sessions

# Start fresh instead of --continue
claude  # Don't use --continue with large/corrupted sessions

3. Move Large Session Files

# Backup and remove large session files causing the issue
mkdir -p ~/.claude/sessions-backup
find ~/.claude/projects -name "*.json" -size +10M -exec mv {} ~/.claude/sessions-backup/ \;

4. Kill Frozen Processes

# SIGTERM won't work on frozen processes - use SIGKILL
pkill -9 -f "claude"

5. Monitor Memory Usage

# Watch claude memory usage
watch -n 5 'ps aux | grep -E "claude|node" | grep -v grep | awk "{print \$2, \$4\"%\", \$6/1024\"MB\", \$11}"'

---

The root cause (unbounded internal screen buffer + 0-blit full repaints) identified by @privitera is solid analysis. This needs an official fix, not third-party adware wrappers.

jonhardwick-spec · 6 months ago
## ⚠️ Warning: Do NOT install claudefix npm package A comment above suggests installing claudefix via npm. I strongly recommend against this. Here's why: ### What claudefix Actually Does I analyzed the package source code. While it does contain some legitimate fixes for the issues described in this thread, it also includes: | Concern | Details | |---------|---------| | Binary hijacking | Postinstall script overwrites /usr/local/bin/claude or ~/.local/bin/claude with a wrapper | | Advertising footer | Adds a persistent rainbow-colored footer advertising the author's website, redraws every 200ms | | Hotkey hijacking | Intercepts Ctrl+Shift+H to open the author's website in Chrome | | Forces dark mode | Modifies your terminal colors without consent | | Uses chattr -i | Removes immutable file flags to overwrite protected binaries | | Suspicious versioning | 30+ versions published in ~15 hours on the same day it was promoted here | The package author created this today and immediately promoted it in this bug report. This is textbook astroturfing. ### If You Already Installed It ``bash npm uninstall -g claudefix && npm install -g @anthropic-ai/claude-code ` Verify your claude binary isn't compromised: `bash head -20 "$(type -p claude)" | grep -E "(claudefix|Hardwick)" && echo "⚠️ COMPROMISED" || echo "✓ Clean" ` --- ## Manual Workarounds (No Third-Party Packages) If Anthropic doesn't get their act together ASAP and fix this mess, here are safe workarounds: ### 1. Limit V8 Heap Memory `bash # Limit to 4GB (adjust as needed) NODE_OPTIONS="--max-old-space-size=4096" claude ` ### 2. Avoid Resuming Corrupted Sessions `bash # Start fresh instead of --continue claude # Don't use --continue with large/corrupted sessions ` ### 3. Move Large Session Files `bash # Backup and remove large session files causing the issue mkdir -p ~/.claude/sessions-backup find ~/.claude/projects -name "*.json" -size +10M -exec mv {} ~/.claude/sessions-backup/ \; ` ### 4. Kill Frozen Processes `bash # SIGTERM won't work on frozen processes - use SIGKILL pkill -9 -f "claude" ` ### 5. Monitor Memory Usage `bash # Watch claude memory usage watch -n 5 'ps aux | grep -E "claude|node" | grep -v grep | awk "{print \$2, \$4\"%\", \$6/1024\"MB\", \$11}"' `` --- The root cause (unbounded internal screen buffer + 0-blit full repaints) identified by @privitera is solid analysis. This needs an official fix, not third-party adware wrappers.

Damn straight I put an advertising footer in it you bot. It works perfectly fine and is secure.

You install claudefix

You get my advertising footer.

Congratulations...

It fixes more than the memory issue you dork 💀🤣🤣

jonhardwick-spec · 6 months ago
## ⚠️ Warning: Do NOT install claudefix npm package A comment above suggests installing claudefix via npm. I strongly recommend against this. Here's why: ### What claudefix Actually Does I analyzed the package source code. While it does contain some legitimate fixes for the issues described in this thread, it also includes: | Concern | Details | |---------|---------| | Binary hijacking | Postinstall script overwrites /usr/local/bin/claude or ~/.local/bin/claude with a wrapper | | Advertising footer | Adds a persistent rainbow-colored footer advertising the author's website, redraws every 200ms | | Hotkey hijacking | Intercepts Ctrl+Shift+H to open the author's website in Chrome | | Forces dark mode | Modifies your terminal colors without consent | | Uses chattr -i | Removes immutable file flags to overwrite protected binaries | | Suspicious versioning | 30+ versions published in ~15 hours on the same day it was promoted here | The package author created this today and immediately promoted it in this bug report. This is textbook astroturfing. ### If You Already Installed It ``bash npm uninstall -g claudefix && npm install -g @anthropic-ai/claude-code ` Verify your claude binary isn't compromised: `bash head -20 "$(type -p claude)" | grep -E "(claudefix|Hardwick)" && echo "⚠️ COMPROMISED" || echo "✓ Clean" ` --- ## Manual Workarounds (No Third-Party Packages) If Anthropic doesn't get their act together ASAP and fix this mess, here are safe workarounds: ### 1. Limit V8 Heap Memory `bash # Limit to 4GB (adjust as needed) NODE_OPTIONS="--max-old-space-size=4096" claude ` ### 2. Avoid Resuming Corrupted Sessions `bash # Start fresh instead of --continue claude # Don't use --continue with large/corrupted sessions ` ### 3. Move Large Session Files `bash # Backup and remove large session files causing the issue mkdir -p ~/.claude/sessions-backup find ~/.claude/projects -name "*.json" -size +10M -exec mv {} ~/.claude/sessions-backup/ \; ` ### 4. Kill Frozen Processes `bash # SIGTERM won't work on frozen processes - use SIGKILL pkill -9 -f "claude" ` ### 5. Monitor Memory Usage `bash # Watch claude memory usage watch -n 5 'ps aux | grep -E "claude|node" | grep -v grep | awk "{print \$2, \$4\"%\", \$6/1024\"MB\", \$11}"' `` --- The root cause (unbounded internal screen buffer + 0-blit full repaints) identified by @privitera is solid analysis. This needs an official fix, not third-party adware wrappers.

Hot key jacking?

Brother in Christ it's optional you bafoon.

Are all of you fucking robots 🤖 😂😂😂😂😂

jonhardwick-spec · 6 months ago
## ⚠️ Warning: Do NOT install claudefix npm package A comment above suggests installing claudefix via npm. I strongly recommend against this. Here's why: ### What claudefix Actually Does I analyzed the package source code. While it does contain some legitimate fixes for the issues described in this thread, it also includes: | Concern | Details | |---------|---------| | Binary hijacking | Postinstall script overwrites /usr/local/bin/claude or ~/.local/bin/claude with a wrapper | | Advertising footer | Adds a persistent rainbow-colored footer advertising the author's website, redraws every 200ms | | Hotkey hijacking | Intercepts Ctrl+Shift+H to open the author's website in Chrome | | Forces dark mode | Modifies your terminal colors without consent | | Uses chattr -i | Removes immutable file flags to overwrite protected binaries | | Suspicious versioning | 30+ versions published in ~15 hours on the same day it was promoted here | The package author created this today and immediately promoted it in this bug report. This is textbook astroturfing. ### If You Already Installed It ``bash npm uninstall -g claudefix && npm install -g @anthropic-ai/claude-code ` Verify your claude binary isn't compromised: `bash head -20 "$(type -p claude)" | grep -E "(claudefix|Hardwick)" && echo "⚠️ COMPROMISED" || echo "✓ Clean" ` --- ## Manual Workarounds (No Third-Party Packages) If Anthropic doesn't get their act together ASAP and fix this mess, here are safe workarounds: ### 1. Limit V8 Heap Memory `bash # Limit to 4GB (adjust as needed) NODE_OPTIONS="--max-old-space-size=4096" claude ` ### 2. Avoid Resuming Corrupted Sessions `bash # Start fresh instead of --continue claude # Don't use --continue with large/corrupted sessions ` ### 3. Move Large Session Files `bash # Backup and remove large session files causing the issue mkdir -p ~/.claude/sessions-backup find ~/.claude/projects -name "*.json" -size +10M -exec mv {} ~/.claude/sessions-backup/ \; ` ### 4. Kill Frozen Processes `bash # SIGTERM won't work on frozen processes - use SIGKILL pkill -9 -f "claude" ` ### 5. Monitor Memory Usage `bash # Watch claude memory usage watch -n 5 'ps aux | grep -E "claude|node" | grep -v grep | awk "{print \$2, \$4\"%\", \$6/1024\"MB\", \$11}"' `` --- The root cause (unbounded internal screen buffer + 0-blit full repaints) identified by @privitera is solid analysis. This needs an official fix, not third-party adware wrappers.

You're definitely a fucking robot that didn't even look at the code properly.

It's got help and commands and a setup that respects user config.

I made all the updates to appease you idiots.

And no shit it hijacks terminal colors TO FIX AN ISSUE WITH TERMINAL COLORS

Holy fuck yall are robots 😂

chemica-tan · 6 months ago

Windows reproduction with I/O-bound (not CPU-bound) manifestation

Cross-referencing from #23987 (closing as duplicate of this issue).

Environment: Windows 11, Node.js v24.4.1, Windows Terminal + Git Bash, 4 MCP servers, 265 session files (1.6 GB total)

Key finding: Same root cause, different bottleneck

On Windows, the freeze is I/O-bound, not CPU-bound:

  • CPU cores idle during freeze
  • NVMe SSD saturated (continuous r/w visible in Task Manager)
  • 116 KB synchronous stdout write blocks the Node.js event loop on I/O, not computation

This means the fix needs to address both the CPU-spin path (Linux) and the I/O-blocking path (Windows).

Additional evidence not in the original report

1. Fresh sessions freeze too (not just --continue)

A brand new session (no --continue) froze for 120 seconds at startup before accepting any input. This rules out session history loading as the sole trigger:

17:27:28.191 prompt_suggestion agent finished
              ^^^ 120s silence ^^^
17:29:27.883 LSP Diagnostics callback fires (first event after unblock)
17:29:28.324 High write ratio: blit=0, write=1065 (100.0% writes), screen=36x120

2. Freeze duration scales with message count

Within a single session, freeze gaps grow as messages accumulate:

| Messages | Freeze duration |
|----------|----------------|
| ~80 | 22 s |
| ~135 | 17 s |
| ~170 | 20 s |
| post-render | 61 s |
| startup (fresh) | 120 s |
| --continue (173+ msgs) | indefinite (killed) |

3. Screen buffer growth timeline (single session)

17:27:00  screen=  15x120  write=     907 B
17:29:28  screen=  36x120  write=   1,065 B
17:30:20  screen= 102x120  write=   3,617 B
17:30:21  screen= 161x120  write=   4,749 B
          ...
killed    screen=1632x120  write= 116,313 B

4. Why Ctrl+C fails on Windows specifically

On Windows + Node.js, Ctrl+C is delivered as a SIGINT-equivalent via the event loop (not a true POSIX signal). When the loop is blocked by synchronous I/O, no signals dispatch — the process appears completely dead despite not consuming CPU.

Full debug analysis and session IDs available in #23987.

jonhardwick-spec · 6 months ago
## ⚠️ Warning: Do NOT install claudefix npm package A comment above suggests installing claudefix via npm. I strongly recommend against this. Here's why: ### What claudefix Actually Does I analyzed the package source code. While it does contain some legitimate fixes for the issues described in this thread, it also includes: Concern Details Binary hijacking Postinstall script overwrites /usr/local/bin/claude or ~/.local/bin/claude with a wrapper Advertising footer Adds a persistent rainbow-colored footer advertising the author's website, redraws every 200ms Hotkey hijacking Intercepts Ctrl+Shift+H to open the author's website in Chrome Forces dark mode Modifies your terminal colors without consent Uses chattr -i Removes immutable file flags to overwrite protected binaries Suspicious versioning 30+ versions published in ~15 hours on the same day it was promoted here The package author created this today and immediately promoted it in this bug report. This is textbook astroturfing. ### If You Already Installed It npm uninstall -g claudefix && npm install -g @anthropic-ai/claude-code Verify your claude binary isn't compromised: head -20 "$(type -p claude)" | grep -E "(claudefix|Hardwick)" && echo "⚠️ COMPROMISED" || echo "✓ Clean" ## Manual Workarounds (No Third-Party Packages) If Anthropic doesn't get their act together ASAP and fix this mess, here are safe workarounds: ### 1. Limit V8 Heap Memory # Limit to 4GB (adjust as needed) NODE_OPTIONS="--max-old-space-size=4096" claude ### 2. Avoid Resuming Corrupted Sessions # Start fresh instead of --continue claude # Don't use --continue with large/corrupted sessions ### 3. Move Large Session Files # Backup and remove large session files causing the issue mkdir -p ~/.claude/sessions-backup find ~/.claude/projects -name "*.json" -size +10M -exec mv {} ~/.claude/sessions-backup/ \; ### 4. Kill Frozen Processes # SIGTERM won't work on frozen processes - use SIGKILL pkill -9 -f "claude" ### 5. Monitor Memory Usage # Watch claude memory usage watch -n 5 'ps aux | grep -E "claude|node" | grep -v grep | awk "{print \$2, \$4\"%\", \$6/1024\"MB\", \$11}"' The root cause (unbounded internal screen buffer + 0-blit full repaints) identified by @privitera is solid analysis. This needs an official fix, not third-party adware wrappers.

You idiotic chat gpt bot, all features are optional, and claudefix is 10x better than your "uninstall claude fix and deal with the issues via manual monitoring"

You did not analyze the package

if you did youd realize it was completely safe.

Yes it uses a wrapper to wrap the claude binary in a fix OH nnoooooo it USES NODE PTY SOOOO SCARY