Skip to content

fix(mcp): apply team timeouts to Codex tool calls - #2277

Open
ydflow wants to merge 1 commit into
Tencent:mainfrom
ydflow:fix/codex-mcp-tool-timeout
Open

ydflow wants to merge 1 commit into
Tencent:mainfrom
ydflow:fix/codex-mcp-tool-timeout

Conversation

@ydflow

@ydflow ydflow commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Summary

The team MCP definition accepts a request timeout in milliseconds. For the HTTP server in the sharing guide, timeout: 600000 gave Codex 600 seconds to start the server, but individual tool calls still used Codex's default 60-second limit. Codex has separate settings for those two operations. Codex MCP configuration

Write tool_timeout_sec for both HTTP and stdio servers when the team supplies a timeout. Tool calls get the exact duration in seconds, including fractions. Startup keeps its existing whole-second rounding. Omitting the team setting leaves both defaults to Codex.

Type of Change

  • Bug fix

Test Plan

  • Extended the existing HTTP and stdio reconciliation cases. Both failed on 1877febf with a missing tool timeout. They passed on this branch, along with the adjacent round-trip test. Typecheck, build and git diff --check passed.
  • Ran the compiled teamai mcp inject against a local team repository and an isolated member home on Windows. Installed the entries with the upstream build, then ran the fixed build on the same managed configuration. Read each entry using codex mcp get --json <name> with Codex CLI 0.172.0.
Team configuration Startup seconds (before / after) Tool seconds (before / after)
HTTP, 600000 ms 600 / 600 unset / 600
stdio, 1500 ms 2 / 2 unset / 1.5
timeout omitted unset / unset unset / unset

All three ownership records survived the upgrade. Another inject reported Already up to date and kept the TOML byte-identical. This exercise verified the configuration consumed by Codex and did not call an external MCP server. The repository's verify:world command rejects native Windows, so there is no POSIX world ledger.

Notes for Reviewers

Ran the full src/__tests__/mcp-reconcile.test.ts file on both upstream 1877febf and this branch in isolated Windows homes. Both runs had 278 passes, 7 skips and the same 35 failing test names, including file symlink creation denied by Windows. Lint reached the documentation check and reported the same missing workbuddypro matrix entry as upstream.

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.

1 participant