Skip to content

[codex] Remove async_trait from ToolExecutor#27304

Merged
anp-oai merged 1 commit into
mainfrom
codex/remove-async-trait-tool-executor
Jun 10, 2026
Merged

[codex] Remove async_trait from ToolExecutor#27304
anp-oai merged 1 commit into
mainfrom
codex/remove-async-trait-tool-executor

Conversation

@anp-oai

@anp-oai anp-oai commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Why

We're now discouraging use of async_trait.

Removing use of async_trait from ToolExecutor yields a codex_core debug test build speedup of ~78% (from 227.5s to 50.3s) on my machine.

Stacked on #27299, this PR applies the trait change after the handler bodies have been outlined.

What

Changed ToolExecutor::handle to return an explicit boxed ToolExecutorFuture instead of using async_trait.

Updated ToolExecutor implementors to return Box::pin(...), reexported the future alias through codex-tools and codex-extension-api, and removed codex-tools direct async-trait dependency.

@anp-oai anp-oai force-pushed the codex/outline-extension-tool-executor-handlers branch from 637d93b to c8718d2 Compare June 10, 2026 04:01
@anp-oai anp-oai force-pushed the codex/remove-async-trait-tool-executor branch 2 times, most recently from 0374251 to 7178ab0 Compare June 10, 2026 04:11
@anp-oai anp-oai force-pushed the codex/outline-extension-tool-executor-handlers branch from c8718d2 to 039d199 Compare June 10, 2026 04:11
@anp-oai anp-oai force-pushed the codex/remove-async-trait-tool-executor branch from 7178ab0 to ab6243a Compare June 10, 2026 04:39
@anp-oai anp-oai changed the base branch from codex/outline-extension-tool-executor-handlers to codex/outline-standalone-tool-executor-handlers June 10, 2026 04:39
Comment thread codex-rs/core/src/tools/handlers/agent_jobs/spawn_agents_on_csv.rs Outdated
Comment thread codex-rs/core/src/tools/handlers/multi_agents_v2/followup_task.rs Outdated
Comment thread codex-rs/core/src/tools/handlers/multi_agents_v2/send_message.rs Outdated
Comment thread codex-rs/core/src/tools/handlers/extension_tools.rs Outdated
Comment thread codex-rs/core/src/tools/parallel.rs Outdated
Comment thread codex-rs/core/src/tools/registry_tests.rs Outdated
Comment thread codex-rs/core/src/tools/router_tests.rs Outdated
@anp-oai anp-oai force-pushed the codex/outline-standalone-tool-executor-handlers branch from 5d2045a to 082c606 Compare June 10, 2026 05:14
@anp-oai anp-oai force-pushed the codex/remove-async-trait-tool-executor branch from ab6243a to 48ebdd0 Compare June 10, 2026 05:14
Comment thread codex-rs/core/src/tools/handlers/extension_tools.rs Outdated
@anp-oai anp-oai force-pushed the codex/outline-standalone-tool-executor-handlers branch from 082c606 to d41f9c4 Compare June 10, 2026 05:43
@anp-oai anp-oai force-pushed the codex/remove-async-trait-tool-executor branch from 48ebdd0 to 4c027c9 Compare June 10, 2026 05:43
@anp-oai anp-oai marked this pull request as ready for review June 10, 2026 15:28
@anp-oai anp-oai requested a review from a team as a code owner June 10, 2026 15:28
@anp-oai anp-oai force-pushed the codex/remove-async-trait-tool-executor branch from 4c027c9 to 4515525 Compare June 10, 2026 16:10
@anp-oai anp-oai force-pushed the codex/outline-standalone-tool-executor-handlers branch 2 times, most recently from 01a4245 to dfb5c0c Compare June 10, 2026 16:24
@anp-oai anp-oai force-pushed the codex/remove-async-trait-tool-executor branch from 4515525 to d8d2d9e Compare June 10, 2026 16:30
Base automatically changed from codex/outline-standalone-tool-executor-handlers to main June 10, 2026 16:40
@anp-oai anp-oai force-pushed the codex/remove-async-trait-tool-executor branch 2 times, most recently from 07ec283 to 18dee87 Compare June 10, 2026 17:00
@anp-oai anp-oai force-pushed the codex/remove-async-trait-tool-executor branch from 18dee87 to fffd003 Compare June 10, 2026 17:12
@anp-oai anp-oai merged commit 2704ece into main Jun 10, 2026
31 checks passed
@anp-oai anp-oai deleted the codex/remove-async-trait-tool-executor branch June 10, 2026 17:26
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 10, 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