Live data from Hacker News

How to use Claude Code subagents to parallelize development

zachwills.net

71–80 of 131 posts

Re: How to use Claude Code subagents to parallelize development

#71
post #48

Earlier quoted context omitted.

There's a large body of research on context pruning/rewriting (I know because I'm knee deep in benchmarks in release prep for my context compiler), definitely don't ad hoc this.

Care to give some pointers on what to look at? Looks like I will be doing something similar soon so that would be much appreciated

Just ask chat gpt about state of the art in context pruning and other methods to optimize the context being provided to a LLM, it's a good research helper. The right mental model is that it's basically like RAG in reverse, instead of trying to select and rank from a data set, you're trying to select and rank from context given a budget.

Re: How to use Claude Code subagents to parallelize development

#72

Earlier quoted context omitted.

Everyone complains that when you compact the context, Claude tends to get stupid Which as far as I understand it is summarizing the context with a smaller model. Am I misunderstanding you, as the practical experience of most people seem to contradict your results.

One key insight I have from having worked on this from the early stages of LLMs (before chatgpt came out) is that the current crop of LLM clients or "agentic clients" don't log/write/keep track of success over time. It's more of a "shoot and forget" environment right now, and that's why a lot of people are getting vastly different results. Hell, even week to week on the same tasks you get different results (see the r…

The difference between agents and LLMs is that agents are easy to tune online, because unlike LLMs they're 95% systems software. The prompts, the tools, the retrieval system, the information curation/annotation, context injection, etc. I have a project that's still in early stages that can monitor queries in clickhouse for agent failures, group/aggregate into post mortem classes, then do system paramter optimization on retrieval /document annotation system and invoke DSPy on low efficacy prompts.

Re: How to use Claude Code subagents to parallelize development

#73

Earlier quoted context omitted.

Subagents are literally built into Claude Code via a built-in tool where it can recursively call itself

Yes I know, but subagent suffer from context amnesia during context handouts which is why this subagent use is flawed for purpose of coding product features. I've been using these tools a lot and installed every ai agent out there i could find.

Yup, this is the killer. Subagents SEEM good when you use them on greenfield projects, you can grind out a whole first pass without burning through much of your main context, it seems magical. But when you have a complex project that handoff is the kiss of death.

Re: How to use Claude Code subagents to parallelize development

#74
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 think it's likely that these agent-based development will inevitably add more imperative tools to their arsenal to lower cost, improve speed and accuracy.

Re: How to use Claude Code subagents to parallelize development

#75

That sounds crazy to me, Claude Code has so many limitations. Last week I asked Claude Code to set up a Next.js project with internationalization. It tried to install a third party library instead of using the internationalization method recommended for the latest version of Next.js (using Next's middleware) and could not produce of functional version of the boilerplate site. There are some specific cases where agent…

I pretty much always attach (insert library here) LLM.txt as context, or a direct link to the documentation page for (insert framework feature) Not very agentic but it works a lot better.

Indeed. Attaching the link (of the correct page) of the documentation worked in this case but I would've been faster than the AI. LLM.txt has been hit or miss. Maybe I need to adapt my workflow and have a granular plan of what needs to be done.

However the complexity is in knowing what to do and when. Actually typing the code/running commands doesn't take that much time and energy. I feel like any time gained by overusing an LLM will be offset by having to debug its code when it messes things up.

Re: How to use Claude Code subagents to parallelize development

#76

Earlier quoted context omitted.

Yes I know, but subagent suffer from context amnesia during context handouts which is why this subagent use is flawed for purpose of coding product features. I've been using these tools a lot and installed every ai agent out there i could find.

Yup, this is the killer. Subagents SEEM good when you use them on greenfield projects, you can grind out a whole first pass without burning through much of your main context, it seems magical. But when you have a complex project that handoff is the kiss of death.

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?

Re: How to use Claude Code subagents to parallelize development

#78

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…

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 suffer from the same overriding problem with "Claude Contexting", which is context wrangling. Subagents "should" help to compartmentalize and manage your context better, but not in my experience so far. I found I was jumping through a lot of hoops with special instructions, manual compacts, up front super detailed plans, and MCPs just to manage my context. So subagents is probably the same, where you want to have it handle tasks that do not require context from your main thread.

P.S. I know they added 1m context to their API, with a price increase, but AFAIK the subscription still uses the 200k context.

Re: How to use Claude Code subagents to parallelize development

#79

Earlier quoted context omitted.

Yup, this is the killer. Subagents SEEM good when you use them on greenfield projects, you can grind out a whole first pass without burning through much of your main context, it seems magical. But when you have a complex project that handoff is the kiss of death.

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 context

Finally, we do some risk analysis and then just code it right away.

No sliding window needed for this

After this you reset context /reset and u start on new feature.

Post reply on HN