Repository navigation
Description
Summary
On 2026.6.10, running openclaw doctor --fix (to reconcile an unrelated plugin version drift) silently added the external codex plugin to my config and enabled it — plugins.allow += "codex" and plugins.entries.codex = { "enabled": true } — even though:
- I have never configured
codex, - the
@openclaw/codexpackage is not installed on this machine, and - the
codexplugin 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 my openai plugin is enabled, --fix decided I should have codex enabled too. The config write hot-reloaded live within ~2s.
It was harmless only by luck — the @openclaw/codex package wasn't installed, so nothing loaded and openai/* 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.- It enabled an uninstalled plugin. Writing
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.) - It contradicted its own diagnostic. Doctor warned: "ignored
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). - It did not fix what it was run for — the actual plugin version drift it was invoked to reconcile was untouched.
Reproduction
- On
2026.6.10, haveplugins.entries.openai.enabled = trueand nocodexentry in config. - Run
openclaw doctor --fix. - Diff the config against the pre-fix backup doctor writes (
openclaw.json.bak).
Actual config change made by --fix (sanitized)
plugins.allow:
- "acpx",
...
"memory-core",
+ "codex"
plugins.entries:
- "acpx": { "enabled": false },
+ "codex": { "enabled": true }
plugins.load.paths:
# UNCHANGED — the redundant bundled acpx path doctor warned about was NOT removed
[ ".../openclaw/dist/extensions/acpx" ]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.- It should fix the item it actually warned about (the redundant
plugins.load.pathsentry) and preserve explicit userenabled: falsechoices.
Environment
- OpenClaw:
2026.6.10(global npm package, Node 24.14.1, Linux) - Gateway: systemd user service on
127.0.0.1:18789 openaiplugin enabled;codexnever configured;@openclaw/codexnot installed- Only bundled codex-related extension present is
codex-supervisor; plaincodexis an external catalog plugin
Related
- doctor --fix migrates codex/gpt-5.5 to openai/gpt-5.5, then Codex app-server startup times out on 2026.6.1 #90881 —
doctor --fixcodex↔openai migration causing app-server timeout (opposite direction; same doctor↔codex coupling area) - fix(doctor): gate legacy Codex canonicalization on a migration plan #93180 — fix(doctor): gate legacy Codex canonicalization on a migration plan (in-flight; likely overlaps)
- fix(doctor): enable codex when openai plugin is enabled #70767 — fix(doctor): enable codex when openai plugin is enabled (probable origin of this coupling)
- [Bug]
openclaw doctor --fixincorrectly enables built-infeishuplugin, causing conflict withopenclaw-lark#44722 — prior precedent thatdoctor --fixauto-enabling a plugin (feishu) is treated as a bug/regression
Happy to provide the full sanitized config diff or logs if useful.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Jun 27, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 27, 2026, 1:24 AM ET / 05:24 UTC.
Summary
Keep open: current
mainandv2026.6.10still auto-enable and allowlistcodexduring doctor repair for OpenAI routes that resolve to the Codex runtime, and the related broader opt-out and legacy-migration work do not replace this doctor-specific config mutation report.Reproducibility: yes. at source level. Current
mainhas a doctor repair test matching the reported shape and expectingplugins.entries.codex.enabled = trueplusplugins.allow += "codex"; I did not rundoctor --fixbecause this review must keep the checkout read-only.Root-cause cluster
Relationship:
canonicalCanonical: #97180
Summary: This issue is the narrow doctor-specific tracker for silent Codex plugin enablement/allowlist mutation; related OpenAI/Codex opt-out and migration items overlap but do not replace it.
Members:
partial_overlap: Official openai/* model selection auto-enables Codex plugin despite disabled/opt-out intent #95131 - Broader open issue about officialopenai/*model selection auto-enabling Codex and the operator opt-out contract; it is not doctor-specific.partial_overlap: fix(doctor): gate legacy Codex canonicalization on a migration plan #93180 - Open PR addresses legacyopenai-codexmigration planning across config/auth/session surfaces, not the current doctor behavior that creates/enablesplugins.entries.codexfor canonical OpenAI routes.same_root_cause: Fix doctor repair for disabled Codex runtime plugin #82502 - Merged PR introduced the route-required Codex doctor repair that current source now exercises; it fixed missing harness failures but created the reported silent config mutation boundary.adjacent_distinct: doctor --fix migrates codex/gpt-5.5 to openai/gpt-5.5, then Codex app-server startup times out on 2026.6.1 #90881 - Open issue concerns doctor migration leading to Codex app-server startup timeout afteropenai-codextoopenairewrite, which is adjacent but a different runtime failure mode.adjacent_distinct: [Bug]openclaw doctor --fixincorrectly enables built-infeishuplugin, causing conflict withopenclaw-lark#44722 - Closed Feishu issue is precedent for doctor auto-enabling a plugin being treated as a bug, but it is a different plugin/channel root cause.Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.
Next step
Manual review is needed because the source repro is clear but changing it requires a product/compatibility decision about Codex as an automatic OpenAI runtime dependency.
Review details
Best possible solution:
Keep this doctor-specific tracker open and align doctor repair with explicit plugin/operator intent after maintainers decide the OpenAI-through-Codex dependency contract.
Do we have a high-confidence way to reproduce the issue?
Yes, at source level. Current
mainhas a doctor repair test matching the reported shape and expectingplugins.entries.codex.enabled = trueplusplugins.allow += "codex"; I did not rundoctor --fixbecause this review must keep the checkout read-only.Is this the best way to solve the issue?
No merged solution is the clear best fix yet. The source path is clear, but the best repair needs maintainer confirmation on whether doctor should auto-enable Codex for official OpenAI routes or warn and preserve explicit plugin state.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
openai/*routes must materialize Codex as a runtime dependency during doctor repair or should warn and preserve explicit plugin/operator intent.acpxdisabled-entry removal, stale bundled load-path handling, and unrelated plugin drift not being fixed; those secondary symptoms are not proven by the Codex auto-enable source path and may need narrower follow-up if they remain.Codex review notes: model internal, reasoning high; reviewed against fbfadbd806e1.
Label changes
Label changes:
clawsweeper:fix-shape-clear: Current issue advisory state no longer selects this label.Label justifications:
P2: This is a normal-priority doctor/config repair bug with bounded but real provider-routing impact for OpenAI users.impact:auth-provider: The reported repair can change OpenAI model routing by enabling the Codex runtime plugin and expanding the plugin allowlist.maturity:stable: The affected doctor/setup surface maps tocli-install-update-onboard-doctor, scored M4 Stable in the maturity shortlist.Evidence reviewed
What I checked:
enableCodexPluginForRequiredRouteswritesplugins.entries.codex.enabled = trueand appendscodexto a non-emptyplugins.allowwhen route hits require Codex runtime. (src/commands/doctor/shared/codex-route-warnings.ts:1209, fbfadbd806e1)plugins.allow: ["openai"], enabledopenai, nocodexentry, and expects doctor repair to enablecodexand add it to the allowlist. (src/commands/doctor/shared/codex-route-warnings.test.ts:2694, fbfadbd806e1)runDoctorRepairSequencecallsmaybeRepairCodexRoutesduring--fix, so this mutation is part of the doctor repair flow, not only a warning path. (src/commands/doctor/repair-sequencing.ts:97, fbfadbd806e1)src/agents/openai-routing.ts:61, fbfadbd806e1)v2026.6.10tag contains the same test expectation thatdoctoradds/enablescodexfor the OpenAI allowlist case, so this is not fixed in the latest stable release. (src/commands/doctor/shared/codex-route-warnings.test.ts:2694, aa69b12d0086)plugins.entries.codexand addscodexto allowlists when OpenAI/Codex-runtime routes need the harness. (src/commands/doctor/shared/codex-route-warnings.ts, c5b33523266c)Likely related people:
plugins.entries.codexand addscodexto allowlists when OpenAI/Codex-runtime routes require the Codex plugin. (role: introduced behavior; confidence: high; commits: c5b33523266c; files:src/commands/doctor/shared/codex-route-warnings.ts,src/commands/doctor/shared/codex-route-warnings.test.ts)openai/*agent routes use the Codex runtime by default and ensured the Codex plugin for that path. (role: feature-history contributor; confidence: medium; commits: 1c3399010815; files:src/agents/openai-routing.ts,src/commands/codex-runtime-plugin-install.ts,src/commands/doctor/shared/codex-route-warnings.ts)src/commands/doctor/shared/codex-route-warnings.ts,src/commands/doctor-auth-flat-profiles.ts)src/commands/doctor/shared/codex-route-warnings.ts)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.fix(agents): safe codex tool-terminal continuation, auth-true simple-…
fix(agents): safe codex tool-terminal continuation, auth-true simple-…
fix(agents): safe codex tool-terminal continuation, auth-true simple-…