Skip to content

Web Codex starts multiple Serena MCP servers for a single session #36302

Description

@wds0218

What issue are you seeing?

Summary

Web Codex starts multiple Serena MCP servers for a single session.

Environment

  • Web Codex
  • Windows 11 x64
  • ChatGPT Plus
  • Serena MCP enabled

Description

Opening a single Web Codex session starts four identical Serena MCP server processes instead of one.

Each process is started with:

serena.exe start-mcp-server --project-from-cwd --context=codex

Each Serena process also launches additional Python processes and creates its own system tray icon.

Only one Web Codex tab and one project are open.

Expected behavior

One Web Codex session should create only one Serena MCP server.

Actual behavior

Four Serena MCP servers remain running simultaneously.

PowerShell confirms four identical serena.exe start-mcp-server --context=codex processes.

What steps can reproduce the bug?

  1. Open Web Codex.
  2. Open a single project with Serena MCP enabled.
  3. Wait for the MCP server to start.
  4. Open Task Manager or run:
Get-CimInstance Win32_Process |
Where-Object {$_.Name -match "serena|python"} |
Select Name,ProcessId,CommandLine
  1. Observe that four identical serena.exe start-mcp-server --context=codex processes are running even though only one Web Codex tab and one project are open.

The Windows system tray also shows four Serena icons.

What is the expected behavior?

When opening a single Web Codex session with Serena MCP enabled, only one Serena MCP server should be started.

Only one serena.exe start-mcp-server --context=codex process should be running, with the necessary child Python processes.

Only one Serena system tray icon should be displayed.

When the Web Codex session is closed, the Serena MCP server should terminate cleanly without leaving orphaned processes.

Additional information

I have attached screenshots showing:

  • Four Serena system tray icons.
  • PowerShell output confirming four identical serena.exe start-mcp-server --context=codex processes.

This issue occurs consistently with only one browser tab and one active Web Codex project.

The duplicate Serena processes remain running until they are manually terminated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcodex-webIssues related to Codex WebmcpIssues related to the use of model context protocol (MCP) serverswindows-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