Skip to content

Let Harnesses own image input rules - #777

Merged
SaladDay merged 3 commits into
mainfrom
let-harnesses-own-image-input-rules
Oct 19, 2026
Merged

SaladDay merged 3 commits into
mainfrom
let-harnesses-own-image-input-rules

Conversation

@SaladDay

@SaladDay SaladDay commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

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_url may be a remote URL or a data URL of any image type. Core used to require an inline data:image/png or data:image/jpeg base64 URL whose bytes matched the type, for every Harness, before reading any declaration.

  • Declaration protocol: ValidateMessageInput beside ValidateFunctionResult in internal/harnessconfig/harness.go. Core calls it in admission, after the MessageImages capability check and before anything is stored. Core itself keeps only the shape check and the capability checks. proto.ValidateInlineImages is deleted.
  • Codex: native 0.153.4 rejects http/https image URLs (case-insensitive scheme) in turn/start, turn/steer and 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.
  • Claude Code: the pinned CLI's image source is a union of base64 (image/jpeg, image/png, image/gif, image/webp), url and file. A message reference that is not a data URL becomes a native url source, 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.
  • MiniMax Code: unchanged; native ACP has no image input.

Deleted: proto.ValidateInlineImages and its test, the daemon's duplicate error-image check, the bridge's received-image re-validation, TestImageQualificationIsIndependentOfEnvironmentSource, the unused official_workspace_images_native.py and 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.

@blacksmith-sh

This comment has been minimized.

@SaladDay
SaladDay force-pushed the let-harnesses-own-image-input-rules branch from b6b8a85 to e0b2806 Compare October 19, 2026 09:50
@SaladDay
SaladDay merged commit 909b859 into main Oct 19, 2026
25 checks passed
@SaladDay
SaladDay deleted the let-harnesses-own-image-input-rules branch October 19, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant