Repository navigation
Let Harnesses own image input rules - #777
Merged
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
SaladDay
force-pushed
the
let-harnesses-own-image-input-rules
branch
from
October 19, 2026 09:50
b6b8a85 to
e0b2806
Compare
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.
Each Harness now declares the images it accepts, instead of Core applying the Claude bridge's inline PNG/JPEG rule to every Harness.
The official
input_image.image_urlmay be a remote URL or a data URL of any image type. Core used to require an inlinedata:image/pngordata:image/jpegbase64 URL whose bytes matched the type, for every Harness, before reading any declaration.ValidateMessageInputbesideValidateFunctionResultininternal/harnessconfig/harness.go. Core calls it in admission, after theMessageImagescapability check and before anything is stored. Core itself keeps only the shape check and the capability checks.proto.ValidateInlineImagesis deleted.http/httpsimage URLs (case-insensitive scheme) inturn/start,turn/steerand dynamic tool results (app-server/src/image_url.rs), so the declaration rejects them with the native message for messages and function results. Any data URL passes unchanged; the provider's own error returns unchanged.base64(image/jpeg,image/png,image/gif,image/webp),urlandfile. A message reference that is not a data URL becomes a nativeurlsource, as the CLI passes any non-base64 source through; a data URL must be canonical base64 of those four types. Function results go back as MCP tool results, which carry only base64 data, so remote URLs stay rejected there. Core no longer decodes image bytes: the CLI replaces an image it cannot process with a text note, and the bridge accepts that note in the image position.Deleted:
proto.ValidateInlineImagesand its test, the daemon's duplicate error-image check, the bridge's received-image re-validation,TestImageQualificationIsIndependentOfEnvironmentSource, the unusedofficial_workspace_images_native.pyand a vacuous creation test case.Docs: message-content.md, harness-capabilities.md (remote, GIF and WebP marked admitted, not verified), index.md, harness-onboarding.md, the public Agents API guide, with zh mirrors.