Most active commenters
  • faangguyindia(5)
  • CuriouslyC(3)

←back to thread

280 points zachwills | 20 comments | | HN request time: 0s | source | bottom
Show context
skimojoe ◴[] No.45231193[source]
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 going to call file-read tools etc.

I think its more theatre then utilty.

What I have taken to doing is having a parent folder and then frontend/ backend/ infra/ etc as children.

parent/CLAUDE.md frontend/CLAUDE.md backend/CLAUDE.md

The parent/CLAUDE.md provides a highlevel view of the stack "FastAPI backend with postgres, Next.js frontend using with tailwind, etc". The parent/CLAUDE.md also points to the childrens CLAUDE.md's which have more granular information.

I then just spawn a claude in the parent folder, set up plan mode, go back and forth on a design and then have it dump out to markdown to RFC/ and after that go to work. I find it does really well then as all changes it makes are made with a context of the other service.

replies(7): >>45231217 #>>45233133 #>>45234479 #>>45235090 #>>45237422 #>>45237827 #>>45238553 #
1. faangguyindia ◴[] No.45231217[source]
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

replies(3): >>45231965 #>>45232649 #>>45233343 #
2. weird-eye-issue ◴[] No.45231965[source]
Subagents are literally built into Claude Code via a built-in tool where it can recursively call itself
replies(1): >>45232001 #
3. faangguyindia ◴[] No.45232001[source]
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.
replies(1): >>45232253 #
4. CuriouslyC ◴[] No.45232253{3}[source]
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.
replies(2): >>45232481 #>>45233037 #
5. jpollock ◴[] No.45232481{4}[source]
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?

replies(1): >>45232693 #
6. rapind ◴[] No.45232649[source]
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.

7. faangguyindia ◴[] No.45232693{5}[source]
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.

replies(1): >>45235031 #
8. catlifeonmars ◴[] No.45233037{4}[source]
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 coding agent strengths.

Full disclosure: this is very much an armchair view. I have all of 2 weeks of experience coding via agents (vs manually), but this thread is nerd sniping me into trying it myself.

replies(1): >>45233377 #
9. CharlesW ◴[] No.45233343[source]
> 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 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.

A recommended read: https://jxnl.co/writing/2025/08/29/context-engineering-slash...

replies(5): >>45234066 #>>45235024 #>>45235698 #>>45236284 #>>45237161 #
10. CuriouslyC ◴[] No.45233377{5}[source]
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.
replies(1): >>45234540 #
11. Razengan ◴[] No.45234066[source]
> your mental model for how to use them effectively is still embryonic.

Well

12. ffsm8 ◴[] No.45234540{6}[source]
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
replies(1): >>45234991 #
13. CuriouslyC ◴[] No.45234991{7}[source]
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.
14. johntash ◴[] No.45235024[source]
> 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

15. ejstronge ◴[] No.45235031{6}[source]
> 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.

16. GoatInGrey ◴[] No.45235698[source]
I'm unsure if this also qualifies as incompetence/embryonic understanding, though I've used LLMs for hundreds of hours on development tasks and have also found that sub-agents are not good at programming. They're more suitable for research tasks to provide informed context to the parent agent while isolating it from the token consumption which retrieving that context cost.

Zooming out, my findings on LLMs with programming is that they work well in specific patterns and quickly go to shit when completely unsupervised by a SME.

  * Prototyping

  * Scaffolding (i.e. write an endpoint that does X that I'll refine into a sustainable implementation myself)

  * Questions on the codebase that require open-ended searching 
 
  * Specific programming questions (i.e. "How do I make an HTTP call in ___ ?")

  * Idea generation ("List three approaches for how you'd ____" or "How would you refactor this package to separate concerns?")
The LLMs all fuck up on something in every task that they perform due to the intersection of operating on assumptions and working on large problem spaces. The amount of effort it takes to completely eliminate the presence of assumptions in the agent make the process slower than writing the code yourself. So people try to find the balance they're comfortable with.
17. faangguyindia ◴[] No.45236284[source]
You didn't not bother reading my actual criticism against subagent model: https://www.reddit.com/r/ClaudeCode/s/weQIbVtAtG

Let me say it again, subagent model does not work for things which most developer do 90% of their time they want to implement a feature in their app.

replies(1): >>45236490 #
18. CharlesW ◴[] No.45236490{3}[source]
> You didn't not bother reading my actual criticism against subagent model:

Nope, I did. It's why I was under the impression that you hadn't yet figured out how to use them successfully. That's why I posted a specific example where a subagent is useful and why, hoping you and others might benefit from that.

If the subagent model does not work 90% of the time, why does the workflow model you recommend in another Reddit post you linked to specifically recommend delegating work to sub-agents throughout?

replies(1): >>45244773 #
19. call-me-al ◴[] No.45237161[source]
I highly recommend to check how agents are used in this project: https://github.com/humanlayer/humanlayer/tree/main/.claude/a...

I found this out after this YouTube video that explains the rationale behind it: https://www.youtube.com/watch?v=IS_y40zY-hc

20. faangguyindia ◴[] No.45244773{4}[source]
I've been using sub agents for long time now, see: https://www.reddit.com/r/ClaudeCode/comments/1nh75k2/3_phase...