Skip to content

[codex] Emit image view as core item#20512

Merged
pakrym-oai merged 5 commits intomainfrom
pakrym/image-view-core-item
May 1, 2026
Merged

[codex] Emit image view as core item#20512
pakrym-oai merged 5 commits intomainfrom
pakrym/image-view-core-item

Conversation

@pakrym-oai
Copy link
Copy Markdown
Collaborator

@pakrym-oai pakrym-oai commented Apr 30, 2026

Why

Image-view results should be represented as a core-produced turn item instead of being reconstructed by app-server. At the same time, existing rollout/history paths still understand the legacy ViewImageToolCall event, so this keeps that event as compatibility output generated from the new item lifecycle.

What changed

  • Added TurnItem::ImageView to codex-protocol.
  • Emitted image-view item start/completion directly from the core view_image handler.
  • Kept ViewImageToolCall as a legacy event and generate it from completed TurnItem::ImageView items.
  • Kept thread_history.rs on the legacy ViewImageToolCall replay path, with ImageView item lifecycle events ignored there.
  • Updated app-server protocol conversion, rollout persistence, and affected exhaustive event matches for the new item plus legacy fan-out shape.

Verification

  • cargo test -p codex-protocol -p codex-app-server-protocol -p codex-rollout -p codex-rollout-trace -p codex-mcp-server -p codex-app-server --lib
  • cargo test -p codex-core --test all view_image_tool_attaches_local_image
  • just fix -p codex-protocol -p codex-core -p codex-app-server-protocol -p codex-app-server -p codex-rollout -p codex-rollout-trace -p codex-mcp-server
  • git diff --check

@pakrym-oai pakrym-oai marked this pull request as ready for review April 30, 2026 22:15
@pakrym-oai pakrym-oai requested a review from a team as a code owner April 30, 2026 22:15
Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dbc80a136a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread codex-rs/protocol/src/protocol.rs
Bojun-Vvibe added a commit to Bojun-Vvibe/oss-contributions that referenced this pull request May 1, 2026
@pakrym-oai pakrym-oai merged commit aed74e5 into main May 1, 2026
25 checks passed
@pakrym-oai pakrym-oai deleted the pakrym/image-view-core-item branch May 1, 2026 18:28
@github-actions github-actions Bot locked and limited conversation to collaborators May 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants