-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
doctor --fix silently adds and enables the uninstalled codex plugin (routing-altering) when openai is enabled #97180
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.maturity:stableIssue affects a taxonomy feature currently scored M4/M5.Issue affects a taxonomy feature currently scored M4/M5.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.maturity:stableIssue affects a taxonomy feature currently scored M4/M5.Issue affects a taxonomy feature currently scored M4/M5.
Type
Fields
Priority
None yet
Summary
On
2026.6.10, runningopenclaw doctor --fix(to reconcile an unrelated plugin version drift) silently added the externalcodexplugin to my config and enabled it —plugins.allow += "codex"andplugins.entries.codex = { "enabled": true }— even though:codex,@openclaw/codexpackage is not installed on this machine, andcodexplugin alters provider routing (it pullsopenai/*into the Codex harness).It appears to be the "enable codex when the openai plugin is enabled" coupling (cf. #70767) firing inside
doctor --fix. Because myopenaiplugin is enabled,--fixdecided I should havecodexenabled too. The config write hot-reloaded live within ~2s.It was harmless only by luck — the
@openclaw/codexpackage wasn't installed, so nothing loaded andopenai/*routing was unaffected (verified). On any machine where that package is present (it has auto-installed on upgrade historically), this would silently reroute all OpenAI traffic — including orchestrator + fallback chains — by merely running a health check.Why I think this is a bug (not just a bad default)
--fixinjected config I never declared. A repair command should reconcile toward the user's declared intent, not add and enable a brand-new, routing-altering plugin.enabled: truefor a plugin whose package is absent yields an internally inconsistent config. (Doctor's own lint elsewhere flags "plugin not installed" foracpx— yet it happily enablescodexwhich is equally not installed.)plugins.load.pathsentry that points at OpenClaw's current bundled plugin directory; remove this redundant path."--fixleft that path in place and instead deleted my explicitacpx: { "enabled": false }entry — destroying intent rather than fixing the flagged item (related: doctor --fix strips renamed config keys and disables the plugin instead of migrating #84985).Reproduction
2026.6.10, haveplugins.entries.openai.enabled = trueand nocodexentry in config.openclaw doctor --fix.openclaw.json.bak).Actual config change made by
--fix(sanitized)Expected behavior
doctor --fixshould not add and enable a plugin the user never configured — at minimum it should not enable a plugin whose package is not installed, and never one that silently changes provider routing without explicit confirmation.plugins.load.pathsentry) and preserve explicit userenabled: falsechoices.Environment
2026.6.10(global npm package, Node 24.14.1, Linux)127.0.0.1:18789openaiplugin enabled;codexnever configured;@openclaw/codexnot installedcodex-supervisor; plaincodexis an external catalog pluginRelated
doctor --fixcodex↔openai migration causing app-server timeout (opposite direction; same doctor↔codex coupling area)openclaw doctor --fixincorrectly enables built-infeishuplugin, causing conflict withopenclaw-lark#44722 — prior precedent thatdoctor --fixauto-enabling a plugin (feishu) is treated as a bug/regressionHappy to provide the full sanitized config diff or logs if useful.