Background Bash tasks are killed at an undocumented time limit, interrupting long-running jobs
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!
3 Comments
This seems to be new in .285: https://code.claude.com/docs/en/changelog#2-1-285
This has cost me hours of potential work wasted when a background task for monitoring and queuing jobs kept ending unexpectedly.
please remove this limit, it made long running jobs unuseable