Refactor extension tools onto shared ToolExecutor#22369
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 99b484f64e
ℹ️ 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".
99b484f to
6d933cc
Compare
|
@codex review |
6d933cc to
3b880a5
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6d933cc7b9
ℹ️ 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".
3b880a5 to
78786f2
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 78786f204b
ℹ️ 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".
Why
Extension tools were split across two public runtime contracts:
codex-tool-apiexposedToolBundleplus its own call/spec/error types, while core native tools usedcodex_tools::ToolExecutor. That made contributed tool specs and execution behavior easy to drift apart and added another crate boundary for what should be one executable-tool seam.This PR makes
ToolExecutorthe single runtime contract and keeps extension-specific pinning incodex-extension-api.Remaining todo
https://github.com/openai/codex/pull/22369/changes#diff-b935ea8245c3ce568a30cff660175fa6390b66b872ae409e1e2e965738250741R5
Either generic
Invocationor sub-extract theToolCalland cleanToolInvocationWhat changed
codex-tool-apiworkspace crate and its dependencies from core andcodex-extension-api.codex_tools::ToolExecutorobject-safe withasync_traitso extension contributors can return a dyn executor.ext/extension-api/src/contributors/tools.rs, includingExtensionToolExecutor = dyn ToolExecutor<ToolCall, Output = ExtensionToolOutput>.ToolContributor::toolsto return extension executors directly instead ofToolBundles.ToolInvocationruntime path.Verification
cargo test -p codex-toolscargo test -p codex-extension-api