Hacker News new | ask | show | jobs
by d4rkp4ttern 22 days ago
> single line addition to prompt to use subagents proactively.

This misses an important detail. In Claude Code [1], ultracode suggests the agent create a JavaScript code to deterministically orchestrate sub agents. This is different from just having the main agent launch sub agents and (non-deterministically) manage them.

The resulting workflow is called “dynamic” because CC creates this orchestration script dynamically, “on the fly”.

[1] https://claude.com/blog/introducing-dynamic-workflows-in-cla...

Another useful thing about dynamic workflows is you can ask Claude to make them durable as skills (or slash command) that can be invoked later.

I believe inside Google they have a similar concept called “deterministic workflows”.

I find ultracode extremely useful. Of course you have to watch how your 5 hour and weekly session usage percentages are getting used. So I had Claude make a status-line with 3 progress bars: for context window, 5h session, 7d session:

https://pchalasani.github.io/claude-code-tools/tools/statusl...

2 comments

Btw, the /loop “dynamic workflow” is so beyond broken/not working.

It’s sad to see folks like Karpathy make a big deal about looping, than to find that the loop command is broken and it’s crap vibe coded documentation isn’t even accurate on the Claude docs.

This whole dynamic workflow idea is on face bad. It’s all done as a massive cope for the fact that real determinism (I.e using structured outputs to enforce control flow of tools deterministically) is bad for alignment/safety so they can’t let you have access to those tools anymore…

Why is structured output a safety issue?
Can you explain what you find useful about ultracode? I've become wary of agent swarms since the early days and now just prefer to have a single agent spin for hours at time. Parallelism never got me anywhere worthwhile.
Not sure if it qualifies as "swarm" but they're useful for controlling context size. You can spin them off for context heavy things like research and analysis then only a much shorter summary gets passed back into the main context.

For instance, I was troubleshooting a 3rd party library issue and I spun a few off "check issue tracker for x", "check rust implementation for x", "check go implementation for x", "check Ruby implementation for x" to compare how different languages did or didn't handle http/2 for a service. They each returned a sentence or two worth of data to the main agent but consumed much more tokens in the process grepping code.

I got a security scan by route for one of our services that was pretty good and raised some useful results. Uses are few and far between for me tho tbh, also really expensive. I usually run a single agent with a subagent or two MAX
I feel like its only useful if the work you are doing doesn't have correctness as a high priority. If your work is okay with something only mostly being correct and it can just be slopped together over time then yes throw 500 agents at it. But otherwise you can't really review all that work as a single human and will quickly run out of capacity
I too used to be a skeptic of the whole "agent-swarms" hype. But I do find some patterns useful with ultracode:

- parallelism: "if it makes sense, use ultracode to do this thoroughly" Claude decides if this is the type of task that can benefit from a dynamic workflow. For example where there is a large number of similar independent sub-tasks, it can choose to set up a dynamic workflow, and it even sets up verifiers/tests etc to validate its work. In some cases it pushes back and decides not to set up a dynamic workflow and instead works on the task directly.

- verification loops: "Set up a dynamic workflow with adversarial checkers, and iterate until they are all green, up to some sensible limit". Similarly, I can include code-simplification steps and documentation-update steps.

These patterns help me leave it unattended for longer periods of time and return to a reasonable assurance of correct code.

Not parent but I find them great for analysis amongst other, to have each agent handle only its parts and bring back any issue even if it's clarified in other parts because that specific agent doesn't know about that, and the orchestrator is then on charge of handling that and making sure things are clarified in each parts that needs it without depending on side effect or side knowledge.

Same with code really but on a lower level, I find X agents working in concert on small task each and the orchestrator making sure of the overall coherence is better, focused better is usually a lot better.

I just wish Claude Code would give us more control over what kind of agent (in many case it would be great to have say Opus handle a bunch of Haiku agents but unless I'm blind you can't be decide what agent is what and you get all counted as opus anyway).

I'll sometimes use agent swarms for triaging quickly through a number of possible issues. For example, a single request for a code review to uncover all possible issues, followed by an agent swarm to dig deep into each issue to confirm or mark false positive.