Skip to content

Windows Codex Desktop: opening/resuming historical subagent threads spawns duplicate MCP and node_repl process stacks #37453

Description

@MarkoAvreliy

What version of the Codex App are you using (From “About Codex” dialog)?

Codex Desktop package: OpenAI.Codex_26.803.5235.0_x64

What subscription do you have?

This appears related to MCP lifecycle/refresh handling + sub agents

What platform is your computer?

No response

What issue are you seeing?

Summary

Codex Desktop on Windows creates duplicate local MCP and node_repl.exe process stacks when I open/resume historical chats that contain many completed subagents.

This occurs even when I do not send a new message or run a tool. Simply opening an old parent chat, and then opening a completed child thread in the Subagents panel, triggers thread/resume and starts another full set of local MCP processes.

The processes remain alive as children of the current codex.exe app-server instead of returning to a bounded baseline.

Environment

  • OS: Windows
  • Codex Desktop package: OpenAI.Codex_26.803.5235.0_x64
  • Main process:
    codex.exe -c features.code_mode_host=true app-server --analytics-default-enabled
  • Configured local stdio MCP servers:
    • MarkItDown
    • brain-memory
    • brain-knowledge
  • Also enabled: node_repl / Browser / Computer Use

Reproduction

  1. Fully quit Codex Desktop.
  2. Launch Codex Desktop and do not open historical chats initially.
  3. Baseline is one process stack:
    • 1 node_repl.exe
    • 1 MarkItDown MCP wrapper
    • 1 brain-memory MCP wrapper
    • 1 brain-knowledge MCP wrapper
  4. Open one historical parent chat with many old subagents. Do not send a message.
  5. The Subagents panel initially shows many old children as Working.
  6. Open one or more old child threads. Their displayed state immediately changes from Working to Done.
  7. Observe duplicate process stacks under the current codex.exe.

Observed result

After opening a historical parent chat and inspecting old child threads, the current codex.exe had:

  • 8 node_repl.exe direct children
  • 8 MarkItDown MCP wrapper processes
  • 8 brain-memory MCP wrapper processes
  • 8 brain-knowledge MCP wrapper processes
  • 32 direct helper processes total
  • 48 Python processes in the Codex process tree

No new user task, subagent launch, or MCP tool call was requested.

The local app-server log shows thread/resume at the same timestamps as MCP startup / tool catalog initialization, including:

app_server.request ... otel.name="thread/resume"
MCP server ... Processing request of type ListToolsRequest
codex_mcp::connection_manager::tool_catalog

### What steps can reproduce the bug?

## Summary

Codex Desktop on Windows creates duplicate local MCP and `node_repl.exe` process stacks when I open/resume historical chats that contain many completed subagents.

This occurs even when I do not send a new message or run a tool. Simply opening an old parent chat, and then opening a completed child thread in the Subagents panel, triggers `thread/resume` and starts another full set of local MCP processes.

The processes remain alive as children of the current `codex.exe app-server` instead of returning to a bounded baseline.

## Environment

- OS: Windows
- Codex Desktop package: `OpenAI.Codex_26.803.5235.0_x64`
- Main process:
  `codex.exe -c features.code_mode_host=true app-server --analytics-default-enabled`
- Configured local stdio MCP servers:
  - MarkItDown
  - brain-memory
  - brain-knowledge
- Also enabled: `node_repl` / Browser / Computer Use

## Reproduction

1. Fully quit Codex Desktop.
2. Launch Codex Desktop and do not open historical chats initially.
3. Baseline is one process stack:
   - 1 `node_repl.exe`
   - 1 MarkItDown MCP wrapper
   - 1 brain-memory MCP wrapper
   - 1 brain-knowledge MCP wrapper
4. Open one historical parent chat with many old subagents. Do not send a message.
5. The Subagents panel initially shows many old children as `Working`.
6. Open one or more old child threads. Their displayed state immediately changes from `Working` to `Done`.
7. Observe duplicate process stacks under the current `codex.exe`.

## Observed result

After opening a historical parent chat and inspecting old child threads, the current `codex.exe` had:

- 8 `node_repl.exe` direct children
- 8 MarkItDown MCP wrapper processes
- 8 brain-memory MCP wrapper processes
- 8 brain-knowledge MCP wrapper processes
- 32 direct helper processes total
- 48 Python processes in the Codex process tree

No new user task, subagent launch, or MCP tool call was requested.

The local app-server log shows `thread/resume` at the same timestamps as MCP startup / tool catalog initialization, including:

```text
app_server.request ... otel.name="thread/resume"
MCP server ... Processing request of type ListToolsRequest
codex_mcp::connection_manager::tool_catalog

### What is the expected behavior?

_No response_

### Additional information

Additional context
This appears related to MCP lifecycle/refresh handling. PR #19753 added explicit shutdown handling for MCP refresh and session shutdown:
https://github.com/openai/codex/pull/19753
Potentially related report:
https://github.com/openai/codex/issues/26869

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appapp-serverIssues involving app server protocol or interfacesbugSomething isn't workingmcpIssues related to the use of model context protocol (MCP) serversperformancesubagentIssues involving subagents or multi-agent featureswindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions