Skip to content

MCP env overrides in CODEX_CONFIG get dropped when a session adds another MCP server #489

Description

@ruixingshi

Hi! In codex-acp 1.10.0, adding an MCP server through session/new.mcpServers drops existing MCP settings from CODEX_CONFIG, even when the names don’t overlap.

For example, my app uses CODEX_CONFIG to give Codex’s existing browser tool a proxy:

{
  "mcp_servers": {
    "node_repl": {
      "env": {
        "HTTPS_PROXY": "http://127.0.0.1:7890"
      }
    }
  }
}

If the session also includes an unrelated docs MCP server, the adapter’s outgoing config only contains docs—the browser’s proxy settings disappear. With an empty session MCP list, they stay.
Adding a docs tool shouldn’t remove the browser’s network settings.

createSessionConfig() replaces the whole mcp_servers object. Could it merge entries by server name instead, preserving those that don’t conflict?

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions