Skip to content

Add codemode image support#561

Merged
akhilles merged 4 commits intomainfrom
codemode-images
Feb 20, 2026
Merged

Add codemode image support#561
akhilles merged 4 commits intomainfrom
codemode-images

Conversation

@akhilles
Copy link
Contributor

@akhilles akhilles commented Feb 20, 2026

Renders to terminal if interactive + supported. Prints the JSON response of out dir if not.

Screenshot 2026-02-19 at 8 47 35 PM
Open with Devin

Note

Medium Risk
Introduces new output paths (inline terminal escape sequences and filesystem writes) and changes how tool call results are serialized, which may affect consumers and error handling around image decoding and artifact paths.

Overview
Adds image-aware tool execution to the MCP codemoder runtime by preserving CallToolResultContent::Image blocks: ExecutionResult now includes images, tool results are serialized with typed content objects (image/resource_link/text), and images are collected during tool calls.

Updates the execute_tools meta-tool response to include image blocks alongside the JSON summary, and extends pcb mcp eval with --output-dir plus logic to either render PNGs inline in Kitty/Ghostty interactive terminals or decode base64 image data, write artifacts to a directory, and replace embedded image objects with image_file references in the printed JSON.

Enables the execute_tools tool in the agent skill config and adds the base64 dependency needed for decoding/encoding image data.

Written by Cursor Bugbot for commit c2bb9b0. This will update automatically on new commits. Configure here.

@akhilles akhilles requested a review from LK February 20, 2026 01:48
devin-ai-integration[bot]

This comment was marked as resolved.

cursor[bot]

This comment was marked as resolved.

cursor[bot]

This comment was marked as resolved.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

think this is unintentional?

@akhilles akhilles merged commit 5a2efa0 into main Feb 20, 2026
12 checks passed
@akhilles akhilles deleted the codemode-images branch February 20, 2026 04:52
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

"properties": {}
}),
output_schema: None,
},
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unintentional render tool added to existing test

Low Severity

The render ToolInfo was added to the MockToolCaller in test_execute_with_tools, but that test never calls tools.render() — it only tests add and greet. The new test_image_content_preserved test creates its own separate caller with just the render tool, so this addition to the existing test is unnecessary. This is likely the change that was flagged as "unintentional" in the PR discussion.

Fix in Cursor Fix in Web

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