Repository navigation
Conversation
Contributor
Author
|
/ok to test 50f8872 |
7 tasks done
Contributor
Contributor
Author
|
Checked Harbor against this guide and pushed
Matching comment on #5719 about its |
Contributor
Author
|
/ok to test dbacfa0 |
Contributor
Author
|
The ATIF text-only limit this guide describes is tracked in #5871; the Harbor note can go once it lands. |
yfw
force-pushed
the
yifuw/multi-harness-core
branch
from
November 9, 2026 18:53
728cae8 to
1686209
Compare
yaoyu-33
force-pushed
the
docs/multimodal-harness-guide
branch
from
November 9, 2026 19:02
dbacfa0 to
665c432
Compare
Contributor
Author
|
/ok to test 665c432 |
Add a "Support images" section to the harness guide: the three places an episode's images come from (task prompt, Resources Server tool reply, the harness's own tools), how an adapter decodes and stages prompt images, how tool-reply images travel over MCP and direct HTTP, when to declare image input on the harness's model, the Model Server setting for images inside tool outputs, and what training and trajectories need. The add-harness skill gains the matching scoping step, checklist item, tests, real-run checks and catalog entry. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
Harbor task instructions are text and their images are files in the task sandbox, so image input has to be turned on by configuration rather than inferred from the prompt. The Harbor Environment Server exports the turn's transcript to ATIF with text only, so an image part in the response output masks the turn as harbor:trajectory_export_failed; say so in the guide and the add-harness skill, and check for it in real Harbor runs. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
Fold in what #4917 (shared media decoding and staging) and #4922 (OpenCode session images) settle: how MediaFile decides a file's type, why stage_media names files by content, why staged files survive close in a borrowed sandbox, decoding once per activation request, staging inside the activation's execution so close can cancel it, SandboxSpec.files bytes for startup files, and OpenCode's _session_input and stage_activation as the reference adapter. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
Pi (#4923) now takes prompt images as @path arguments, so it joins OpenCode as a reference adapter and gets its own row in the adapter table, with where Pi puts the images and its default resizing (which images.autoResize turns off). From the updated #4917: who creates the media directory, cleanup of partial files on failure, where staged files live on providers that share the host's /tmp, and the SandboxUnavailableError / SandboxTransferError split. Staging now has to run under the activation's deadline, as Pi does. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
…pters as to-do in the image table Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
…ounds staging OpenCode (#4922, merged) declares image input when the prompt has images or the agent sets image_input: true, keeps it for later activations, and starts a first activation's budget once it holds a concurrency slot, as Pi does. MCP tool images need the declaration, and opencode_config attachment restores image limits. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
At #4923's head, Pi declares image input only when the prompt has images or the agent sets image_input: true, and turns off Pi's image resizing in every session, as the EOS smoke with a vision model confirmed. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
#5719 now checks each tool_output_images entry as prompt images are checked, gives the model an optional label before each image, and reads a null list as no images. Say so in the tool-reply section and its skill test item. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
yaoyu-33
force-pushed
the
docs/multimodal-harness-guide
branch
from
November 10, 2026 17:29
6e3ee31 to
2e27aed
Compare
Contributor
Author
|
/ok to test 2e27aed |
…pture rule Hermes passes prompt images as ordered Chat Completions image_url parts without staging files; give it its own row and describe that path beside the staged one. With #5833 merged, token capture keeps OpenCode's step-limit note chained, so opencode_agent no longer refuses agent.build.steps under token capture. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
Contributor
Author
|
/ok to test 149a4b6 |
This branch had an error being deployed
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.
What does this PR do?
The harness guide does not say how an adapter supports images. The pieces exist now (prompt media in #4917 and #4922, both merged; Pi sessions in #4923; tool-reply images and OpenCode image settings in #5719, the capture fix in #5833), but someone adding a multimodal harness has to piece the contract together from the code. This PR writes it down.
Harness guide (
add-or-update-a-harness.mdx): a new "Support images" sectionopencode_sandboxed_agentas deprecated (add image support toopencode_agent), and prompt images in the Codex, Hermes, OpenClaw and Kilo adapters as to-do.split_text_and_media()→ 422 onUnsupportedContentError→stage_media()→ the harness's attachment syntax (OpenCode--file), with images accepted only where the harness can place them.MediaFilereads a file's type from its bytes.stage_media()names files by content (/tmp/nemo-gym-media/<sha256>.<ext>,media_path()): renamed into place atomically, and left in a borrowed sandbox after close.bytesinSandboxSpec.files, andupload_bytes()/download_bytes().--file) and Pi (@<path>) as the reference adapters, with where each puts the images and Pi's resizing, which the Pi adapter turns off (images.autoResize: false).SandboxUnavailableError/SandboxTransferErrorthrough unchanged.ToolOutputImageentries (checked as prompt images are, with an optional label before each image),tool_output_imagesovermcp(MCP image content, and whystructuredContentis left out) anddirect_http(split_tool_output_images(), assimple_agentdoes). Where the image lands in the model request decides whethervllm_modelneedsinline_tool_output_images: true.modalities.input), why to declare it only when the episode can carry images (a text-only model refuses images that the harness's own tools open), how OpenCode and Pi follow that rule (images in the prompt orimage_input: true; OpenCode keeps it for later activations), and turning off the harness's own resizing (OpenCodeattachment.image).add-harnessskill: a Step 0 scoping item (does the pairing carry images?), a Step 1 checklist item that points to #4917, #4922 and #4923 as the reference, Step 2 tests (including identical retries and close during staging), a Step 5 real-run check (a vision model plus a text-only control run), a Step 6 training note linking #5833 and #5837, image support in the Step 7 catalog row, and trigger words in the description.Stack
Based on main. #4917, #4922, #5719 and #5833 are merged, so this PR holds only the two docs files. Merge after #4923 and #5960 (draft); the adapter table's Pi row describes #4923 and its Hermes row describes #5960.
The adapter table states today's behavior:
opencode_agent(as merged in feat(opencode): attach prompt images in agent sessions #4922) declares image input when the prompt has images or the agent setsimage_input: true, and keeps it for later activations of the session. MCP tool images reach the model only once the session declares it.pi_agent(feat(pi): attach prompt images in agent sessions #4923 heade182553) declares image input the same way, and turns off Pi's own resizing in every session.hermes_agent(feat(agents): support prompt images in Hermes, OpenClaw and Codex #5960) passes prompt images, earlier user turns included, as ordered Chat Completionsimage_urlparts withdetailkept, and stages no files. Codex, OpenClaw and Kilo still reject prompt images (to-do).With #5833 merged, the training section now says token capture keeps OpenCode's step-limit note chained, instead of saying
opencode_agentrefusesagent.build.stepsunder token capture.The guide recommends this rule: declare image input only for episodes that can carry images, turned on by configuration where the request cannot show it (Harbor's images are files in the task sandbox).
Validation
pre-commit run --fileson both files: passed (guardwords included).pytest tests/unit_tests/agents/test_skills.py tests/unit_tests/test_fern_docs_links.py: 53 passed (24 subtests).#support-images,#prompt-images,#tool-reply-images,#declare-image-input,mcp-resources-server#return-images-from-a-tool,vllm#vllmmodel-configuration-reference).fern checkwas not run locally; CI runs it.Rollouts
Documentation only. The prompt-image behavior it describes was checked with a real vision model (Qwen3-VL-8B-Instruct on vLLM) on
circle_count, 5 tasks × 2 repeats per harness, each agent in its own Enroot sandbox: OpenCode on main7c79b15, and Pi on #4923e182553merged with that main. Both graded 10/10 rollouts, with the same/tmp/nemo-gym-media/<sha256>.pngpath on every repeat of a task. Text-only rows declared no image input. A remote image URL returned 422. A 2400 px image reached the model unresized under both harnesses. Tool-reply images (#5719) were not part of that run.Checklist
git commit -s).🤖 Generated with Claude Code