Skip to content

Vision-aware subagent routing: image tasks must land on vision-capable models, and 'I couldn't see the image' reports must not read as ok #380

Description

@justrach

Evidence (my-website session, subagent sa-024-f0b3395f)

Root spawned "Analyze color palette screenshot" with a task naming a .png path. The worker's own report opens: "I couldn't open the image as a vision input" — it then spent 481 s on Python pixel-quantization, concluded the screenshot was the website itself (wrong, per the trajectory post-mortem: it was a reference palette), and returned status: ok. The root accepted the confident-but-fabricated palette and briefed two mockup generations on it ("exact rose colors", "glassy waves"). One missing capability check cascaded into a whole family of wrong deliverables.

What exists already

src/vision.zig has visionCapable/visionModel (allowlist), used for clipboard pastes (#258: vision is checked BEFORE the clipboard is touched) and MCP image handoff (#249: vision models only). The spawn path never consults it.

Fix, two halves

  1. Spawn-time routing. When a subagent task references an image (staged attachment, or a path with an image extension in the prompt), treat it as a vision ask — same shape as a tier ask: resolve onto a vision-capable rung (visionModel already knows how to pick), source it in the Ultracode: learn orchestration and tier policy, not only prompt variants #372 agent_route trace (e.g. source=vision-ask), and if no vision-capable provider is credentialed, fail the spawn fast with an actionable error instead of letting a text-only worker improvise. Explicit model pins keep priority — but a pinned non-vision model + image input should at least warn in the trace.
  2. Report-time honesty flag. A worker report matching capability-disclaimer markers ("couldn't open/view/see the image as a vision input" and kin) gets flagged in the tool result the root sees — not silent ok. One line ("worker disclaimed vision capability — its visual conclusions are inferred, not seen") converts confident fabrication into a root-visible decision point. Cheap, no model call.

Constraints

🤖 Generated with Claude Code

https://claude.ai/code/session_01QbsV84fdmf39Bh2RF8LdPs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions