Skip to content

feat(mcp): preserve bounded inline image results - #113

Merged
DaXu999 merged 1 commit into
mainfrom
codex/mcp-image-results
Nov 8, 2026
Merged

DaXu999 merged 1 commit into
mainfrom
codex/mcp-image-results

Conversation

@DaXu999

@DaXu999 DaXu999 commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator

What

Successful host tools can return bounded inline images through metadata['sharedos/content']. The MCP adapter keeps its existing text summary and appends validated JPEG, PNG or WebP image blocks, so a native MCP harness sees the actual desktop screenshot.

Images are limited to four blocks and 4 MiB of encoded data in total. Invalid payloads and failed tool results never produce image blocks. Nothing is fetched by URL, and no export or authority rule changes.

History

Written by waterdoog and merged as #110 into feat/reasoning-effort rather than main. This is the same commit rebased onto main (git range-diff shows the patch unchanged), so it goes in on its own.

Checks

pnpm check is green on the rebased branch: format, typecheck, vitest 1139/1139, test:release 7/7, docs:api:check and conformance:check. #110 also reports a real native Codex harness observing and operating two independent Linux desktops through this adapter.

Let hosted desktop tools return the actual screenshot to native MCP harnesses while retaining the text summary. Validate inline formats and bounds and exclude failed results; metadata remains a presentation hint, not authority.
@DaXu999
DaXu999 merged commit 3391a31 into main Nov 8, 2026
2 checks passed
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.

2 participants