Sub-agents should inherit parent's CLAUDE.md instructions

Resolved 💬 3 comments Opened Mar 15, 2026 by kjb0787 Closed Apr 12, 2026

Summary

Sub-agents spawned via the Agent tool do not load ~/.claude/CLAUDE.md or project-level CLAUDE.md files. This means global user preferences are silently ignored by sub-agents.

Problem

Users configure ~/.claude/CLAUDE.md with rules they expect to apply universally — e.g., "always use a virtual environment for Python," "prefer built-in tools over CLI equivalents," "never install packages globally." These rules work in the main session but are invisible to sub-agents, which start with a fresh context.

Current workarounds are all poor:

  • Manually adding "read CLAUDE.md" to every agent prompt — fragile, depends on the parent session remembering
  • Project-level CLAUDE.md — not transferable, must be duplicated in every project
  • Spawning full Claude sessions in tmux instead of using agents — loses structured agent/parent communication

Proposed Solution

Sub-agents should automatically load ~/.claude/CLAUDE.md (and any project-level CLAUDE.md) into their context at launch, the same way the main session does. This could be:

  1. Automatic injection of CLAUDE.md contents into the sub-agent's system prompt
  2. A flag like --inherit-claude-md (defaulting to on)
  3. At minimum, a documented best practice for how to ensure sub-agent compliance

Impact

Every user who has customized their CLAUDE.md and uses sub-agents is affected. The rules they've carefully configured are silently bypassed in sub-agent contexts.

View original on GitHub ↗

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