{"version":"2.1.285","anchor":"background-bash-tasks-get-a-time-deadline-and-can-be-disable","canonical_anchor":"background-bash-tasks-get-a-time-deadline-and-can-be-disable","heading":"Background shell commands now stop after a time limit","tier":"notice","area":"Bash Tool","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.285\/e\/background-bash-tasks-get-a-time-deadline-and-can-be-disable","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.285","markdown":"### Background shell commands now stop after a time limit\n\nCommands run in the background now stop after 30 minutes by default, up to 2 hours with a longer timeout, and Claude is told to restart them\n\n**Unclear.** It is not clear what switches these off or whether the time limit applies to everyone.\n\n**What**\n\nClaude 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:\n\n- `timeout` with `run_in_background` sets how long the command may run in the background. The default is 1800000 ms (30 minutes) and the maximum is 7200000 ms (2 hours).\n\n- 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_background` and a longer timeout.\n\n- The Bash and PowerShell tool descriptions now say that `timeout` on 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 a `backgroundedByTurnAbort` field.\n\n- The session state gains `backgroundTasksDisabled`, `backgroundDeadlineDisabled` and `unsandboxedCommandsDisabled`, 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.\n\n**Why**\n\nLong-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.\n\n- Area: Bash Tool\n- Names: `timeout`\n- Tier: You'll notice\n- Useful: 4\/5\n- Signal: 2\/5"}