Live data from Hacker News

How to use Claude Code subagents to parallelize development

zachwills.net

31–40 of 131 posts

Re: How to use Claude Code subagents to parallelize development

#31

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…

> Their ability to refactor a codebase goes in the toilet pretty quickly. Very much this. I tried to get Claude to move some code from one file to another. Some of the code went missing . Some of it was modified along the way. Humans have strategies for refactoring, e.g. "I'm going to start from the top of the file and Cut code that needs to be moved and Paste it in the new location". LLM don't have a clipboard (yet!…

> Humans have strategies for refactoring, e.g. "I'm going to start from the top of the file and Cut code that needs to be moved and Paste it in the new location". LLM don't have a clipboard (yet!) so they can't do this.

For my own agent I have a `move_file` and `copy_file` tool with two args each, that at least GPT-OSS seems to be able to use whenever it suits, like for moving stuff around. I've seen it use it as part of refactoring as well, moving a file to one location, copying that to another, the trim both of them but different trims, seems to have worked OK.

If the agent has access to `exec_shell` or similar, I'm sure you could add `Use mv and cp if you need to move or copy files` to the system prompt to get it to use that instead, probably would work in Claude Code as well.

Re: How to use Claude Code subagents to parallelize development

#32

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…

Totally agreed, tried agents for a lot of stuff (I started creating a team of agents, architect, frontend coder, backend coder and QA). Spent around 50 USD on a failed project, context contaminated and the project eventually had to be re-written.

Then I moved some parts in rules, some parts in slash commands and then I got much better results.

The subagents are like a freelance contractors (I know, I have been one very recently) Good when they need little handoff (Not possible in realtime), little overseeing and their results are a good advice not an action. They don't know what you are doing, they don't care what you do with the info they produce. They just do the work for you while you do something else, or wait for them to produce independent results. They come and go with little knowledge of existing functionalities, but good on their own.

Here are 3 agents I still keep and one I am working on.

1: Scaffolding: Now I create (and sometimes destroy) a lot of new projects. I use a scaffolding agents when I am trying something new. They start with fresh one line instruction to what to scaffold (e.g. a New docker container with Hono and Postgres connection, or a new cloudflare worker which will connect to R2, D1 and AI Gateway, or a AWS Serverless API Gateway with SQS that does this that and that), where to deploy. At the end of the day they setup the project with structure, create a Github Repo and commit it for me. I will take it forward from them

2: Triage: When I face some issues which is not obvious from reading code alone, I give them the place, some logs and the agent will use whatever available (including the DB Data) to make a best guess of why this issue happens. I often found out they work best when they are not biased by recent work

3: Pre-Release Check QA: Now this QA will test the entire system (Essentially calling all integration and end-to-end test suite to make sure this product doesn't break anything existing. Now I am adding a functionality to let them see original business requirement and see if the code satisfies it or not. I want this agent to be my advisor to help me decide if something goes to release pipeline or not.

4: Web search (Experimental) Sometimes, some search are too costly for existing token, and we only need the end result, not what they search and those 10 pages it found out...

Re: How to use Claude Code subagents to parallelize development

#33

I often see people making these sub agents modelled on roles like product manager, back end developer, etc. I spent a few hours trying stuff like this and the results were pretty bad compared to just using CC with no agent specific instructions. Maybe I needed to push through and find a combination that works but I don't find this article convincing as the author basically says "it works" without showing examples or…

Right - don’t make subagents for the different roles, make them to manage context for token heavy tasks.

A backend developer subagent is going to do the job ok, but then the supervisor agent will be missing useful context about what’s been done and will go off the rails.

The ideal sub agent is one that can take a simple question, use up massive amounts of tokens answering it, and then return a simple answer, dropping all those intermediate tokens as unnecessary.

Documentation Search is a good one - does X library have a Y function - the subagent can search the web, read doc MCPs, and then return a simple answer without the supervisor needing to be polluted with all the context

Re: How to use Claude Code subagents to parallelize development

#35

All of this stuff seems completely insane to me and something my coding agent should handle for me. And it probably will in a year.

I feel the same. We’re still in the very early days of AI agents. Honestly, just orchestrating CC subagents alone could already be a killer product.

Re: How to use Claude Code subagents to parallelize development

#37
I'm commenting while agents run in project trying to achieve something similar to this. I feel like "we all" are trying to do something similar, in different ways, and in a fast moving space (i use claude code and didn't even know subagents were a thing).

My gut feeling from past experiences is that we have git, but now git-flow, yet: a standardized approach that is simple to learn and implement across teams.

Once (if?) someone will just "get it right", and has a reliable way to break this down do the point that engineer(s) can efficiently review specs and code against expectations, it'll be the moment where being a coder will have a different meaning, at large.

So far, all projects i've seen end up building "frameworks" to match each person internal workflow. That's great and can be very effective for the single person (it is for me), but unless that can be shared across teams, throughput will still be limited (when compared that of a team of engs, with the same tools).

Also, refactoring a project to fully leverage AI workflows might be inefficient, if compared to a rebuild from scratch to implement that from zero, since building docs for context in pair with development cannot be backported: it's likely already lost in time, and accrued as technical debt.

Re: How to use Claude Code subagents to parallelize development

#38
How do you not get lost mentally in what is exactly happening at each point in time? Just trusting the system and reviewing the final output? I feel like my cognitive constraints become the limits of this parallelized system. With a single workstream I pollute context, but feel way more secure somehow.

Re: How to use Claude Code subagents to parallelize development

#39
post #33

I often see people making these sub agents modelled on roles like product manager, back end developer, etc. I spent a few hours trying stuff like this and the results were pretty bad compared to just using CC with no agent specific instructions. Maybe I needed to push through and find a combination that works but I don't find this article convincing as the author basically says "it works" without showing examples or…

Right - don’t make subagents for the different roles, make them to manage context for token heavy tasks. A backend developer subagent is going to do the job ok, but then the supervisor agent will be missing useful context about what’s been done and will go off the rails. The ideal sub agent is one that can take a simple question, use up massive amounts of tokens answering it, and then return a simple answer, dropping…

This is exactly right.

Re: How to use Claude Code subagents to parallelize development

#40

I often see people making these sub agents modelled on roles like product manager, back end developer, etc. I spent a few hours trying stuff like this and the results were pretty bad compared to just using CC with no agent specific instructions. Maybe I needed to push through and find a combination that works but I don't find this article convincing as the author basically says "it works" without showing examples or…

No, this has been my experience as well.

I see lots of people saying you should be doing it, but not actually doing it themselves.

Or at least, not showing full examples of exactly how to handle it when it starts to fail or scale, because obviously when you dont have anything, having a bunch of agents doing any random shit works fine.

Frustrating.

Post reply on HN