# --append-subagent-system-prompt Flag

> It adds your text to the prompt of each subagent.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** claude --append-subagent-system-prompt, --append-subagent-system-prompt-file

## Think of it like

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

## 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

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.

## 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.

## Why it matters

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

## Common mistake

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

## Three principles

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

## Related terms

- [--append-system-prompt Flag](https://learn.benibix.com/term/ai/append-system-prompt-flag)
- [Subagent](https://learn.benibix.com/term/ai/subagent)
- [Built-in Subagents](https://learn.benibix.com/term/ai/built-in-subagents)

## Taught in

- [System Prompt Flags](https://learn.benibix.com/learn/ai-claude-code-commands/system-prompt-flags): Claude Code Commands, 16/17

---

Source: https://learn.benibix.com/term/ai/append-subagent-system-prompt-flag
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
