[BUG] Codex MCP configuration includes an unsupported id field
Describe the bug
APM generates an id field in Codex MCP server entries. Codex CLI 0.157.1 does not recognize that field: normal configuration loading reports that it is ignored, and strict configuration validation rejects it.
I observed this with APM 0.29.0 in a project containing both stdio and HTTP MCP servers. A separate minimal HTTP configuration also produces id = "".
To Reproduce
-
In a project trusted by Codex, create this
apm.yml:name: codex-id-repro version: 1.0.0 targets: - codex dependencies: mcp: - name: microsoft-learn registry: false transport: http url: https://learn.microsoft.com/api/mcp -
Run
apm install --only mcp. -
Inspect
.codex/config.toml. APM 0.29.0 generates:[mcp_servers.microsoft-learn] url = "https://learn.microsoft.com/api/mcp" id = "" -
Start Codex in that trusted project, or run
codex app-server --strict-config --stdioto validate the configuration. Project trust matters because Codex skips project-local configuration in untrusted directories.
Expected behavior
APM-generated Codex MCP configuration is accepted without unrecognized-setting warnings or strict-validation errors.
Environment
- OS: Windows 11, build 26200, x64
- APM: 0.29.0, prebuilt executable installed through mise
- Codex CLI: 0.157.1
- Python: not separately used to run APM; this reproduction uses the prebuilt executable
Logs
The original project reported these warnings, among others:
project (.codex/config.toml): `mcp_servers.binlog.id` is ignored.
project (.codex/config.toml): `mcp_servers.context7.id` is ignored.
project (.codex/config.toml): `mcp_servers.microsoft-learn.id` is ignored.
Strict validation of that project failed at its first server entry:
Error: <project>\.codex\config.toml:4:1: unknown configuration field `mcp_servers.playwright.id`
Paths above are shortened. No credentials are included.
Additional context
The runtime reproduction is on APM 0.29.0. I also inspected the released 0.32.0 Codex adapter: its stdio and HTTP configuration paths still include id, and the writer serializes those entries. I have not run the reproduction with 0.32.0.
The Codex configuration schema does not list id as an MCP server setting. The unsupported field is generated by APM; it is not present in the manifest above.
Thanks for the detailed repro, @hcoona -- this is a clear, evidence-grounded report.
The id field APM writes into Codex MCP server entries (.codex/config.toml) isn't part of the [Codex config schema]((developers.openai.com/redacted), so both normal loading (ignored-field warning) and strict validation (hard error) reject it. Your cross-check against the released codex.py adapter (still emitting id in 0.32.0) strengthens the report even without a fresh runtime reproduction on that version.
This looks like a bounded fix: stop emitting the unsupported id field for Codex stdio/HTTP MCP entries. A maintainer still needs to confirm scope (e.g. whether any current behavior relies on that field internally, and whether a lockfile/regeneration migration note is needed) before implementation begins.
This is an automated triage recommendation, not scope approval -- a responsible maintainer will follow up with the bounded scope and review contact per CONTRIBUTING.md.
Generated by Triage Panel · copilot · auto · 68.5 AIC · ⌖ 6.42 AIC · ⊞ 12K · ◷
Decision: approve Area: project Scope: Correct the existing Codex MCP adapter so stdio and HTTP server entries follow Codex's documented native configuration schema and do not emit the unsupported id field. Preserve APM ownership, identity and conflict tracking without relying on unsupported fields in native output. Safely correct previously APM-managed entries without modifying unrelated user configuration. Done when: Generated stdio and HTTP entries contain no unsupported id field and satisfy the published Codex schema and strict configuration validation for the supported client version. Regression coverage includes both transports, correction of previously APM-managed output, preservation of unrelated settings, and unchanged ownership/conflict behavior. Directly related documentation explains any necessary regeneration step and its limits. Out of scope: A new shared MCP schema or translator; changes to other targets; dropping ownership/conflict safeguards; bulk editing user-owned entries; a new credential or trust model; automatic release or merge approval. Review contact: @danielmeppiel
Daniel's acceptance was conditional on confirmation in official Codex documentation. That condition is satisfied by the official Codex configuration schema, retrieved on 2026-10-02: properties.mcp_servers.additionalProperties references definitions.RawMcpServerConfig; that definition sets additionalProperties: false and does not define an id property.
This is a repair of native output on an already-supported target, not an invented standard field. The reporter's runtime reproduction remains evidence from the report; this decision session verified the published schema, not a new local Codex runtime reproduction.
Recorded by Copilot on behalf of @danielmeppiel after his explicit conditional acceptance and the official-source verification above. No implementation assignment, release date, parent-epic expansion or merge approval is implied.
I'd like to take this within the approved scope. I'll remove the unsupported native id field while preserving registry identity, ownership and conflict handling, with coverage for both transports and existing managed configurations.
I'm also seeing this myself with APM 0.33.0 and Codex CLI 0.161.0.
My configuration is managed through an APM baseline package. The relevant section of that package’s apm.yml is:
targets:
- codex
- copilot
dependencies:
mcp:
- name: microsoft-learn
registry: false
transport: http
url: https://learn.microsoft.com/api/mcp
tools: µsoft_learn_tools
- microsoft_docs_search
- microsoft_docs_fetch
- microsoft_code_sample_search
enabled_tools: *microsoft_learn_tools
Both the baseline’s generated .codex/config.toml and my user-scope ~/.codex/config.toml contain:
[mcp_servers.microsoft-learn]
url = "https://learn.microsoft.com/api/mcp"
id = ""
enabled_tools = ["microsoft_docs_search", "microsoft_docs_fetch", "microsoft_code_sample_search"]
The startup warning points to mcp_servers.microsoft-learn.id in ~/.codex/config.toml, where the entry contains id = "". Running codex app-server --strict-config --listen off also rejects that field.
Decision: approve Area: project Scope: Correct the existing Codex MCP adapter so stdio and HTTP server entries follow Codex's documented native configuration schema and do not emit the unsupported id field. Preserve APM ownership, identity and conflict tracking without relying on unsupported fields in native output. Safely correct previously APM-managed entries without modifying unrelated user configuration. Done when: Generated stdio and HTTP entries contain no unsupported id field and satisfy the published Codex schema and strict configuration validation for the supported client version. Regression coverage includes both transports, correction of previously APM-managed output, preservation of unrelated settings, and unchanged ownership/conflict behavior. Directly related documentation explains any necessary regeneration step and its limits. Out of scope: A new shared MCP schema or translator; changes to other targets; dropping ownership/conflict safeguards; bulk editing user-owned entries; a new credential or trust model; automatic release or merge approval. Review contact: @danielmeppiel