What version of the IDE extension are you using?
openai.chatgpt@26.5422.21459
What subscription do you have?
Free / not relevant to issue
Which IDE are you using?
Visual Studio Code 1.117.0 (user setup)
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 (x64)
What issue are you seeing?
Summary
The OpenAI ChatGPT / Codex VS Code extension starts the same MCP stdio server twice from a single ~/.codex/config.toml entry.
This is not Serena-specific: the same duplicate startup also happened with xcodebuildmcp.
Environment
- OS: Windows
- VS Code extension:
openai.chatgpt@26.5422.21459
- Codex process:
codex.exe app-server --analytics-default-enabled
- MCP server affected: Serena MCP
- Config file:
C:\Users\<user>\.codex\config.toml
Serena config
[mcp_servers.serena]
command = "uvx"
args = [
"--from",
"git+https://github.com/oraios/serena",
"serena",
"start-mcp-server",
"--context",
"codex"
]
### What steps can reproduce the bug?
1. Start VS Code with the OpenAI ChatGPT/Codex extension installed.
2. Open a workspace that has Codex MCP configured in ~/.codex/config.toml.
3. Configure one Serena MCP server only:
[mcp_servers.serena]
command = "uvx"
args = [
"--from",
"git+https://github.com/oraios/serena",
"serena",
"start-mcp-server",
"--context",
"codex"
]
4. Start/open the Codex Agent session from the VS Code extension.
5. Trigger/use the Serena MCP tools from Codex.
6. Inspect the process tree.
Expected result:
Only one Serena MCP server process should be started.
Actual result:
Two identical Serena MCP server process trees are started by the same codex.exe app-server process.
Observed process tree:
codex.exe app-server --analytics-default-enabled
-> uvx.exe --from git+https://github.com/oraios/serena serena start-mcp-server --context codex
-> uv.exe tool uvx --from git+https://github.com/oraios/serena serena start-mcp-server --context codex
-> serena.exe start-mcp-server --context codex
codex.exe app-server --analytics-default-enabled
-> uvx.exe --from git+https://github.com/oraios/serena serena start-mcp-server --context codex
-> uv.exe tool uvx --from git+https://github.com/oraios/serena serena start-mcp-server --context codex
-> serena.exe start-mcp-server --context codex
Both uvx.exe processes had the same parent process:
codex.exe app-server --analytics-default-enabled
There was only one [mcp_servers.serena] entry in ~/.codex/config.toml.
VS Code settings did not contain a separate Serena/MCP configuration.
### What is the expected behavior?
When a single MCP server is configured once in ~/.codex/config.toml, the Codex VS Code extension should start exactly one MCP server process for that entry.
For the Serena MCP config below, I expect one process tree only:
codex.exe app-server
-> uvx.exe --from git+https://github.com/oraios/serena serena start-mcp-server --context codex
-> uv.exe tool uvx ...
-> serena.exe start-mcp-server --context codex
The extension should not start two identical uvx/serena MCP process trees from the same codex.exe app-server parent unless there are two distinct configured MCP entries or two separate Codex Agent sessions that intentionally require separate MCP servers.
### Additional information
This does not appear to be VS Code itself launching Serena directly. The duplicate launch appears under the OpenAI/Codex extension's codex.exe app-server process.
In the same process snapshot, another MCP server (xcodebuildmcp) also appeared to be started twice under the same codex.exe parent, so this may be a duplicate MCP initialization issue rather than Serena-specific behavior.
What version of the IDE extension are you using?
openai.chatgpt@26.5422.21459
What subscription do you have?
Free / not relevant to issue
Which IDE are you using?
Visual Studio Code 1.117.0 (user setup)
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 (x64)
What issue are you seeing?
Summary
The OpenAI ChatGPT / Codex VS Code extension starts the same MCP stdio server twice from a single
~/.codex/config.tomlentry.This is not Serena-specific: the same duplicate startup also happened with
xcodebuildmcp.Environment
openai.chatgpt@26.5422.21459codex.exe app-server --analytics-default-enabledC:\Users\<user>\.codex\config.tomlSerena config