Ok it might sound crazy but I actually got the best quality of code (completely ignoring that the cost is likely 10x more) by having a full “project team” using opencode with multiple sub agents which are all managed by a single Opus instance. I gave them the task to port a legacy Java server to C# .NET 10. 9 agents, 7-stage Kanban with isolated Git Worktrees. Manager (Claude Opus 4.5): Global event loop that wakes u…
Claude Code's new hidden feature: Swarms
321–330 of 351 posts
Re: Claude Code's new hidden feature: Swarms
#322Ok it might sound crazy but I actually got the best quality of code (completely ignoring that the cost is likely 10x more) by having a full “project team” using opencode with multiple sub agents which are all managed by a single Opus instance. I gave them the task to port a legacy Java server to C# .NET 10. 9 agents, 7-stage Kanban with isolated Git Worktrees. Manager (Claude Opus 4.5): Global event loop that wakes u…
Have you been able to build anything productionizable this way, or are you just using this workflow for rapid prototyping?
Re: Claude Code's new hidden feature: Swarms
#323Earlier quoted context omitted.
Right, but the model is still: you tell the AI what to do, this is the AI tells other AIs what to do. The context makes a huge difference because it has to be able to run autonomously. It is possible to do this with SDK and the workflow is completely different. It is very difficult to manage task lists in context. Have you actually tried to do this? i.e. not within a Claude Code chat instance but by one-shot promptin…
> Have you actually tried to do this? i.e. not within a Claude Code chat instance but by one-shot prompting. You ask if I've tried to do this, and then set constraints that are completely different to what I described. I have done what I described. Several times for different projects. I have a setup like that running right now in a different window. > It is hard to bootstrap because this isn't how Claude Code works.…
No, it isn't how Claude Code works because Claude Code is designed to work with limited task queues, this is not what this feature is. Again, I would suggest you trying to actually build something like this. Why do you think Anthropic are doing this? They just don't understand anything about their product?
No, it doesn't work within that context. Again: sharing context between subagents, single instance running for months...I am not even sure why someone would think this could work. The constraints that I set are the ones that you require to build this...because I have done this. You are talking about having some CLAUDE.md files like you have invented the wheel, lol. HN is great.
Re: Claude Code's new hidden feature: Swarms
#324Earlier quoted context omitted.
Because of OAuth. If they gave people API keys then no-one buys their ludicrously priced API product (I assume their strategy is to subsidise their consumer product with the business product). You can use Claude Code SDK but it requires a token from Claude Code. If you use this token anywhere else, your account gets shut down. Claude -p still hits Claude Code with all the tools, all the Claude Code wrapping.
I believe they’re talking about Claude Code’s built-in agents feature which works fine with a Max subscription. https://code.claude.com/docs/en/sub-agents Are you talking about the same thing or something else like having Claude start new shell sessions?
If they were able to wrap the API directly, this is relatively easy to implement but they have to do this within Claude Code which is based on giving a prompt/hiding API access. This is obvious if you think carefully about what Claude Code is, what requests it is sending to the API, etc.
Re: Claude Code's new hidden feature: Swarms
#325Earlier quoted context omitted.
Because of OAuth. If they gave people API keys then no-one buys their ludicrously priced API product (I assume their strategy is to subsidise their consumer product with the business product). You can use Claude Code SDK but it requires a token from Claude Code. If you use this token anywhere else, your account gets shut down. Claude -p still hits Claude Code with all the tools, all the Claude Code wrapping.
That’s not what this subthread is about. They’re talking about the subagent within Claude Code itself. Btw, you can use the Claude Agent SDK (the renamed Claude Code SDK) with a subscription. I can tell you it works out of the box, and AFAIK it is not a ToS violation.
Subagents and the auth implementation are linked because Anthropic's initial strategy was to have a prompt-based interaction which, because of the progress in model performance, has ended up being limiting as users want to run things without prompting. This is why they developed Claude Code Web (this product is more similiar to what this feature will do than subagents, subagents are similar if you have a very shallow understanding...the purpose of this change is to abstract away human interaction, i assume that will use subagents but the context/prompt management is quite different).
Re: Claude Code's new hidden feature: Swarms
#326Earlier quoted context omitted.
Because of OAuth. If they gave people API keys then no-one buys their ludicrously priced API product (I assume their strategy is to subsidise their consumer product with the business product). You can use Claude Code SDK but it requires a token from Claude Code. If you use this token anywhere else, your account gets shut down. Claude -p still hits Claude Code with all the tools, all the Claude Code wrapping.
can't you just rip the oauth client secret out of the code?
As someone else has mentioned, you can actually use SDK for programmatic access. But that happens within the CC wrapper so it isn't a true API experience i.e. it has CC tools.
Re: Claude Code's new hidden feature: Swarms
#327Earlier quoted context omitted.
There's no need to anthropomorphize though. One loop that maintains some state and various context trees gets you all that in a more controlled fashion, and you can do things like cache KV caches across sessions, roll back a session globally, use different models for different tasks, etc. Assuming a one-to-one-to-one relationship between loops and LLM and context sounds cooler--distributed independent agents--but ult…
The solutions you suggest are multiple agents. An agent is nothing more than a linear context and a system that calls tools in a loop while appending to that context. Whether you run them in a single thread where you fork the context and hotswap between the branches, or multiple threads where each thread keeps track of its own context, you are running multiple agents either way. Fundamentally, forking your context, o…
I see this as being different from a single process loop that directly manages the contexts, models, system prompts, etc. I get that it's not that different; kind of like FP vs OOP you can do the same thing in either. But I think the end result is simpler if we just think about it as a single loop that manages contexts directly to complete a project, rather than building an async communication and coordination system.
Re: Claude Code's new hidden feature: Swarms
#328Earlier quoted context omitted.
So two things.. Yes this helps with context and is a primary reason to break out the sub-agents. However one of the bigger things is by having a focus on a specific task or a role, you force the LLM to "pay attention" to certain aspects. The models have finite attention and if you ask them to pay attention to "all things".. they just ignore some. The act of forcing the model to pay attention can be acoomplished in al…
What do you think context is, if not 'attention'?
Re: Claude Code's new hidden feature: Swarms
#329Re: Claude Code's new hidden feature: Swarms
#330Ok it might sound crazy but I actually got the best quality of code (completely ignoring that the cost is likely 10x more) by having a full “project team” using opencode with multiple sub agents which are all managed by a single Opus instance. I gave them the task to port a legacy Java server to C# .NET 10. 9 agents, 7-stage Kanban with isolated Git Worktrees. Manager (Claude Opus 4.5): Global event loop that wakes u…
Every time I read something like this, it strikes me as an attempt to convince people that various people-management memes are still going to be relevant moving forward. Or even that they currently work when used on humans today. The reality is these roles don't even work in human organizations today. Classic "job_description == bottom_of_funnel_competency" fallacy. If they make the LLMs more productive, it is probab…
When you think about what an LLM is, it makes more sense. It causes a strong activation for neorons related to "code review", and so the model's output sounds more like a code review.