Skip to content

Codex desktop repeatedly spawns duplicate STDIO MCP server processes and leaves them running #19845

Closed as duplicate

Description

@Woptope

What version of Codex is running?

codex-cli 0.125.0

Platform

macOS 26.4.1, Build 25E253

Problem

Codex desktop/app-server appears to repeatedly spawn duplicate STDIO MCP server processes for configured MCP servers and does not clean up old instances.

In this case, two configured STDIO MCP servers both use:

command = "uv"
args = ["run", "mcp-atlassian"]

Over time, process count grows substantially. During investigation, the count grew from 48 processes (~1.9 GB RSS) to 60 processes (~2.27 GB RSS), without explicit use of the Jira MCP tools.

Observed process pattern

Each server instance appears as a pair:

  • uv run mcp-atlassian
  • Python child running ~/.local/bin/mcp-atlassian

All are parented under Codex app-server:

Codex.app/Contents/Resources/codex app-server --analytics-default-enabled

Example process groups were started at different times, indicating repeated spawning rather than a single long-lived pair:

  • 4:43 PM
  • 5:22 PM
  • 7:21 PM
  • 7:23 PM
  • 7:35 PM
  • 7:39 PM

Expected behavior

Codex should either:

  • keep one live STDIO MCP server process per configured MCP server per active Codex client/session, or
  • clean up previous MCP server children when a session/tool client is closed/reloaded, or
  • provide an idle timeout / lazy-start mode for MCP servers.

Actual behavior

Duplicate MCP server processes accumulate and remain running. They consume memory and small but persistent CPU even when tools are not actively being called.

Relevant config shape

Sanitized:

[mcp_servers.jira-dev]
command = "uv"
args = ["run", "mcp-atlassian"]
startup_timeout_sec = 120.0

[mcp_servers.jira-sd]
command = "uv"
args = ["run", "mcp-atlassian"]
startup_timeout_sec = 120.0

Notes

This does not appear to be the MCP server intentionally doing background Jira work. The installed MCP server mostly registers tools and waits on STDIO. The issue seems to be repeated Codex-side spawning and/or missing cleanup.

Activity

  1. added
    bugSomething isn't working
    appIssues related to the Codex desktop app
    mcpIssues related to the use of model context protocol (MCP) servers
    app-serverIssues involving app server protocol or interfaces
    on Apr 27, 2026
  2. etraut-openai commented on Apr 27, 2026

    @etraut-openai
    Contributor

    Thanks for reporting. This is a duplicate of several existing bug reports.

    I'm working on a fix here: #19753.

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) servers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions