Skip to content

feat: add extension turn-input contributors#25959

Merged
jif-oai merged 3 commits into
mainfrom
jif/turn-input-contrib
Jun 2, 2026
Merged

feat: add extension turn-input contributors#25959
jif-oai merged 3 commits into
mainfrom
jif/turn-input-contrib

Conversation

@jif-oai
Copy link
Copy Markdown
Collaborator

@jif-oai jif-oai commented Jun 2, 2026

Disclaimer

Do not use for now

Why

Extensions can already contribute prompt fragments and request same-turn item injection, but there was no host-owned hook for contributing structured ResponseItems while Codex is assembling a new turn's initial model input. This change adds that seam so extensions can attach turn-local input that depends on the submitted user input and resolved turn environments without routing through prompt text or late injection.

What changed

  • add TurnInputContributor to codex_extension_api and export the new TurnInputContext / TurnInputEnvironment types it receives
  • teach ExtensionRegistry to register and expose turn-input contributors alongside the existing extension hooks
  • call registered turn-input contributors from core/src/session/turn.rs while building the initial injected input for a turn, then append their returned ResponseItems after the skill and plugin injections

@jif-oai jif-oai requested a review from a team as a code owner June 2, 2026 22:56
@jif-oai jif-oai changed the title feat: turn input contributor feat: add extension turn-input contributors Jun 2, 2026
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: 2675bbaf20

ℹ️ 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/session/turn.rs
Comment thread codex-rs/core/src/session/turn.rs
Comment thread codex-rs/ext/extension-api/src/contributors.rs
Comment thread codex-rs/core/src/session/turn.rs
@jif-oai jif-oai merged commit 271d5ce into main Jun 2, 2026
31 checks passed
@jif-oai jif-oai deleted the jif/turn-input-contrib branch June 2, 2026 23:33
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 2, 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.

1 participant