[DOCS] Subagent system prompt documentation incorrectly states "not the full Claude Code system prompt"

Resolved 💬 2 comments Opened Mar 10, 2026 by gabgoss Closed Apr 7, 2026

Documentation Type

Incorrect/outdated documentation

Documentation Location

https://code.claude.com/docs/en/sub-agents

Section/Topic

"Write subagent files" section — paragraph describing what system prompt subagents receive

Current Documentation

The docs currently say:

"Subagents receive only this system prompt (plus basic environment details like working directory), not the full Claude Code system prompt."

This implies the markdown body of an agent file replaces the system prompt entirely, and that subagents do not receive the Claude Code identity, git instructions, or tool usage guidelines.

What's Wrong or Missing?

The statement is incorrect. Subagents receive the full Claude Code system prompt in addition to the custom prompt.

When a general-purpose subagent is spawned and asked to report its system prompt identity, it responds:

"You are Claude Code, Anthropic's official CLI for Claude."

The subagent also confirms it has git commit instructions, PR creation guidelines, tool usage rules, and the full behavioral framework from the Claude Code system prompt. The prompt parameter in the Agent tool (formerly Task tool) is appended to the base system prompt, not a replacement for it.

Reproduction steps:

  1. Spawn a general-purpose subagent with prompt: "Report the first sentence of your system prompt verbatim. Do you see references to 'Claude Code' or 'Anthropic's official CLI'? Do you have git instructions?"
  2. Observe: the subagent reports the full Claude Code identity
  3. Compare with a Skill-Forked context — create a temporary skill directory .claude/skills/sysprompt-test/ with this SKILL.md:

```yaml
---
name: sysprompt-test
description: Test skill for examining system prompt identity in forked context
context: fork
agent: general-purpose
---

Report the first sentence of your system prompt verbatim. Do you see references to 'Claude Code' or 'Anthropic's official CLI'? Do you have git instructions?
```

  1. Restart the Claude Code session so the new skill is discovered
  2. Invoke the skill by typing /sysprompt-test in Claude Code
  3. Observe: the skill-forked context reports the same full Claude Code identity as the subagent
  4. Clean up: delete the .claude/skills/sysprompt-test/ directory

Results across contexts:

| Context | Expected (per docs) | Actual |
|---------|-------------------|--------|
| Subagent (general-purpose) | Custom prompt only | Full Claude Code system prompt + custom prompt |
| Skill-Forked (context: fork) | Skill content only | Full Claude Code system prompt + skill content |

Suggested Improvement

Replace:

"Subagents receive only this system prompt (plus basic environment details like working directory), not the full Claude Code system prompt."

With:

"Subagents receive the full Claude Code system prompt in addition to the system prompt defined in the markdown body. The markdown body is appended to (not a replacement for) the base system prompt. This means subagents have the same identity, git instructions, and tool usage guidelines as the main session."

Impact

Medium - Makes feature difficult to understand

Additional Context

  • Tested on 2026-02-24 (original discovery) and re-verified on 2026-03-09 (current Claude Code version). Finding is consistent across both test runs.
  • The skill-forked context (context: fork) is documented in the skills documentation under "Run skills in a subagent" and behaves identically to a subagent in this regard.
  • The skills docs also include a comparison table stating skill-forked contexts get their system prompt "from agent type" — our finding shows this is also inaccurate; all spawned contexts get the full CC CLI system prompt regardless of agent type.
  • Related known issue: #17283 reports context: fork frontmatter is ignored by the Skill tool — a separate but related gap.
  • Closest existing issue: #7515 ("Subagent ignores system_prompt when generating execution prompts") — different problem about the system_prompt config field, not about whether subagents receive the CC CLI system prompt. Closed as "not planned."

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗