Skip to content

Route image extension reads through turn environments v2#27498

Merged
won-openai merged 8 commits into
mainfrom
img_sandbox_env
Jun 11, 2026
Merged

Route image extension reads through turn environments v2#27498
won-openai merged 8 commits into
mainfrom
img_sandbox_env

Conversation

@won-openai

Copy link
Copy Markdown
Contributor

Why

Image generation used std::fs::read for referenced image paths, which did not support environment-backed filesystems or their sandbox context.

What changed

  • Expose optional turn environments to extension tool calls.
  • Include each environment’s ID, working directory, filesystem, and sandbox context.
  • Read referenced images through the selected environment filesystem.
  • Keep sandbox usage at the extension call site so extensions can choose the appropriate access mode.
  • Consolidate image request construction into one async function.
  • Add coverage for successful environment reads and read failures.

Validation

  • cargo check -p codex-image-generation-extension --tests
  • just fmt
  • just bazel-lock-update
  • just bazel-lock-check

just test -p codex-image-generation-extension could not complete because the build exhausted available disk space.

@won-openai
won-openai requested a review from a team as a code owner June 11, 2026 00:20
@won-openai
won-openai marked this pull request as draft June 11, 2026 00:20
@won-openai won-openai changed the title Route image extension reads through turn environments Route image extension reads through turn environments v2 Jun 11, 2026

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

Copy link
Copy Markdown
Contributor

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: 27e50cfa07

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/tools/Cargo.toml
Comment thread codex-rs/ext/image-generation/src/tests.rs
Comment thread codex-rs/ext/image-generation/src/tool.rs Outdated
@won-openai
won-openai marked this pull request as ready for review June 11, 2026 17:00
Comment thread codex-rs/ext/image-generation/src/tests.rs Outdated
Comment thread codex-rs/ext/goal/tests/goal_extension_backend.rs Outdated

@pakrym-oai pakrym-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

minor comments

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

Copy link
Copy Markdown
Contributor

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: 6467362a57

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/core/src/tools/handlers/extension_tools.rs Outdated
Comment thread codex-rs/ext/image-generation/src/tool.rs Outdated
Comment thread codex-rs/app-server/tests/suite/v2/imagegen_extension.rs Outdated

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

Copy link
Copy Markdown
Contributor

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: 2feef6f6c7

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/core/src/tools/handlers/extension_tools.rs Outdated

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

Copy link
Copy Markdown
Contributor

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: 1812604613

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/tools/src/tool_call.rs
@won-openai
won-openai requested a review from pakrym-oai June 11, 2026 19:50
@won-openai
won-openai merged commit 19ce639 into main Jun 11, 2026
31 checks passed
@won-openai
won-openai deleted the img_sandbox_env branch June 11, 2026 23:32
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 11, 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