← Back to context

Comment by stingraycharles

2 days ago

It was my understanding that the subagents have the same system prompt. How do you know that they don’t follow CLAUDE.md directions?

I’ve been using subagents since they were introduced and it has been a great way to manage context size / pollution.

A few youtubers have done deep dives on this, monitoring claude traffic through a proxy. Subagents don't get the system prompt or anything else, they get their subagent prompt and whatever handoff the main agent gives them.

I was on the subagent hype train myself for a while but as my codebases have scaled (I have a couple of codebases up to almost 400k now) subagents have become a lot more error prone and now I cringe when I see them for anything challenging and immediately escape out. They seem to work great with more greenfield projects though.

  • I have a bunch of homegrown CLI tools in my $PATH that are only described in the CLAUDE.md file. My subagents use these tools perfectly as if they have full instructions on their use but no such instructions are in the subagent prompts.

    This should not be possible if they don't have CLAUDE.md in their context.

    My main agent prompt always has a complete ban on the main agent doing any work themselves. All work is done by subagents which they coordinate.

    I've been doing this for 2-3 months now on projects upwards of 200k lines and the results have been incredible.

    I'm very confused how so many of us can have such completely different experiences with these tools.

    • Yes for me the same, I specify using “direnv exec .” as a prefix to every command and the subagents follow this without issue.

      On the Claude Code Reddit communities there’s basically a constant outrage about CC’s performance over the past few months, it seems different people have vastly different experiences with these tools.

      There appears to be a lot of anecdotal evidence everywhere, and not enough hard facts. Anthropic’s lack of transparency how everything works and interacts is at least a factor in this.