Terminal becomes unresponsive when running grep on external SSD

Resolved 💬 3 comments Opened Mar 20, 2026 by steiner385 Closed May 31, 2026

Description

When Claude Code runs a grep command on an external SSD, the terminal hosting Claude Code becomes completely unresponsive/frozen rather than showing the command running in the background while remaining interactive.

Expected behavior

Claude Code should remain responsive while a long-running command executes, showing the command is running and allowing user interaction (like Ctrl+C to cancel).

Actual behavior

The entire terminal freezes and becomes unresponsive. Cannot type, scroll, or interact with the terminal at all.

Environment

  • Claude Code version: 2.1.15
  • OS: Linux 6.17.0-19-generic (Ubuntu)
  • Platform: x86_64
  • Memory: 20GB total

Diagnostic findings

When the issue occurred:

  • One Claude session was consuming 2.4GB RSS memory (unusually high)
  • External SSD showed read bursts of 73MB/s
  • I/O wait spiked from 0.17% to 2.85%
  • Process had 21 threads in "Running" state
  • The session was accessing files on the external SSD mount (/mnt/ssk-ssd/)

Hypothesis

The freeze appears to be caused by one of:

  1. Massive grep output overwhelming terminal buffer
  2. Node.js event loop blocked during I/O operations on slow external storage
  3. Memory pressure from buffering large command output

Steps to reproduce

  1. Start Claude Code in a terminal
  2. Have Claude run a grep command across a large directory on an external SSD
  3. Observe terminal becomes frozen/unresponsive

Workaround

Kill the process from another terminal:

pkill -f "grep.*<pattern>"
# or
kill <claude-pid>

Additional context

  • The frozen session was working with project files on /mnt/ssk-ssd/tony/GitHub/KinDash/
  • Normal behavior would be Claude showing the command running while remaining responsive

View original on GitHub ↗

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