[BUG] Bash tool intermittently hangs when reading from FIFOs (named pipes)

Resolved 💬 4 comments Opened Nov 28, 2025 by ndarilek Closed Jan 28, 2026

Environment

  • Claude CLI version: 2.0.53
  • Operating System: Linux 6.12.58 (NixOS)
  • Terminal: gnome-terminal

Bug Description

The Bash tool intermittently hangs when running commands that read from FIFOs (named pipes), even when using timeout. The command executes successfully and returns an exit code, but Claude Code never returns to the conversation.

Steps to Reproduce

  1. Create a FIFO: mkfifo /tmp/test-fifo
  2. Run: timeout 1 cat /tmp/test-fifo > /dev/null 2>&1; echo "Exit: $?"
  3. Repeat several times - the hang is intermittent (occurs roughly 30-50% of the time)

Expected Behavior

  • Command should execute, timeout after 1 second, return exit code 124
  • Claude Code should return to the conversation

Actual Behavior

  • Command executes and returns exit code 124
  • Claude Code hangs indefinitely and must be killed/restarted
  • The hang is intermittent - sometimes it works, sometimes it doesn't

Additional Context

  • The --foreground flag for timeout does NOT reliably fix the issue
  • Running through tmux works reliably as a workaround
  • Possibly related to #10078 (zombie processes) but specifically triggered by FIFOs
  • No orphan cat or timeout processes are left behind after the hang

Workaround

Run FIFO commands through tmux:

tmux new-session -d -s test "timeout 1 cat /tmp/test-fifo > /tmp/out.txt"
sleep 2
cat /tmp/out.txt
tmux kill-session -t test

View original on GitHub ↗

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