From ec806e251c775b4e2e75e4bf3595b6a43d790580 Mon Sep 17 00:00:00 2001 From: cyberprophet Date: Mon, 30 Mar 2026 17:21:29 +0900 Subject: [PATCH 1/2] fix: preserve file parts in subtask prompts for multimodal subagents MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When `isSubtask` is true, the prompt assembly logic discards all non-text parts from `input.parts`, including images and PDFs passed as content blocks. This makes multimodal subagents like multimodal-looker unable to receive any visual content — the agent gets only the text instruction with no image data attached. Preserve `input.parts` entries with `type === "file"` alongside the subtask part so that vision-capable subagents can analyze images passed through tools like `look_at`. Closes #20001 Co-Authored-By: Claude Opus 4.6 (1M context) --- packages/opencode/src/session/prompt.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/opencode/src/session/prompt.ts b/packages/opencode/src/session/prompt.ts index a9edf838ca8c..1f2678fb334e 100644 --- a/packages/opencode/src/session/prompt.ts +++ b/packages/opencode/src/session/prompt.ts @@ -1935,9 +1935,11 @@ NOTE: At any point in time through this workflow you should feel free to ask the providerID: taskModel.providerID, modelID: taskModel.modelID, }, - // TODO: how can we make task tool accept a more complex input? prompt: templateParts.find((y) => y.type === "text")?.text ?? "", }, + // Preserve file parts (images, PDFs) so multimodal subagents can + // receive visual content passed via input.parts. + ...(input.parts?.filter((p) => p.type === "file") ?? []), ] : [...templateParts, ...(input.parts ?? [])] From 4120e1c7f1b6f2ff67bf1170e793c9203baf8735 Mon Sep 17 00:00:00 2001 From: cyberprophet Date: Mon, 30 Mar 2026 17:26:24 +0900 Subject: [PATCH 2/2] chore: trigger compliance re-check