{"version":"2.1.328","anchor":"detached-background-agent-re-renders-its-system-prompt-per-m","canonical_anchor":"detached-background-agent-re-renders-its-system-prompt-per-m","heading":"System prompt is rebuilt per model in background and headless sessions","tier":"notice","area":"Sessions","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.328\/e\/detached-background-agent-re-renders-its-system-prompt-per-m","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.328","markdown":"### System prompt is rebuilt per model in background and headless sessions\n\nDetached background agents and headless runs now rebuild the system prompt for each model through a renderSystemPrompt callback\n\n**Unclear.** It is not clear whether a custom or appended system prompt still reaches a session after it is moved to the background.\n\n**What**\n\nThe system prompt is the standing set of instructions Claude Code gives the model. In two places it used to be built once and reused. It is now rebuilt through a `renderSystemPrompt` callback:\n\n- When the main conversation is detached to run in the background, its query now rebuilds the system prompt for each model. Tools are worked out first, and the custom and appended system prompts (`customSystemPrompt` and `appendSystemPrompt`) are no longer passed in this path.\n\n- The headless engine, which runs Claude Code without its interactive screen, now passes a callback that takes the tools, the MCP clients (connections to add-on tool servers) and the model in use, and rebuilds the prompt.\n\n**Why**\n\nThe instructions can now follow a change of model or tools during a session, so a background or headless session may behave differently after a model switch or fallback. If you rely on a custom or appended system prompt, check how a backgrounded session behaves.\n\n- Area: Sessions\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}