Multiple Agent Workflow Fails to Automatically Parallelize Tasks
Status Closed — not planned
Maintainer reply None cached
Activity 12 comments · opened Aug 13, 2025 · closed Jan 8, 2026
Bug Description
when asking claude to do a task using multiple agents, even if specifying a number to use, the exact same pattern emerges - claude agrees and then proceeds with working using only one agent, and you need to stop him and instruct again to launch multiple agents - and only then it will comply
Environment Info
- Platform: darwin
- Terminal: cursor
- Version: 1.0.77
- Feedback ID: de424c7c-c0b5-414e-9e4e-f50fc16951bc
Errors
[]
12 Comments
Just tweeted about this last night, try this in your prompt @ivg-design.
I had 5 parallel agents succesfully build out a spec together
<img width="2400" height="552" alt="Image" src="https://github.com/user-attachments/assets/b9756324-1d29-4471-900a-9e9368838edd" />
The spec was requested to be parsed into groups of tasks that could be paralleled without issues. Each list of tasks was accomplished by a single sub-agent (can also just use
Task()for each as well).Results were super promising. The code generated worked 99%, only a few small issues had to be ironed out across multiple systems.
It's hard to get them to consistently run in parallel. I've found asking for parallel gives me the least likely response to them being run. Better results are from "at the same time" and other variations. But it's not consistent.
It works more often when you use a coordinator agent for some reason.
i was never able to get one agent to supervise multiple others - - how would you even do it? I've tried to have a custom Supervisor but it never runs in parallel - only sequentially - i could not even get this custom agents stuff to work - only the multiple prompts to get 4-5 agents working on a task....
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
this is not the same as other issues - in my instance a direct command 100% of the time fails to start multiple agents!
I've been looking into a variant of this issue involving task tool agents (rather than pre-defined sub-agents); I came upon some interesting findings.
Similar to your case, I've found that Claude Code _rarely_ succeeds in running Task Tool agents in parallel the first time, even when explicitly asked. If I interrupt Claude Code and ask it to try again, it almost always succeeds though. This got me thinking:
I drilled Claude Code on the topic—asking it what it was actually invoking in both the successful case (i.e. successful parallel execution) and unsuccessful case (sequential execution); from what I've learned, I'm quite confident that the issue is simply one of Claude _not having a clear and definitive understanding of the correct syntax for 'parallel execution'_.
tl;dr: I suspect that the solution, at least until Anthropic fixes this, is to instruct Claude Code more precisely. i.e. instead of saying 'Run multiple agents in parallel', perhaps we should ask it to "invoke multiple agents in the same
<function_calls>block. This is very similar to what @danieliser mentioned above in suggesting "Run multiple Task invocations in a SINGLE message"; but "single message" still leaves the actual invocation syntax up to interpretation, whereas mentioningfunction_callsavoids all ambiguity.Full deep dive inside this 'details' block:
<details><summary>Full Technical exploration of Claude Code invocations</summary>
Specifically, here's what it says it passes to the system when task tool agents get invoked sequentially:
And here's what it says it passes to the system when task tool agents get invoked in parallel:
In light of this, I wondered why Claude Code is so often failing to use the required 'parallel invocation' syntax, so I asked it to explain the system instructions on the matter, and it said the specific instruction (verified in the full system instruction dump here is:
So, my speculation is: perhaps it doesn't actually "know" the proper syntax—so when you say "in parallel", it's passing multiple messages / function_call invocations one after another, thinking they'll run in parallel, but they don't.
In other words, Claude Code doesn't understand its own system. It sets out 'thinking' it can invoke multiple messages or multiple
<function_calls>blocks one after another, but the system immediately cuts it off once it sees a<function_calls>block—even if Claude Code wasn't finished "talking".</details>
thanks @lukemmtt for the observation.
I thus created this hook that can be used for automatic parallel spawning if used as a PostToolUse watching for TodoWrite. It's quite reliable (the code block formatting is a bit broken here but you will know how to fix it easily from your end).
Please present your analysis of parallel stages and then proceed with the first stage using the correct format.
"""
response = {
"hookSpecificOutput": {
"hookEventName": "PostToolUse",
"additionalContext": reflection_prompt
}
}
logging.info("Injecting context to trigger self-reflection and parallelization.")
print(json.dumps(response), flush=True)
with open(STATE_FILE, 'w') as f:
f.write(current_hash)
logging.info(f"Updated state file with new hash: {current_hash}")
except Exception as e:
logging.exception("An unexpected error occurred in the Supervisor hook.")
sys.exit(0)
if __name__ == "__main__":
main()
You're Absolutely Right!
<img width="902" height="437" alt="Image" src="https://github.com/user-attachments/assets/bf8ad290-cc18-4c5f-8922-1135460fcb58" />
<img width="904" height="864" alt="Image" src="https://github.com/user-attachments/assets/3cfa9c1e-9f67-4018-a82f-271bbe97f61d" />
Same issue - closed ticket - https://github.com/anthropics/claude-code/issues/7406#issuecomment-3276053762
This seems to work for me relatively consistently:
Parallelize the tasks and run them in sub-agents simultaneously all at the same time.This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.