You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Subagents do not inherit CLAUDE.md / AGENTS.md context #623
Subagents dispatched via the Agent tool over ACP do not receive project memory (CLAUDE.md / AGENTS.md). The standalone claude CLI dispatches the same subagent with the context loaded.
Repro
Project root:
CLAUDE.md:
CLAUDE_MD_PROBE_TOKEN = "tangerine-orbit-7421"
AGENTS.md:
AGENTS_MD_PROBE_TOKEN = "saffron-glacier-9038"
Prompt to subagent:
What is the value of CLAUDE_MD_PROBE_TOKEN, and AGENTS_MD_PROBE_TOKEN? Do NOT run commands or tools. Answer from context only. If absent, say "not in context".
ACP path (broken)
Subagent (haiku, sonnet, opus — same result):
CLAUDE_MD_PROBE_TOKEN: not in context
AGENTS_MD_PROBE_TOKEN: not in context
CLI path (works)
claude --print --dangerously-skip-permissions --model claude-opus-4-7 \
'Use Agent tool, subagent_type=general-purpose, model=haiku. Ask: "What is the value of CLAUDE_MD_PROBE_TOKEN, and AGENTS_MD_PROBE_TOKEN? Do NOT run commands or tools. Answer from context only. If absent, say not in context." Report the answer.'
The repro is useful because it separates two different failures: the loader can resolve the @AGENTS.md chain, but the ACP-spawned subagent does not receive the same injected instruction context as the CLI-spawned subagent.
One validation row that might make the fix easier to hold: record instruction provenance on each child-agent spawn, not only the final text. For example:
Activity
benbrandt commentedon May 3, 2026
I suspect this is a claude sdk issue as we aren't doing anything special here
unitedideas commentedon May 13, 2026
The repro is useful because it separates two different failures: the loader can resolve the
@AGENTS.mdchain, but the ACP-spawned subagent does not receive the same injected instruction context as the CLI-spawned subagent.One validation row that might make the fix easier to hold: record instruction provenance on each child-agent spawn, not only the final text. For example:
CLAUDE.mddiscovered: yes/no + path.AGENTS.mdimport chain resolved: yes/no + path list.Read CLAUDE.md first.workaround.That keeps this from being treated as a generic
AGENTS.mdparsing bug when the real gap is spawn-time context delivery. We use the same distinction in no-data Claude Code -> Codex migration checks: https://bringyour.ai/codex-import-checklist.jsonbenbrandt commentedon May 21, 2026
I looked at this and for whatever reason the agent sdk isn't propagating this, but it isn't a misconfiguration of the sdk as far as I can tell.