[Bug]: Codex text generation fails with "invalid transport" when launch args define an MCP server
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 半日
- 初心者へのやさしさ
- 58/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- shell, typescript
- 領域
- backend
調査の方向性
Start in apps/server/src/textGeneration/CodexTextGeneration.ts, where codexMcpServersOff builds the inline mcp_servers={...} override and codexExecLaunchArgs supplies the earlier -c flags. The issue's shell snippets reproduce the override conflict with the plain Codex CLI, so run them first. Done means text generation succeeds with a launch-arg MCP server present and that server is disabled for the run. Server names containing a dot need the table form kept, so account for that case.
索引モデルが issue の本文から書いたものです。
説明
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
- Give a Codex provider instance launch args that define an MCP server with
-cflags, for example:-c 'mcp_servers.t3-code.url="http://127.0.0.1:1/mcp"' -c 'mcp_servers.t3-code.enabled_tools=["t3_thread_list"]' - Use that instance for text generation.
- Start a new thread in a worktree.
The cause reproduces with plain Codex CLI, without T3:
A=(-c 'mcp_servers.t3-code.url="http://127.0.0.1:1/mcp"')
codex "${A[@]}" -c 'mcp_servers={"t3-code"={enabled=false}}' mcp list --json # invalid transport in `mcp_servers.t3-code`
codex "${A[@]}" -c 'mcp_servers.t3-code.enabled=false' mcp list --json # works: enabled=false, transport kept
codex -c 'mcp_servers={"t3-code"={enabled=false}}' "${A[@]}" mcp list --json # works: table first, launch args merge into it
Expected behavior
The thread gets a generated title and the worktree branch is renamed, with the launch-arg MCP server turned off for the text-generation run like any other server.
Actual behavior
Every text-generation run fails before Codex starts, so threads keep no generated title and branches keep their t3/xxxxxxxx name:
Could not rename the worktree branch, so it stays t3/cbad53ab. Text generation failed in generateBranchName:
Codex CLI command failed: Error loading config.toml: invalid transport
in `mcp_servers.t3-code`
generateThreadTitle fails with the same error.
Cause. In apps/server/src/textGeneration/CodexTextGeneration.ts, codexMcpServersOff turns the listed servers off with one inline table:
`mcp_servers={${names.map((name) => `${JSON.stringify(name)}={enabled=false}`).join(",")}}`
Since #32597, the launch args' -c flags also reach codex exec through codexExecLaunchArgs, ahead of this table. Within Codex's CLI override layer, the later mcp_servers={...} replaces the mcp_servers table that the earlier -c mcp_servers.t3-code.* flags built. That leaves t3-code = {enabled=false} with no transport. Servers defined in config.toml are unaffected, because the CLI layer merges with the file layer.
A quoted dotted path, -c 'mcp_servers."t3-code".enabled=false', also failed, with invalid transport in mcp_servers."t3-code", so Codex does not seem to read quoted segments in -c keys.
Suggested change. Emit one --config mcp_servers.<name>.enabled=false per server instead of one table, because a dotted override merges with whatever earlier flags defined. Server names that contain a . cannot be written that way. Those could keep the table form, placed before codexExecLaunchArgs(launchArgs) so that the launch args merge into it instead of being replaced.
Impact
Major degradation or frequent failure
Version or commit
0.1.10-nightly.20261113.4616
Environment
Linux (WSL2), Codex CLI 0.169.0-alpha.6
Logs or stack traces
TextGenerationError: Text generation failed in generateThreadTitle: Codex CLI command failed: Error loading config.toml: invalid transport
in `mcp_servers.t3-code`
at runCodexJson.runCodexCommand (.../t3:355300:20)
Workaround
A wrapper set as the provider's binary path that rewrites the mcp_servers={"NAME"={enabled=false},...} argument into one mcp_servers.NAME.enabled=false flag per server, in the same position.
- 主要言語
- TypeScript
- スター
- 24.8k
- フォーク
- 6.4k
- 平均マージ
- 59分
- マージ済み PR(30日)
- 418
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pingdotgg/t3code のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
via-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 半日 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
[Bug]: Settings inheritance popover shows raw slugs for branch naming, default permissions and response streaming対応中かも @juliusmarminge が 1 日前に担当しました。 オープンvouch:denounced
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
pingdotgg/t3code の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
nikoheikkila/nikoheikkila.fi#1131 ·
メンテナーはふだん 1 日以内に返信
-
Resources: Update work of urumqi対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
railmapgen/rmp-gallery#4176 ·
メンテナーはふだん 2 日以内に返信
-
GraphQL custom headers duplicate differently cased default headers対応中かも @yxr-2025 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
elie222/rakazo#4625 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
[New Project]: Pacaオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
github/forgoodfirstissue#574 ·