{"version":"2.1.334","anchor":"background-agent-prompt-variant-when-staysforbackgroundagent","canonical_anchor":"background-agent-prompt-variant-when-staysforbackgroundagent","heading":"New guidance on what can run in a background agent after a reply","tier":"notice","area":"Background Agents","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.334\/e\/background-agent-prompt-variant-when-staysforbackgroundagent","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.334","markdown":"### New guidance on what can run in a background agent after a reply\n\nIn some sessions Claude is told background agents suit builds and tests, not servers or watchers, and may stop if the server restarts\n\n**Unclear.** What turns staysForBackgroundAgentAfterReply on is not stated.\n\n**What**\n\nThe system prompt is the set of instructions Claude Code gives the model. A background agent is a helper that keeps working after Claude has replied. The instruction about background agents now has a second version, used when a setting called `staysForBackgroundAgentAfterReply` is on. It tells Claude:\n\n- Work that has an end, such as a build or a test run, can run in a background agent.\n\n- A background agent should not be used to keep a server or a watcher running.\n\n- A restart of the server the session runs on can stop the agent.\n\nWhen the setting is off, Claude gets the earlier single line saying work that must continue after the reply can run in a background agent.\n\n**Why**\n\nThis changes how Claude handles long-running work, so it should avoid relying on a background agent for anything that needs to stay up indefinitely.\n\n- Area: Background Agents\n- Names: `staysForBackgroundAgentAfterReply`\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}