Skip to content
BENIBIX Learn

--append-subagent-system-prompt Flag

Also known as claude --append-subagent-system-prompt, --append-subagent-system-prompt-file

It adds your text to the prompt of each subagent.

Think of it like

It is like you give one rule to each helper on the team. The boss is not the only one.

Example

Emma's audit splits work across subagents. She wants every finding to name a file, so she adds that rule to all of them with this flag.

Why it matters

Rules you give the main chat do not reach subagents. This is how they get them.

Definition

--append-subagent-system-prompt adds your text to the end of every subagent's system prompt, nested ones too. A forked subagent is left out, since it reuses the main chat's own prompt. It only works with -p. It needs Claude Code 2.1.205 or later.

Example code

bash
claude -p --append-subagent-system-prompt "Cite file paths in every answer" "Audit the repo"
Give every subagent the same extra rule.

Common mistake

Thinking the plain append flag reaches subagents. It only changes the main chat's prompt.

Key takeaways

  1. 1
    Every subagent. Nested too.
  2. 2
    Not forked ones. They reuse the main prompt.
  3. 3
    -p only. Non-interactive.

Learn it properly