[Bug] AgentRearrange drops img on parallel flow steps, but forwards it on sequential ones - #1890
Merged
kyegomez merged 1 commit intoAug 21, 2026
Conversation
`_run_concurrent_workflow` accepted `img` and never used it, so a flow
step written with a comma dropped the image while the sequential path
kept it:
flow "A, B" -> A saw img=None, B saw img=None
flow "A -> B" -> A saw img='chart.png', B saw img='chart.png'
`run_agents_concurrently` takes `img`; the call simply omitted it.
`_run_sequential_workflow` forwards it, and so does the async twin
`_run_concurrent_workflow_stream` — the sync parallel path was the only
one that did not, so the same request behaved differently depending on
whether its flow contained a comma.
Reaches users through `SequentialWorkflow.run(task, img=...)` and any
`SwarmRouter(swarm_type="AgentRearrange")` whose flow has a parallel
step.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ayaangazali
force-pushed
the
fix/rearrange-parallel-drops-img
branch
from
August 15, 2026 17:48
847f2ef to
989b686
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
_run_concurrent_workflowacceptsimgand never uses it:run_agents_concurrentlytakes animgparameter — the call just omitted it.So the same request behaves differently depending on whether its flow contains a comma:
No error, no warning — the agents simply answer a multimodal question without the image.
Why the sync parallel path is the outlier
Two of the three paths already forward it:
_run_sequential_workflowforwardsimg_run_concurrent_workflow_stream(the async twin) forwardsimg_run_concurrent_workflowdid notReach
Anything with a parallel step in its flow:
AgentRearrange(flow="A, B").run(task, img=...),SequentialWorkflow.run(task, img=...)where the derived flow has one, andSwarmRouter(swarm_type="AgentRearrange").Verification
tests/structs/test_agent_rearrange.py— 11 failed / 54 passed, identical onmaster(that suite makes live LiteLLM calls, so it is red in a sandbox either way; the counts and the failing set match).One file, one argument.
(Left alone deliberately: the
*args/**kwargson this method also have no destination onrun_agents_concurrently. Removing them is a signature change rather than a bug fix, so it did not belong in this diff.)