[BUG] Claude Code's Bash execution waits forever with no processes running

Resolved 💬 3 comments Opened May 28, 2026 by gee42 Closed Jul 13, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When Claude Code executes my automated tests, occasionally it would hang waiting for a process to finish, even though the process has already finished.

What Should Happen?

Claude Code should detect that the process is no longer running and stop waiting for it to finish.

Error Messages/Logs

● Bash(PATH="/home/gee/.npm-global/bin:$PATH" timeout 180 .venv/bin/pytest -m "not slow and not external and not smoke" -q --tb=short 2>&1 | tail -40)
  ⎿  Waiting…

✽ Infusing… (1h 57m 55s · ↓ 153.5k tokens)
  ⎿  Tip: Use /clear to start fresh when switching topics and free up context

Steps to Reproduce

Exact steps are unknown.
The issue happens occasionally while Claude Code tries to run the automated test suite using the command shown in the Error Messages/Logs window.

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.153 (Claude Code)

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

WSL (Windows Subsystem for Linux)

Additional Information

● Update(tests/test_title_filter.py)
⎿  Added 1 line
2008
2009 # ── CHANGE 3a — launch log message ───────────────────────────────────────────
2010
2011 +@pytest.mark.timeout(15)
2012 def test_title_filter_run_logs_info_started(tmp_path, caplog):
2013 """title_filter.run() emits an INFO 'started'/'launched' message via its module logger."""
2014 import logging

● All edits complete. Now running the fast test suite to validate:

● Bash(timeout 180 PATH="/home/gee/.npm-global/bin:$PATH" .venv/bin/pytest -m "not slow and not external and not smoke" -q --tb=short 2>&1 | tail -40)
⎿  timeout: failed to run command ‘PATH=/home/gee/.npm-global/bin:/home/gee/.npm-global/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt
/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files/dotnet/:/mnt/c/Program Files/Git/
cmd:/mnt/c/Users/gabor/AppData/Local/Microsoft/WindowsApps:/mnt/c/Oracle/instantclient_23_7’: No such file or directory

● Bash(PATH="/home/gee/.npm-global/bin:$PATH" timeout 180 .venv/bin/pytest -m "not slow and not external and not smoke" -q --tb=short 2>&1 | tail -40)
⎿  Waiting…

✽ Infusing… (1h 57m 55s · ↓ 153.5k tokens)
⎿  Tip: Use /clear to start fresh when switching topics and free up context

------------------------------------------------------------------------------------------

● Update(tests/test_title_filter.py)
⎿  Added 1 line
2008
2009 # ── CHANGE 3a — launch log message ───────────────────────────────────────────
2010
2011 +@pytest.mark.timeout(15)
2012 def test_title_filter_run_logs_info_started(tmp_path, caplog):
2013 """title_filter.run() emits an INFO 'started'/'launched' message via its module logger."""
2014 import logging

● All edits complete. Now running the fast test suite to validate:

● Bash(timeout 180 PATH="/home/gee/.npm-global/bin:$PATH" .venv/bin/pytest -m "not slow and not external and not smoke" -q --tb=short 2>&1 | tail -40)
⎿  timeout: failed to run command ‘PATH=/home/gee/.npm-global/bin:/home/gee/.npm-global/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt
/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files/dotnet/:/mnt/c/Program Files/Git/
cmd:/mnt/c/Users/gabor/AppData/Local/Microsoft/WindowsApps:/mnt/c/Oracle/instantclient_23_7’: No such file or directory

● Bash(PATH="/home/gee/.npm-global/bin:$PATH" timeout 180 .venv/bin/pytest -m "not slow and not external and not smoke" -q --tb=short 2>&1 | tail -40)
⎿  Waiting…

✶ Infusing… (2h 1m 29s · ↓ 153.5k tokens)
⎿  Tip: Use /clear to start fresh when switching topics and free up context

---------------------------------------------------------------------
gee@DESKTOP-KTAKTEC:~/projects/job-monitor$ ps aux | grep -E "pytest|playwright|chromium|python" | grep -v grep
gee@DESKTOP-KTAKTEC:~/projects/job-monitor$ ps -ef f
UID PID PPID C STIME TTY STAT TIME CMD
root 1 0 0 May26 ? Ss 0:07 /sbin/init
root 2 1 0 May26 hvc0 Sl+ 0:00 /init
root 8 2 0 May26 hvc0 Sl+ 0:01 \_ plan9 --control-socket 7 --log-level 4 --server-fd 8 --pipe-fd 10 --log-truncate
root 412 2 0 May26 ? Ss 0:00 \_ /init
root 414 412 0 May26 ? S 0:00 | \_ /init
gee 416 414 0 May26 pts/0 Ss+ 0:00 | \_ -bash
root 417 2 0 May26 ? Ss 0:00 \_ login -- gee
gee 508 417 0 May26 pts/1 Ss+ 0:00 | \_ -bash
root 4703 2 0 May26 ? Ss 0:00 \_ /init
root 4704 4703 0 May26 ? S 0:22 | \_ /init
gee 4706 4704 0 May26 pts/2 Ss 0:00 | \_ -bash
gee 43657 4706 12 02:10 pts/2 Sl+ 75:15 | \_ claude
root 14258 2 0 May26 ? Ss 0:00 \_ /init
root 14259 14258 0 May26 ? S 0:00 | \_ /init
gee 14261 14259 0 May26 pts/3 Ss 0:00 | \_ -bash
gee 44601 14261 0 11:49 pts/3 R+ 0:00 | \_ ps -ef f
root 20814 2 0 May27 ? Ss 0:00 \_ /init
root 20816 20814 0 May27 ? S 0:00 \_ /init
gee 20819 20816 0 May27 pts/4 Ss+ 0:00 \_ -bash
root 58 1 0 May26 ? Ss 0:05 /usr/lib/systemd/systemd-journald
root 106 1 0 May26 ? Ss 0:16 /usr/lib/systemd/systemd-udevd
_rpc 121 1 0 May26 ? Ss 0:00 /usr/sbin/rpcbind -f -w
avahi 151 1 0 May26 ? Ss 0:41 avahi-daemon: running [DESKTOP-KTAKTEC.local]
avahi 156 151 0 May26 ? S 0:00 \_ avahi-daemon: chroot helper
message+ 153 1 0 May26 ? Ss 0:01 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
root 197 1 0 May26 ? Ss 0:01 /usr/lib/systemd/systemd-logind
root 238 1 0 May26 ? Ssl 3:39 /usr/bin/containerd
root 287 1 0 May26 ? Ss 0:00 /usr/sbin/cron -f
root 289 1 0 May26 ? Ss 0:00 /usr/sbin/blkmapd
root 291 1 0 May26 ? Ssl 0:44 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
root 293 1 0 May26 tty1 Ss+ 0:00 /sbin/agetty -o -- \u --noreset --noclear - linux
gee 442 1 0 May26 ? Ss 0:00 /usr/lib/systemd/systemd --user
gee 451 442 0 May26 ? S 0:00 \_ (sd-pam)
gee 10138 442 0 May26 ? Ss 0:00 \_ /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
gee@DESKTOP-KTAKTEC:~/projects/job-monitor$ claude --version
2.1.153 (Claude Code)

View original on GitHub ↗

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