#1951·swarms

[Bug][AgentRearrange] concurrent_run shares task state and silently truncates image batches

Author: vidithsallaCreated Aug 21, 2026Updated Sep 21, 2026

AgentRearrange.concurrent_run() currently runs all tasks through the same orchestrator instance, so concurrent tasks share the parent conversation. It also uses zip(tasks, imgs) without validating matching lengths, which silently drops work when fewer images than tasks are supplied.

batch_run() already uses _clone_for_task() to give each task a fresh orchestrator conversation and validates task/image lengths.

Expected behavior:

  • each concurrent task uses the existing per-task clone path;
  • the parent conversation is not mutated by concurrent tasks;
  • task/image length mismatches fail before work is scheduled;
  • result order still follows task order.

I have a focused fix with offline regression coverage for these cases.