What version of the IDE extension are you using?
openai.chatgpt-26.417.40842 (bundled codex-cli 0.122.0-alpha.13)
What subscription do you have?
Personal paid ChatGPT plan
Which IDE are you using?
VS Code
What platform is your computer?
Microsoft Windows NT 10.0.26200 x64
What issue are you seeing?
On native Windows, the VS Code Codex extension appears to leak and duplicate local stdio MCP server processes.
I have a single configured local MCP server:
[mcp_servers.my-mcp]
command = 'E:\WORK\myMcp\.venv\Scripts\python.exe'
args = ['E:\WORK\myMcp\server.py']
Observed behavior:
- Old
codex.exe app-server --analytics-default-enabled processes remain alive after previous VS Code extension sessions/windows.
- Those stale
app-server processes keep their MCP child processes alive.
- If I manually kill the stale Python children, the stale
app-server processes respawn them.
- A single fresh
app-server can also start the same configured MCP server more than once.
This causes the same local MCP server to accumulate multiple orphaned process trees over time.
What steps can reproduce the bug?
- Configure one local stdio MCP server in
~/.codex/config.toml:
[mcp_servers.my-mcp]
command = 'E:\WORK\myMcp\.venv\Scripts\python.exe'
args = ['E:\WORK\myMcp\server.py']
- Start the Codex VS Code extension and use a workspace that has this MCP enabled.
- Open/close VS Code windows or restart the extension a few times.
- Inspect processes on Windows, for example with:
Get-CimInstance Win32_Process |
Where-Object { $_.Name -match '^(python|pythonw|codex)(\.exe)?$' } |
Select-Object ProcessId,ParentProcessId,Name,CommandLine,CreationDate |
Sort-Object Name,CreationDate | Format-List
What I observed:
- stale
codex.exe app-server processes from older sessions remain alive
- those stale parents keep or respawn the MCP child processes
- one fresh
app-server can spawn the same MCP server twice
Example of one fresh extension process spawning the same configured MCP twice:
19236 codex.exe app-server --analytics-default-enabled
├─ 38708 "E:\WORK\myMcp\.venv\Scripts\python.exe" E:\WORK\myMcp\server.py
│ └─ 44412 "D:\ProgramData\miniconda3\python.exe" E:\WORK\myMcp\server.py
└─ 23156 "E:\WORK\myMcp\.venv\Scripts\python.exe" E:\WORK\myMcp\server.py
└─ 45180 "D:\ProgramData\miniconda3\python.exe" E:\WORK\myMcp\server.py
What is the expected behavior?
For a single configured stdio MCP server, I would expect:
- at most one live MCP process tree per live
app-server owner
- MCP child processes to exit when their owning
app-server or VS Code session exits
- stale
app-server processes not to remain alive and not to respawn old MCP children
Additional information
Extension version: openai.chatgpt-26.417.40842
Bundled extension Codex binary: codex-cli 0.122.0-alpha.13
OS: Microsoft Windows NT 10.0.26200 x64
Notes:
- The duplicate/leaked process ownership looks like the main bug.
- The nested two-Python chain (
.venv\python.exe -> miniconda3\python.exe -> server.py) may be environment-specific, but even if that part is expected, the extension still appears to be leaking and duplicating MCP process trees on Windows.
- I can provide a fuller before/after process dump with PIDs and timestamps if needed.
What version of the IDE extension are you using?
openai.chatgpt-26.417.40842 (bundled codex-cli 0.122.0-alpha.13)
What subscription do you have?
Personal paid ChatGPT plan
Which IDE are you using?
VS Code
What platform is your computer?
Microsoft Windows NT 10.0.26200 x64
What issue are you seeing?
On native Windows, the VS Code Codex extension appears to leak and duplicate local stdio MCP server processes.
I have a single configured local MCP server:
Observed behavior:
codex.exe app-server --analytics-default-enabledprocesses remain alive after previous VS Code extension sessions/windows.app-serverprocesses keep their MCP child processes alive.app-serverprocesses respawn them.app-servercan also start the same configured MCP server more than once.This causes the same local MCP server to accumulate multiple orphaned process trees over time.
What steps can reproduce the bug?
~/.codex/config.toml:What I observed:
codex.exe app-serverprocesses from older sessions remain aliveapp-servercan spawn the same MCP server twiceExample of one fresh extension process spawning the same configured MCP twice:
What is the expected behavior?
For a single configured stdio MCP server, I would expect:
app-serverownerapp-serveror VS Code session exitsapp-serverprocesses not to remain alive and not to respawn old MCP childrenAdditional information
Extension version:
openai.chatgpt-26.417.40842Bundled extension Codex binary:
codex-cli 0.122.0-alpha.13OS:
Microsoft Windows NT 10.0.26200 x64Notes:
.venv\python.exe->miniconda3\python.exe->server.py) may be environment-specific, but even if that part is expected, the extension still appears to be leaking and duplicating MCP process trees on Windows.