{"version":"2.1.311","anchor":"subagent-foreground-cap-shortens-bash-auto-background-timeou","canonical_anchor":"subagent-foreground-cap-shortens-bash-auto-background-timeou","heading":"Background shell commands: subagent time cap and clearer messages","tier":"use","area":"Background Agents","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.311\/e\/subagent-foreground-cap-shortens-bash-auto-background-timeou","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.311","markdown":"### Background shell commands: subagent time cap and clearer messages\n\nSubagents' long commands can be moved to the background sooner, and the messages Claude gets about backgrounded or stopped commands are clearer\n\n**Unclear.** Where the subagent cap's value comes from, and whether it always applies, is not known.\n\n**What**\n\nWhen a shell command runs too long, Claude Code moves it to the background so the conversation can continue. A subagent is a helper agent Claude starts to work on part of a task.\n\n- **Subagent cap:** the auto-background timeout now takes a `subagentCapMs` value and applies to subagents as well. Before, only the main agent honoured `CLAUDE_CODE_AUTO_BACKGROUND_TIMEOUT_MS`. Bash and PowerShell results carry a new `subagentCapApplied` field, true when this cap shortened a command's timeout.\n\n- **Backgrounding message:** the message now says \"It is running now: do not start a second copy while it runs\", explains how to stop it, and warns that buffered output can leave the output file empty. When the subagent cap applied, it says the command was moved to the background after running for a number of seconds, instead of citing a timeout.\n\n- **Output seen:** the message also reports whether any output was seen before the timeout (`noOutputSeenAtTimeout`).\n\n- **Stop reasons:** a stopped background command's message can now use an optional `stopExplanation` instead of the fixed stop text. A stop at a deadline gets one.\n\n- **PowerShell:** it passes the subagent cap and forwards progress only under a condition.\n\n**Why**\n\nLong commands run by subagents can move to the background earlier. Claude is told not to launch duplicate copies, such as a second server, and not to read an empty output file as a failure.\n\n- Area: Background Agents\n- Tier: Use it now\n- Useful: 2\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: yes"}