Live data from Hacker News

How to use Claude Code subagents to parallelize development

zachwills.net

91–100 of 131 posts

Re: How to use Claude Code subagents to parallelize development

#91
post #57

Earlier quoted context omitted.

> 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!…

Remember 20 years ago when Eclipse could move a function by manipulating the AST and following references to adjust imports and callers, and it it didn't lose any code?

I have a suite of agent tools that is just waiting on my search service for a release, it includes `srefactor` and `spatch` commands that have fuzzy semantic alignment with strong error guards, they use LSP and tree sitter to enable refactoring/patching without line numbers or anything and ensure the patch is correct.

Re: How to use Claude Code subagents to parallelize development

#92
post #89
post #57

Earlier quoted context omitted.

Remember 20 years ago when Eclipse could move a function by manipulating the AST and following references to adjust imports and callers, and it it didn't lose any code?

It’s still early days for these agents. There isn’t any reason the agents won’t build or understand AST in the future to more quickly refactor.

Why do the agents need to build or understand it? Just give them tools to work with it like we would.

Re: How to use Claude Code subagents to parallelize development

#93
These prompts remind me of the YouTubers giving people self-actualization advice. “Act like the person you want to be!” Telling the LLM that it is an experienced product manager doesn’t make it an experienced product manager, it just makes it sound like one. This is like launching an entire team of “fake it til you make it” employees.

Re: How to use Claude Code subagents to parallelize development

#94
post #89

Earlier quoted context omitted.

It’s still early days for these agents. There isn’t any reason the agents won’t build or understand AST in the future to more quickly refactor.

Why do the agents need to build or understand it? Just give them tools to work with it like we would.

Everyone talking about MCP and they haven’t figured this out. Actually, JetBrains has an IDE MCP server plugin, although I haven’t tried it.

Re: How to use Claude Code subagents to parallelize development

#95

I am sceptical if these persona based agents really make that much of a difference, and more "appear" to make a difference because of their talk style. Underneath is just a system prompt, or more likely a prompt layered on top "You are a frontend engineer, competent in react and Next.js, tailwind-css" - the stack details and project layout, key information is already in the CLAUDE.md. For more stuff the model is goin…

I too am skeptical about the personas, but I still use them to organize context and instructions for different types of work. I use a top-level .agents dir, with commands, roles, and rules, sub-dirs.

CLAUDE.md is kept somewhat lean, with pointers to individual files in ./docs/ and .claude/commands is a symlink to .agents/commands.

After starting Claude, I use /commands to load a role and context, which pulls in only the necessary docs and avoids, say, loading UI design or test architecture docs, when adding a backend feature.

I don't want to have to do any of this, but it helps me try and keep the agents on the rails and minimize context rot.

Re: How to use Claude Code subagents to parallelize development

#96

Earlier quoted context omitted.

So maybe the solution is to make all subproblems greenfield products? By this I mean treat features as isolated plugins. I get that there are cross-cutting features that touch multiple pieces of functionality, and those probably need special treatment, but a large class of functionality can be developed in an isolated way with a common set of design tokens and APIs to tie them all together. This might play better to…

I do try to do this, from an architectural standpoint it starts with modular monoliths to avoid coupling, then I try to decompose problems in a way that is very sandboxed so the blast radius of an agent going of the rails is contained.

So the things people hate Java for will make a big comeback then? Hexagonal architecture with domain driven design,a big fetish for inversion of control, so the LLM never needs to figure out how the system works, it just magically does. And errors have just the right amount of stack trace, this being 500++ lines

Re: How to use Claude Code subagents to parallelize development

#97
post #57

Earlier quoted context omitted.

Remember 20 years ago when Eclipse could move a function by manipulating the AST and following references to adjust imports and callers, and it it didn't lose any code?

I have a suite of agent tools that is just waiting on my search service for a release, it includes `srefactor` and `spatch` commands that have fuzzy semantic alignment with strong error guards, they use LSP and tree sitter to enable refactoring/patching without line numbers or anything and ensure the patch is correct.

Nice. This sounds like the right approach. As an aside, it’s crazy that a mature LSP server is not a first class requirement for language choice in 2025. I used to write mini LSP servers before working on a project starting when LSP came out a few years ago. Now that there is wider adoption, I don’t find myself reaching for this quite as often, but it’s still a really nice way to ease development on mature codebases that have grown their own design patterns.

Re: How to use Claude Code subagents to parallelize development

#98
post #96

Earlier quoted context omitted.

I do try to do this, from an architectural standpoint it starts with modular monoliths to avoid coupling, then I try to decompose problems in a way that is very sandboxed so the blast radius of an agent going of the rails is contained.

So the things people hate Java for will make a big comeback then? Hexagonal architecture with domain driven design,a big fetish for inversion of control, so the LLM never needs to figure out how the system works, it just magically does. And errors have just the right amount of stack trace, this being 500++ lines

A lot of old school "java-ish" paradigms are going to come back with AI for the same reason people used them with Java back in the day - they put golden handcuffs on implementors, which is a bad tradeoff for competent, agile humans but a very good tradeoff for sometimes off the rails agents. This includes waterfall, spec driven development, front loaded planning, extensive automated testing suites, formal verification, etc.

Re: How to use Claude Code subagents to parallelize development

#99

Earlier quoted context omitted.

You don't need subagent, I shared this on ClaudeCode sub as well https://www.reddit.com/r/ClaudeCode/s/barbpBxG78 Subagents do not work well for coding at all

> Subagents do not work well for coding at all Subagents can work very well, especially for larger projects. Based on this statement, I think you're experiencing how I felt in my early experience with them, and that your mental model for how to use them effectively is still embryonic. I've found that the primary benefit for subagents is context/focus management. For example, I'm doing auth using Stytch. What I absolu…

> I've found that the primary benefit for subagents is context/focus management. For example, I'm doing auth using Stytch. What I absolutely don't want to do is load https://stytch.com/docs/llms.txt and instructions for leveraging it in my CLAUDE.md.

> But it's perfect for my auth agent, and the quality of the output for auth-related tasks is far higher as a result.

What about just using a sub agent specifically to fetch llms.txt and find the answer to the question for the parent agent? Instead of handing a full task off to it

Re: How to use Claude Code subagents to parallelize development

#100

Earlier quoted context omitted.

I'm wondering if in large projects, you want subagents to avoid having tasks flush out the main context? If you're working with large source files, you might want to do each piece of work in an independent context with the information discarded afterwards? Is the context a sliding window, or are there tiers of importance?

No the context going out of control is overblow. Lemme example why. First you need to work at feature level. It shouldn't be too large of a feature in one go. Let's say in my workflow, first agent must know where it needs to make changes? So it greps bunch of files and reads them. We do not need these read calls or grep calls to be part of history, the knowledge gained by doing these is what needs to be part of conte…

> No the context going out of control is overblow. Lemme example why. First you need to work at feature level. It shouldn't be too large of a feature in one go.

As a meta point, why write ' Lemme example why.' ?

If someone is still with you at this sentence, that person was ready to understand why.

Otherwise, it delays (and thus endangers the visibility of) whatever your explanation was going to be.

Post reply on HN