Skip to content

Enable parallel tool calls for Codex Apps - #31591

Open
soheil-oai wants to merge 9 commits into
mainfrom
codex/connect-810-parallel-connector-tools
Open

Enable parallel tool calls for Codex Apps#31591
soheil-oai wants to merge 9 commits into
mainfrom
codex/connect-810-parallel-connector-tools

Conversation

@soheil-oai

@soheil-oai soheil-oai commented Jul 8, 2026

Copy link
Copy Markdown

Summary

  • add a disabled-by-default codex_apps_parallel_tool_calls feature
  • opt the host-owned codex_apps MCP server into parallel tool calls when enabled
  • preserve existing behavior for user-configured and third-party MCP servers
  • cover direct feature enablement, service-provided SessionThreadConfig.features, and end-to-end call scheduling

Why

Codex currently parallelizes MCP calls only when a server opts in with supports_parallel_tool_calls or a tool advertises readOnlyHint: 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 passed
  • just test -p codex-core codex_apps_parallel_tool_calls — 2 passed
  • just test -p codex-core codex_apps_calls_run_ — 2 passed (two clean runs)

Rebased onto origin/main at 0bbea86a6aae37b1f243676db4248000f04ad111 before the final push.

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


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.

@soheil-oai
soheil-oai force-pushed the codex/connect-810-parallel-connector-tools branch 3 times, most recently from 450e15a to 909535b Compare July 8, 2026 15:22
@soheil-oai
soheil-oai marked this pull request as ready for review July 8, 2026 17:34
@soheil-oai
soheil-oai requested a review from a team as a code owner July 8, 2026 17:34

@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: 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".

Comment thread codex-rs/core/src/mcp.rs Outdated
Comment thread codex-rs/features/src/lib.rs
soheil-oai added a commit that referenced this pull request Jul 8, 2026
soheil-oai added a commit that referenced this pull request Jul 8, 2026
soheil-oai added a commit that referenced this pull request Jul 8, 2026
soheil-oai added a commit that referenced this pull request Jul 9, 2026
soheil-oai added a commit that referenced this pull request Jul 9, 2026
soheil-oai added a commit that referenced this pull request Jul 9, 2026
@soheil-oai
soheil-oai force-pushed the codex/connect-810-parallel-connector-tools branch from ff964ce to b7b9dfb Compare July 9, 2026 13:55
soheil-oai added a commit that referenced this pull request Jul 9, 2026
soheil-oai added a commit that referenced this pull request Jul 9, 2026
soheil-oai added a commit that referenced this pull request Jul 9, 2026
soheil-oai added a commit that referenced this pull request Jul 9, 2026
soheil-oai added a commit that referenced this pull request Jul 9, 2026
soheil-oai added a commit that referenced this pull request Jul 9, 2026
soheil-oai added a commit that referenced this pull request Jul 9, 2026
soheil-oai added a commit that referenced this pull request Jul 9, 2026
soheil-oai added a commit that referenced this pull request Jul 9, 2026
@soheil-oai
soheil-oai force-pushed the codex/connect-810-parallel-connector-tools branch from 56065f4 to deff6d8 Compare July 9, 2026 16:58
Comment thread codex-rs/core/src/mcp.rs Outdated
Comment thread codex-rs/core/src/mcp_tests.rs Outdated
Comment thread codex-rs/ext/mcp/src/lib.rs Outdated
use std::time::Duration;

#[derive(Debug, Eq, PartialEq)]
enum McpCallEvent {

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.

nit: do we have an existing app-related integration test file?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

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.

soheil-oai added a commit that referenced this pull request Jul 9, 2026
soheil-oai added a commit that referenced this pull request Jul 9, 2026
@soheil-oai
soheil-oai force-pushed the codex/connect-810-parallel-connector-tools branch from e2fd7a3 to 5897e35 Compare July 9, 2026 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants