{"version":"2.1.111","anchor":"sdk-subagent-system-prompt-injection","canonical_anchor":"sdk-subagent-system-prompt-injection","heading":"SDK: Subagent System Prompt Injection","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.111\/e\/sdk-subagent-system-prompt-injection","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.111","markdown":"### SDK: Subagent System Prompt Injection\n\n**What**\n\nSDK users can now append custom system prompt content to all Task-tool subagents via a new `appendSubagentSystemPrompt` option.\n\n**Usage**\n\n`\/\/ In SDK session options { appendSubagentSystemPrompt: \"Your custom instructions here\" }` **Details** - The `appendSubagentSystemPrompt` field is propagated to nested subagents automatically - Gated by the `CLAUDE_CODE_ENABLE_APPEND_SUBAGENT_PROMPT` environment variable - Allows SDK consumers to inject additional instructions into every subagent without modifying the main system prompt **Evidence** SDK subagent prompt support (search for `\"appendSubagentSystemPrompt\"`) \u2014 0 occurrences in v2.1.110, 13 in v2.1.111"}