{"version":"2.1.287","anchor":"background-shell-reservation-can-block-run-in-background","canonical_anchor":"background-shell-reservation-can-block-run-in-background","heading":"Background agents and background commands can now be refused","tier":"notice","area":"Bash Tool","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.287\/e\/background-shell-reservation-can-block-run-in-background","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.287","markdown":"### Background agents and background commands can now be refused\n\nBackground agents and background Bash commands gain new refusal paths, new wording for the model, and per-agent ownership on remote hosts\n\n**Unclear.** It is not settled that this only affects remote sessions, or what the limit is.\n\n**What**\n\nA background agent or command keeps running while Claude carries on with other work. Claude asks for this with `run_in_background`. This release adds several ways such a request can be turned down, and new wording about it:\n\n- Bash: for a `run_in_background` command, Claude Code now asks for a background shell reservation (`remoteCall.backgroundShells.reserve()`). If that returns a message, the call is blocked with error code 12.\n\n- Agent tool parameter: the `run_in_background` parameter of the Agent tool, which starts a subagent (a helper Claude that works on a side task), now takes its description from a setting (`parameterDescription`). It is left out when background tasks are disabled. The agent launcher also has a new check on background launches.\n\n- Agent tool wording: a new version of the Agent tool description says a subagent runs in the background only if `run_in_background: true` is passed, and that even then it may run in the foreground or be refused. A matching \"Background agents\" usage note was added. The Agent tool description captured under this release is unchanged at 7,081 characters, so this wording was not seen in use.\n\n- Launch refusals: a new rule can refuse background agents with \"Background agents cannot be started in this session right now. Run the agent without run_in_background.\" Resuming an agent in the background can fail with \"This agent cannot be resumed in the background in this session. Start a new agent instead.\"\n\n- Comment agents: a background agent working on an artifact comment is denied starting subagents, monitors, background commands or scheduled work, with a message saying \"This comment thread is your only job\". If it finishes after launching refused work, it is engaged again.\n\n- Remote hosts: background commands started on a remote host are now tracked per agent. Using a task or shell id that this agent did not start on that host fails with \"No background command with that ID was started on\".\n\n- Fleet view: typing `\/stop` in the fleet-view peek now stops the session.\n\n**Why**\n\nBackground work can now be limited per session and per agent. If Claude reports that a background agent or command was refused, running it in the foreground is the way forward, as the messages themselves suggest.\n\n- Area: Bash Tool\n- Names: `run_in_background`\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 4\/5"}