What
Claude can run a shell command in the background, meaning the command keeps going while the conversation continues. It does this by passing run_in_background to the Bash tool, the tool Claude uses to run terminal commands. Before this release, a background command had no deadline and could only be stopped when the machine ran low on memory. It now has a time limit:
timeoutwithrun_in_backgroundsets how long the command may run in the background. The default is 1800000 ms (30 minutes) and the maximum is 7200000 ms (2 hours).- When the limit is reached, the command is stopped. Its stop reason reads "stopped after reaching its background time limit". Claude is told to restart it with
run_in_backgroundand a longer timeout. - The Bash and PowerShell tool descriptions now say that
timeouton its own applies to a foreground command, one that Claude waits on. The Bash instructions now include the background default and maximum. Tool results also gain abackgroundedByTurnAbortfield. - The session state gains
backgroundTasksDisabled,backgroundDeadlineDisabledandunsandboxedCommandsDisabled, with matching methods to turn each one off. These let background tasks, the background deadline, or unsandboxed commands be disabled for a session. Unsandboxed commands are commands run outside the protective sandbox.
Why
Long-running jobs started in the background, such as dev servers, watchers or long builds, will now be stopped after 30 minutes unless a longer timeout is given. If you rely on a background job running for longer, expect Claude to ask for or set a longer timeout. Nothing can run past 2 hours in one go.
It is not clear what switches these off or whether the time limit applies to everyone.