Background Bash tasks are killed at an undocumented time limit, interrupting long-running jobs

Status Open
Maintainer reply None cached
Activity 3 comments · opened Sep 29, 2026

When running long background shell commands via the Bash tool (run_in_background: true), in our case delegated coding and audit jobs driven by another CLI agent that routinely take 30–60+ minutes, Claude Code stops them once they reach a background time limit, reporting only that the command "was stopped after reaching its background time limit". We never set a timeout, the limit does not appear to be documented, and there is no warning beforehand, so work is interrupted mid-run (we only recovered because the external tool happens to persist its session to disk). It would help a lot to (1) document the limit, (2) make it configurable or disableable per command or in settings, and (3) warn before stopping a task rather than after. Thanks for considering this!

View original on GitHub ↗

3 Comments

lfrancke · 14 days ago

This seems to be new in .285: https://code.claude.com/docs/en/changelog#2-1-285

Changed background Bash and PowerShell commands to stop after a time limit (their timeout with run_in_background, default 30 min, max 2 h); Claude is notified when one is stopped
Carasibana · 12 days ago

This has cost me hours of potential work wasted when a background task for monitoring and queuing jobs kept ending unexpectedly.

weathon · 7 days ago

please remove this limit, it made long running jobs unuseable