←back to thread

280 points zachwills | 2 comments | | HN request time: 0.032s | source
Show context
CuriouslyC ◴[] No.45229400[source]
As someone who's built a project in this space, this is incredibly unreliable. Subagents don't get a full system prompt (including stuff like CLAUDE.md directions) so they are flying very blind in your projects, and as such will tend to get derailed by their lack of knowledge of a project and veer into mock solutions and "let me just make a simpler solution that demonstrates X."

I advise people to only use subagents for stuff that is very compartmentalized because they're hard to monitor and prone to failure with complex codebases where agents live and die by project knowledge curated in files like CLAUDE.md. If your main Claude instance doesn't give a good handoff to a subagent, or a subagent doesn't give a good handback to the main Claude, shit will go sideways fast.

Also, don't lean on agents for refactoring. Their ability to refactor a codebase goes in the toilet pretty quickly.

replies(5): >>45229506 #>>45229671 #>>45230608 #>>45230768 #>>45230775 #
stingraycharles ◴[] No.45230768[source]
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.

replies(1): >>45232144 #
CuriouslyC ◴[] No.45232144[source]
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.

replies(1): >>45233653 #
1. wild_egg ◴[] No.45233653[source]
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.

replies(1): >>45237358 #
2. stingraycharles ◴[] No.45237358[source]
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.