Shell becomes unresponsive after long-running background command completes

Resolved 💬 3 comments Opened Apr 7, 2026 by devasur Closed Apr 10, 2026

Summary

After a long-running aws s3 cp command (~300s, ~668MB download with timeout: 300000), all subsequent Bash tool calls failed silently — including trivial commands like echo hello and whoami. The shell never recovered within the session.

Steps to Reproduce

  1. Run a long-running Bash command with a high timeout (e.g. aws s3 cp ... --profile ... downloading ~668MB, timeout: 300000)
  2. Command completes and returns output (persisted-output, showing S3 progress lines)
  3. Attempt any subsequent Bash command — even echo hello or whoami

Observed Behavior

Every Bash tool call after the long-running command fails with:

  • Exit code 1 or 2
  • No stdout or stderr output at all
  • Affects all commands regardless of complexity (tested: echo, whoami, pwd, ls, stat, file, test)

The first post-download command was tar -xzf ... -C /tmp/restore-work/ which returned exit code 2 (tar fatal error) with no output. All commands after that also failed with no output — including echo hello.

Expected Behavior

The shell should remain functional after a long-running command completes. Subsequent commands should execute normally.

Environment

  • Claude Code CLI (claude-sonnet-4-6)
  • Platform: Linux 6.17.0-20-generic
  • Shell: bash

Additional Context

  • The download command used timeout: 300000 (5 minutes)
  • The download produced a large persisted-output (180.1KB of S3 progress lines)
  • The session's earlier Bash commands (before the download) worked fine
  • The shell did not recover — even after multiple retries of simple commands across several turns

View original on GitHub ↗

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