`--profile` does not override installed plugin enabled state

Open 💬 2 comments Opened Jul 18, 2026 by FpRaArNkK

What version of Codex CLI is running?

codex-cli 0.144.5

What subscription do you have?

ChatGPT Pro (5x)

Which model were you using?

gpt-5.6-sol

What platform is your computer?

Darwin 25.5.0 arm64 arm

What terminal emulator and version are you using (if applicable)?

iTerm2 3.6.11

Codex doctor report

<details>
<summary>codex doctor --json</summary>

{
  "schemaVersion": 1,
  "generatedAt": "1784370997s since unix epoch",
  "overallStatus": "ok",
  "codexVersion": "0.144.5",
  "checks": {
    "app_server.status": {
      "id": "app_server.status",
      "category": "app-server",
      "status": "ok",
      "summary": "background server is not running",
      "details": {
        "control socket": "/Users/<redacted>/.codex/app-server-control/app-server-control.sock",
        "daemon state dir": "/Users/<redacted>/.codex/app-server-daemon",
        "mode": "ephemeral",
        "pid file": "/Users/<redacted>/.codex/app-server-daemon/app-server.pid (missing)",
        "settings": "/Users/<redacted>/.codex/app-server-daemon/settings.json (missing)",
        "status": "not running",
        "update-loop pid file": "/Users/<redacted>/.codex/app-server-daemon/app-server-updater.pid (missing)"
      },
      "remediation": null,
      "durationMs": 0
    },
    "auth.credentials": {
      "id": "auth.credentials",
      "category": "auth",
      "status": "ok",
      "summary": "auth is configured",
      "details": {
        "auth file": "/Users/<redacted>/.codex/auth.json",
        "auth storage mode": "File",
        "stored API key": "false",
        "stored ChatGPT tokens": "true",
        "stored agent identity": "false",
        "stored auth mode": "chatgpt"
      },
      "remediation": null,
      "durationMs": 0
    },
    "config.load": {
      "id": "config.load",
      "category": "config",
      "status": "ok",
      "summary": "config loaded",
      "details": {
        "CODEX_HOME": "/Users/<redacted>/.codex",
        "config.toml": "/Users/<redacted>/.codex/config.toml",
        "config.toml parse": "ok",
        "cwd": "/Users/<redacted>",
        "enabled feature flags": "shell_tool, unified_exec, shell_snapshot, code_mode_host, terminal_resize_reflow, sqlite, hooks, enable_request_compression, multi_agent, apps, tool_search_always_defer_mcp_tools, tool_suggest, plugins, in_app_browser, browser_use, browser_use_full_cdp_access, browser_use_external, computer_use, remote_plugin, plugin_sharing, image_generation, resize_all_images, skill_mcp_dependency_install, mentions_v2, steer, guardian_approval, goals, collaboration_modes, tool_call_mcp_elicitation, auth_elicitation, personality, fast_mode, tui_app_server, remote_compaction_v2, workspace_dependencies",
        "feature flag overrides": "none",
        "feature flags enabled": "35",
        "log dir": "/Users/<redacted>/.codex/log",
        "mcp servers": "7",
        "model": "gpt-5.6-sol",
        "model provider": "openai",
        "sqlite home": "/Users/<redacted>/.codex"
      },
      "remediation": null,
      "durationMs": 0
    },
    "git.environment": {
      "id": "git.environment",
      "category": "git",
      "status": "ok",
      "summary": "git version 2.50.1 (Apple Git-155)",
      "details": {
        "PATH git #1": "/usr/bin/git",
        "PATH git entries": "1",
        "git build options": "git version 2.50.1 (Apple Git-155); cpu: arm64; no commit associated with this build; sizeof-long: 8; sizeof-size_t: 8; shell-path: /bin/sh; feature: fsmonitor--daemon; libcurl: 8.7.1; zlib: 1.2.12; SHA-1: SHA1_DC; SHA-256: SHA256_BLK",
        "git exec path": "/Applications/Xcode.app/Contents/Developer/usr/libexec/git-core",
        "git version": "git version 2.50.1 (Apple Git-155)",
        "repo detected": "false",
        "selected git": "/usr/bin/git"
      },
      "remediation": null,
      "durationMs": 150
    },
    "installation": {
      "id": "installation",
      "category": "install",
      "status": "ok",
      "summary": "installation looks consistent",
      "details": {
        "PATH codex #1": "/Users/<redacted>/.local/bin/codex",
        "PATH codex #2": "/Users/<redacted>/.local/codex-cli/bin/codex",
        "PATH codex entries": "2",
        "current executable": "/Users/<redacted>/.local/bin/codex",
        "install context": "standalone (unix, package /Users/<redacted>/.codex/packages/standalone/releases/0.144.5-aarch64-apple-darwin, bin /Users/<redacted>/.codex/packages/standalone/releases/0.144.5-aarch64-apple-darwin/bin, resources /Users/<redacted>/.codex/packages/standalone/releases/0.144.5-aarch64-apple-darwin/codex-resources, path /Users/<redacted>/.codex/packages/standalone/releases/0.144.5-aarch64-apple-darwin/codex-path)",
        "managed by bun": "false",
        "managed by npm": "false",
        "managed by pnpm": "false",
        "managed package root": "not set"
      },
      "remediation": null,
      "durationMs": 3
    },
    "mcp.config": {
      "id": "mcp.config",
      "category": "mcp",
      "status": "ok",
      "summary": "MCP configuration is locally consistent",
      "details": {
        "configured servers": "7",
        "disabled servers": "1",
        "stdio servers": "6",
        "streamable_http servers": "1"
      },
      "remediation": null,
      "durationMs": 229
    },
    "network.env": {
      "id": "network.env",
      "category": "network",
      "status": "ok",
      "summary": "network-related environment looks readable",
      "details": {
        "proxy env vars": "none"
      },
      "remediation": null,
      "durationMs": 0
    },
    "network.provider_reachability": {
      "id": "network.provider_reachability",
      "category": "reachability",
      "status": "ok",
      "summary": "active provider endpoints are reachable over HTTP",
      "details": {
        "ChatGPT base URL": "https://chatgpt.com/backend-api/ reachable (HTTP 404)",
        "reachability mode": "ChatGPT auth"
      },
      "remediation": null,
      "durationMs": 286
    },
    "network.websocket_reachability": {
      "id": "network.websocket_reachability",
      "category": "websocket",
      "status": "ok",
      "summary": "Responses WebSocket handshake succeeded",
      "details": {
        "DNS": "2 IPv4, 2 IPv6, first IPv4",
        "auth mode": "chatgpt",
        "connect timeout": "15000 ms",
        "endpoint": "wss://chatgpt.com/backend-api/<redacted>",
        "handshake result": "HTTP 101 Switching Protocols",
        "model provider": "openai",
        "models etag present": "true",
        "provider name": "OpenAI",
        "proxy env vars": "none",
        "reasoning header": "false",
        "server model present": "false",
        "supports websockets": "true",
        "wire API": "responses"
      },
      "remediation": null,
      "durationMs": 860
    },
    "runtime.provenance": {
      "id": "runtime.provenance",
      "category": "runtime",
      "status": "ok",
      "summary": "running standalone on macos-aarch64",
      "details": {
        "commit": "unknown",
        "current executable": "/Users/<redacted>/.local/bin/codex",
        "install method": "standalone (unix, package /Users/<redacted>/.codex/packages/standalone/releases/0.144.5-aarch64-apple-darwin, bin /Users/<redacted>/.codex/packages/standalone/releases/0.144.5-aarch64-apple-darwin/bin, resources /Users/<redacted>/.codex/packages/standalone/releases/0.144.5-aarch64-apple-darwin/codex-resources, path /Users/<redacted>/.codex/packages/standalone/releases/0.144.5-aarch64-apple-darwin/codex-path)",
        "platform": "macos-aarch64",
        "version": "0.144.5"
      },
      "remediation": null,
      "durationMs": 0
    },
    "runtime.search": {
      "id": "runtime.search",
      "category": "search",
      "status": "ok",
      "summary": "search is OK (bundled)",
      "details": {
        "search command": "/Users/<redacted>/.codex/packages/standalone/releases/0.144.5-aarch64-apple-darwin/codex-path/rg",
        "search command readiness": "file exists",
        "search provider": "bundled"
      },
      "remediation": null,
      "durationMs": 0
    },
    "sandbox.helpers": {
      "id": "sandbox.helpers",
      "category": "sandbox",
      "status": "ok",
      "summary": "sandbox configuration is readable",
      "details": {
        "approval policy": "OnRequest",
        "codex-linux-sandbox helper": "none",
        "execve wrapper helper": "/Users/<redacted>/.codex/tmp/arg0/codex-arg0y91D3V/codex-execve-wrapper",
        "filesystem sandbox": "restricted",
        "network sandbox": "restricted"
      },
      "remediation": null,
      "durationMs": 0
    },
    "state.paths": {
      "id": "state.paths",
      "category": "state",
      "status": "ok",
      "summary": "state paths and databases are inspectable",
      "details": {
        "CODEX_HOME": "/Users/<redacted>/.codex (dir)",
        "active rollout files": "1290 files, 1880714517 total bytes, 1457918 average bytes",
        "archived rollout files": "0 files, 0 total bytes, 0 average bytes",
        "goals DB": "/Users/<redacted>/.codex/goals_1.sqlite (file)",
        "goals DB integrity": "ok",
        "log DB": "/Users/<redacted>/.codex/logs_2.sqlite (file)",
        "log DB integrity": "ok",
        "log dir": "/Users/<redacted>/.codex/log (dir)",
        "memories DB": "/Users/<redacted>/.codex/memories_1.sqlite (file)",
        "memories DB integrity": "ok",
        "sqlite home": "/Users/<redacted>/.codex (dir)",
        "standalone release cache": "2 entries in /Users/<redacted>/.codex/packages/standalone/releases",
        "state DB": "/Users/<redacted>/.codex/state_5.sqlite (file)",
        "state DB integrity": "ok"
      },
      "remediation": null,
      "durationMs": 5923
    },
    "state.rollout_db_parity": {
      "id": "state.rollout_db_parity",
      "category": "threads",
      "status": "ok",
      "summary": "rollout files and state DB thread inventory agree",
      "details": {
        "default model provider": "openai",
        "rollout DB active files": "1290",
        "rollout DB active rows": "1290",
        "rollout DB archive mismatches": "0",
        "rollout DB archived files": "0",
        "rollout DB archived rows": "0",
        "rollout DB duplicate DB paths": "0",
        "rollout DB duplicate rollout thread ids": "0",
        "rollout DB malformed file names": "0",
        "rollout DB missing active rows": "0",
        "rollout DB missing archived rows": "0",
        "rollout DB model providers": "openai=1290",
        "rollout DB rows": "1290",
        "rollout DB scan cap reached": "false",
        "rollout DB scan errors": "0",
        "rollout DB sources": "subagent:thread_spawn=563, cli=395, vscode=133, exec=100, subagent:other=99",
        "rollout DB stale rows": "0"
      },
      "remediation": null,
      "durationMs": 8323
    },
    "system.environment": {
      "id": "system.environment",
      "category": "system",
      "status": "ok",
      "summary": "OS language en-KR",
      "details": {
        "EDITOR": "set",
        "LANG": "ko_KR.UTF-8",
        "LESS": "set",
        "PAGER": "set",
        "VISUAL": "not set",
        "os": "Mac OS 26.5.2 [64-bit]",
        "os language": "en-KR",
        "os type": "Mac OS",
        "os version": "26.5.2"
      },
      "remediation": null,
      "durationMs": 3
    },
    "terminal.env": {
      "id": "terminal.env",
      "category": "terminal",
      "status": "ok",
      "summary": "terminal metadata was detected",
      "details": {
        "COLORFGBG": "15;0",
        "COLORTERM": "truecolor",
        "TERMINFO_DIRS entry": [
          "/Applications/iTerm.app/Contents/Resources/terminfo (dir)",
          "/usr/share/terminfo (dir)"
        ],
        "TERM_PROGRAM": "iTerm.app",
        "color output": "disabled (stdout is not a terminal)",
        "effective locale": "ko_KR.UTF-8",
        "stderr is terminal": "true",
        "stdin is terminal": "true",
        "stdout is terminal": "false",
        "terminal": "iTerm2",
        "terminal size": "128x45",
        "terminal version": "3.6.11"
      },
      "remediation": null,
      "durationMs": 0
    },
    "terminal.title": {
      "id": "terminal.title",
      "category": "title",
      "status": "ok",
      "summary": "terminal title default",
      "details": {
        "terminal title activity": "true",
        "terminal title items": "activity, project-name",
        "terminal title project source": "cwd",
        "terminal title project value": "<redacted>",
        "terminal title source": "default"
      },
      "remediation": null,
      "durationMs": 0
    },
    "updates.status": {
      "id": "updates.status",
      "category": "updates",
      "status": "ok",
      "summary": "update configuration is locally consistent",
      "details": {
        "cached latest version": "0.144.5",
        "check for update on startup": "true",
        "last checked at": "2026-07-18T07:03:47.567736Z",
        "latest version": "0.144.5",
        "latest version status": "current version is not older",
        "update action": "standalone installer",
        "version cache": "/Users/<redacted>/.codex/version.json"
      },
      "remediation": null,
      "durationMs": 116
    }
  }
}

</details>

What issue are you seeing?

A profile configuration selected with --profile does not override the enabled state of an installed plugin configured in the base user config.

The behavior reproduces in both directions:

  1. Base config disables the plugin and the selected profile enables it.

The plugin remains disabled.

  1. Base config enables the plugin and the selected profile disables it.

The plugin remains enabled.

The public configuration documentation lists a selected profile file above the user config in the precedence order, so the profile value should win.

I reproduced the issue with the installed figma@openai-curated plugin using codex mcp list.

What steps can reproduce the bug?

Prerequisite: figma@openai-curated is installed and has an existing
configuration entry in the source CODEX_HOME.

The following script creates an isolated temporary CODEX_HOME, shares the
existing installed plugin state, and tests both override directions.

<details>
<summary>Full reproduction script</summary>

```zsh
#!/bin/zsh
set -euo pipefail

SOURCE_HOME="$HOME/.codex"
TEST_HOME="$(mktemp -d /tmp/codex-plugin-profile-repro.XXXXXX)"
trap 'rm -rf "$TEST_HOME"' EXIT
CODEX_VERSION="$(codex --version 2>/dev/null)"

python3 - "$SOURCE_HOME" "$TEST_HOME" <<'PY'
from pathlib import Path
import re
import sys

source = Path(sys.argv[1])
target = Path(sys.argv[2])
skip = {"config.toml", "figma.config.toml", "no-figma.config.toml"}

for entry in source.iterdir():
if entry.name in skip:
continue
(target / entry.name).symlink_to(entry, target_is_directory=entry.is_dir())

config = (source / "config.toml").read_text()
pattern = re.compile(
r'(\[plugins\."figma@openai-curated"\]\s\n\senabled\s=\s)(?:true|false)',
re.MULTILINE,
)
if not pattern.search(config):
raise SystemExit("Figma plugin block is missing from ~/.codex/config.toml")

(target / "config.toml").write_text(pattern.sub(r"\1false", config, count=1))
(target / "figma.config.toml").write_text(
'[plugins."figma@openai-curated"]\n'
'enabled = true\n'
)
(target / "no-figma.config.toml").write_text(
'[plugins."figma@openai-curated"]\n'
'enabled = false\n'
)
PY

figma_status() {
local output
output="$(CODEX_HOME="$TEST_HOME" codex "$@" mcp list 2>/dev/null | grep '^figma ' || true)"
if [[ -n "$output" ]]; then
print -r -- "LOADED $output"
else
print -r -- "ABSENT"
fi
}

print -r -- "TEST_HOME=$TEST_HOME"
print -r -- "CODEX_VERSION=$CODEX_VERSION"
print -r -- ""
print -r -- "[A] base=false"
print -n -r -- " no profile: "
figma_status
print -n -r -- " -p figma (true): "
figma_status -p figma

python3 - "$TEST_HOME/config.toml" <<'PY'
from pathlib import Path
import re
import sys

path = Path(sys.argv[1])
text = path.read_text()
text = re.sub(
r'(\[plugins\."figma@openai-curated"\]\s\n\senabled\s=\s)false',
r"\1true",
text,
count=1,
)
path.write_text(text)
PY

print -r -- ""
print -r -- "[B] base=true"
print -n -r -- " no profile: "
figma_status
print -n -r -- " -p no-figma (false): "
figma_status -p no-figma

print -r -- ""
print -r -- "Expected if profile controls plugin loading:"
print -r -- " [A] ABSENT -> LOADED"
print -r -- " [B] LOADED -> ABSENT"
print -r -- "Observed on this Codex version:"
print -r -- " [A] ABSENT -> ABSENT"
print -r -- " [B] LOADED -> LOADED"

```

</details>

Observed output:

```text
TEST_HOME=/tmp/codex-plugin-profile-repro.S3wWa7
CODEX_VERSION=codex-cli 0.144.5

[A] base=false
no profile: ABSENT
-p figma (true): ABSENT

[B] base=true
no profile: LOADED figma https://mcp.figma.com/mcp - enabled Not logged in
-p no-figma (false): LOADED figma https://mcp.figma.com/mcp - enabled Not logged in

Expected if profile controls plugin loading:
[A] ABSENT -> LOADED
[B] LOADED -> ABSENT

Observed on this Codex version:
[A] ABSENT -> ABSENT
[B] LOADED -> LOADED
```

Both directions were also repeated with the remote_plugin feature disabled.
The results were unchanged.

What is the expected behavior?

The selected profile should override the base user config for the same plugin ID.

Expected results:

  • Base enabled = false and profile enabled = true: the plugin is loaded.
  • Base enabled = true and profile enabled = false: the plugin is not loaded.

This follows the documented configuration precedence:

  1. CLI flags and --config
  2. Project config
  3. Profile selected with --profile
  4. User config.toml

Additional information

I confirmed that 0.144.5 is the latest published Codex CLI version when filing
this report.

#### Source analysis

The current implementation appears intended to merge the base user config and
the selected profile before reading the [plugins] table:

  • codex-rs/config/src/state.rs: effective_user_config
  • codex-rs/core-plugins/src/marketplace_policy.rs:

configured_plugins_from_stack

However, the existing
configured_plugins_from_stack_merges_user_layers test uses two different
plugin IDs:

  • plugins.base in the base config
  • plugins.profile in the profile config

It verifies that both layers are combined, but does not test overriding
enabled for the same plugin ID.

A focused regression test could cover both directions:

  1. Base enabled = false, profile enabled = true
  2. Base enabled = true, profile enabled = false

A CLI-level regression test using codex --profile <name> mcp list could then
verify that the merged value reaches plugin loading. If the same-key unit test
passes while the CLI test fails, the remaining plugin resolution path may be
replacing the merged value later.

I have not identified the exact runtime root cause. The test gap above is based
on source inspection, not a confirmed diagnosis.

#### Related issues and changes

  • #17588 reported plugin and connector settings being ignored by the legacy

inline profile mechanism. This report reproduces with the newer file-based
profile mechanism.

  • #28443 concerns remote curated plugins ignoring the base enabled = false

setting. This report differs because the base setting works and only the
selected profile override is ignored.

  • #21425 proposes broader per-session plugin loading controls.
  • #17141 introduced layered profile files.
  • #23883 moved the public --profile flag to the file-based profile mechanism.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗