Skip to content

[Bug] HeavySwarm accepts img, threads it down two levels, then never passes it to the agents - #1902

Merged
kyegomez merged 1 commit into
kyegomez:masterfrom
ayaangazali:fix/heavy-swarm-drops-img
Aug 21, 2026
Merged

[Bug] HeavySwarm accepts img, threads it down two levels, then never passes it to the agents#1902
kyegomez merged 1 commit into
kyegomez:masterfrom
ayaangazali:fix/heavy-swarm-drops-img

Conversation

@ayaangazali

@ayaangazali ayaangazali commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

HeavySwarm.run(task, img=...) accepts an image, documents it, threads it down two levels — and then neither executor passes it to the agents. Every visual-analysis task runs blind.

The path

run(task, img)                                    heavy_swarm.py:281
  -> _execute_agents_parallel(..., img=img)              :424
       -> _execute_agents_basic(questions, agents, img)  :557
            -> agent.run(question)                       :603   <- img dropped
       -> _execute_agents_with_dashboard(..., img)       :554
            -> agent.run(question)                       :930   <- img dropped

img is a declared parameter on all three functions and documented on each ("Image input if needed for visual analysis tasks"), so it looks wired up at every level except the last one that matters.

Verification

Stub agents that record what they receive, driving both executors directly:

BEFORE   basic executor     -> img seen by agents: {None}
         dashboard executor -> img seen by agents: {None}

AFTER    basic executor     -> img seen by agents: {'chart.png'}
         dashboard executor -> img seen by agents: {'chart.png'}

Both paths were broken and both are fixed; I checked the dashboard variant separately rather than assuming it followed the basic one.

Fix

agent.run(question, img=img) at both sites. img is already in the enclosing scope of each, and Agent.run's img defaults to None, so the no-image case is byte-for-byte what it was.

Same defect as #1822 (SequentialWorkflow.run accepted imgs and dropped it), which you merged — this is the HeavySwarm instance of it.

No test file: two-line change, no new function.

Adjacent finding

Filed as #1903 rather than folded in: execute_question_generation(self, task) has no img parameter at all, so the decomposer writes the four (or fifteen) sub-questions without ever seeing the image. That is a design change — the image has to reach the question schema and prompt — so it needs your call, not a quiet expansion of this diff.

Copilot AI lite review requested due to automatic review settings August 17, 2026 18:55
@ayaangazali
ayaangazali requested a review from kyegomez as a code owner August 17, 2026 18:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@kyegomez
kyegomez merged commit e5c27a0 into kyegomez:master Aug 21, 2026
6 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants