[Bug] Bash tool lacks resource limits, causing OOM/hang on large file operations

Open 💬 1 comment Opened Jun 23, 2026 by yanggf8

Bug Description
▎ Title: Bash tool can OOM/hang the host (WSL2) — no resource ceiling on a single command

▎ What happened: The agent ran strings over a ~100MB native binary, piped through grep | sort -u (271KB output), to
▎ inspect a CLI. It spiked memory and froze WSL2. After I reported the hang, the agent ran a similar command again and
▎ hung it a second time.

▎ Expected: A single Bash command should not be able to exhaust host memory / freeze the machine. There should be a
▎ memory/output guardrail (cap, sandbox limit, or warning) on heavy commands like strings/grep/find over large files —
▎ especially under WSL2, which shares a memory ceiling with Windows.

▎ Impact: Lost the session / froze the machine twice during normal use.

Environment Info

  • Platform: linux
  • Terminal: ssh-session
  • Version: 2.1.186
  • Feedback ID: f6cdac18-2d63-4c23-8381-59e7192b8085

Errors

[]

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗