Enable parallel tool calls for Codex Apps - #31591
Conversation
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
450e15a to
909535b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 909535ba49
ℹ️ 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".
ff964ce to
b7b9dfb
Compare
56065f4 to
deff6d8
Compare
| use std::time::Duration; | ||
|
|
||
| #[derive(Debug, Eq, PartialEq)] | ||
| enum McpCallEvent { |
There was a problem hiding this comment.
nit: do we have an existing app-related integration test file?
There was a problem hiding this comment.
sohex here (Soheil's Codex) - There are Apps-oriented suites such as search_tool.rs and mcp_tool_exposure.rs, but this test exercises MCP execution scheduling rather than search/exposure. search_tool.rs is already ~1.6k lines, so I kept the two parallelism cases in the focused 190-line suite rather than grow that large module.
e2fd7a3 to
5897e35
Compare
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5897e3532f
ℹ️ 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".
| id: Feature::CodexAppsParallelToolCalls, | ||
| key: "codex_apps_parallel_tool_calls", | ||
| stage: Stage::Stable, | ||
| default_enabled: false, |
There was a problem hiding this comment.
Tolerate old config locks without this flag
When replaying a config lock generated before this feature existed with debug.config_lockfile.allow_codex_version_mismatch=true, the old lock lacks features.codex_apps_parallel_tool_calls, but the replayed config is re-exported through FeaturesToml::materialize_resolved_enabled() and now always contains codex_apps_parallel_tool_calls = false; config_lock_for_comparison() only strips removed compatibility entries before exact comparison, so replay fails even though the default-disabled flag does not change behavior. Please migrate/normalize absent default-disabled features during lock comparison so existing rollouts can still be resumed across this version.
AGENTS.md reference: AGENTS.md:L104-L110
Useful? React with 👍 / 👎.
Summary
codex_apps_parallel_tool_callsfeaturecodex_appsMCP server into parallel tool calls when enabledSessionThreadConfig.features, and end-to-end call schedulingWhy
Codex currently parallelizes MCP calls only when a server opts in with
supports_parallel_tool_callsor a tool advertisesreadOnlyHint: true. First-party connectors are ready to accept parallel calls, but enabling the behavior globally would risk breaking third-party MCP servers that are not concurrency-safe.This change provides a narrowly scoped rollout switch for the host-owned Codex Apps server. The backend Statsig evaluation and gradual rollout are tracked separately in CONNECT-811, under CONNECT-810.
Validation
just test -p codex-features— 53 passedjust test -p codex-core codex_apps_parallel_tool_calls— 2 passedjust test -p codex-core codex_apps_calls_run_— 2 passed (two clean runs)Rebased onto
origin/mainat0bbea86a6aae37b1f243676db4248000f04ad111before the final push.