Skip to content

doctor --fix silently drops the plugins.allow entry for a bundled→externalized plugin (codex), unregistering the agent harness — and the gateway still reports healthy #107226

Closed

Description

@Marvinthebored

doctor --fix silently drops the plugins.allow entry for a bundled→externalized plugin (codex), unregistering the agent harness — and the gateway still reports healthy

Summary

After upgrading 2026.6.11 → 2026.7.1, the codex agent harness stopped being registered, so any agent bound to it fails every turn with:

GatewayClientRequestError: MissingAgentHarnessError: Requested agent harness "codex" is not registered.

Root cause: 2026.7.1 externalizes the codex harness into the @openclaw/codex plugin (previously effectively bundled/allowed as codex). During the upgrade, doctor/doctor --fix silently removed "codex" from plugins.allow because no installed plugin resolved to that id. With the fail-closed allowlist, the harness never loaded.

There are really two problems here:

  1. Silent allowlist strip. A config-reconciliation step deleted a user's plugins.allow entry for a capability that was externalized, rather than migrating it (installing the replacement) or surfacing a blocking warning. The upgrade turned a working, configured capability into a silent removal.
  2. Health check is green while a configured harness is missing. The gateway reported running / healthy, the port was open, plugins list looked fine, and there were zero error log lines — yet no agent using the codex harness could run. Readiness/health does not account for "a configured agent's required harness failed to register." This is the more broadly-important issue: nothing short of an actual agent turn revealed the breakage.

Environment

  • OpenClaw 2026.7.1 (2d2ddc4), upgraded from 2026.6.11 (b2355ef) via openclaw update (npm install, stable channel).
  • macOS (Darwin 24.6.0), Node 25.9.0, npm-global install at /usr/local/lib/node_modules/openclaw, gateway under a launchd LaunchAgent.
  • Long-lived install (agents were bound to the codex harness for many prior versions).

Reproduction

  1. On a pre-7.1 install with an agent using the codex harness and "codex" present in plugins.allow, upgrade to 2026.7.1 via openclaw update.
  2. Observe the gateway comes up "healthy" (port open, openclaw status shows running, no error lines).
  3. Run a real turn against the agent: openclaw agent --agent <main> --session-id smoke -m "ping".
  4. It fails with MissingAgentHarnessError: Requested agent harness "codex" is not registered.

Observed vs expected

Observed

  • plugins.allow diff across the upgrade: "codex" present before, removed after (it was the only allowlist delta).
  • plugins list even prints the hint (so the tooling knows what happened):
    - plugins.allow: plugin not installed: codex — install the official external plugin with: openclaw plugins install @openclaw/codex
    
    …but this is a soft config-warning, not surfaced as a blocking/health-affecting condition, and the allow entry was already deleted.

Expected (any of):

  • When a bundled plugin is externalized, the upgrade migrates it — installs @openclaw/codex (pinned to the host cohort) and keeps the allow entry — rather than deleting the entry.
  • If it can't auto-install, it fails/warns loudly (non-zero doctor status, prominent banner) instead of silently pruning plugins.allow.
  • Gateway readiness/health reflects missing harnesses: if a configured agent's harness isn't registered, health should be degraded/unhealthy, not green.

Workaround

# restore the allowlist entry
openclaw config set plugins.allow '[...,"codex",...]' --strict-json
# install the now-external plugin, pinned to host version to avoid skew
openclaw plugins install '@openclaw/codex@2026.7.1' --force --pin
openclaw gateway restart
# verify with an ACTUAL agent turn, not just health
openclaw agent --agent main --session-id smoke -m "ping"

Impact

Silent, total loss of any agent on the externalized harness after a routine openclaw update, with a green health check masking it. Easy to ship "successfully" and only discover when a user's agent won't answer.

Activity

  1. clawsweeper commented on Jul 14, 2026

    @clawsweeper
    Contributor

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed July 14, 2026, 8:29 AM ET / 12:29 UTC.

    Summary
    Keep open: release v2026.7.1 can turn a working Codex-backed agent into a fail-every-turn state during routine update. The linked open repair at #107285 addresses allowlist pruning, but current readiness semantics still do not detect a configured harness that never registered.

    Reproducibility: yes. at source level: upgrade a pre-v2026.7.1 configuration containing plugins.allow: ["codex"], run doctor repair, restart, and make a Codex-bound agent turn. The report provides a shipped-version reproduction and the current repair sequence explains the allowlist loss, although this review did not execute the live upgrade.

    Root-cause cluster
    Relationship: canonical
    Canonical: #107226
    Summary: This issue is the canonical combined upgrade-pruning and readiness report; one open PR fixes the pruning half, while older items cover narrower missing-plugin diagnostics or earlier migration variants.

    Members:

    Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

    Next step
    Do not dispatch a duplicate repair: #107285 already owns the mechanical allowlist fix, while the remaining readiness contract requires maintainer direction.

    Maintainer decision needed

    • Question: Should a configured agent harness that fails to register make Gateway /readyz and status degraded, or should readiness remain limited to Gateway startup infrastructure with doctor/update as the sole enforcement point?
    • Rationale: Both policies are technically viable, but they define a public operational contract for orchestrators and users; source inspection cannot determine the intended readiness boundary.
    • Likely owner: steipete — This person merged and refined the existing configured-runtime diagnostics and has recent involvement in Gateway status semantics.
    • Options:
      • Degrade readiness (recommended): Keep /healthz as liveness, but make /readyz and status degraded with actionable plugin-install guidance whenever a configured harness owner is unavailable.
      • Keep readiness narrow: Leave Gateway readiness unchanged and instead make update/doctor fail loudly or block completion until every explicitly configured harness owner is installed and enabled.
    Review details

    Best possible solution:

    Preserve and install version-bound externalized runtime plugins during upgrade, then make /readyz or an equally prominent startup diagnostic report configured-but-unregistered harnesses while keeping /healthz limited to process liveness.

    Do we have a high-confidence way to reproduce the issue?

    Yes at source level: upgrade a pre-v2026.7.1 configuration containing plugins.allow: ["codex"], run doctor repair, restart, and make a Codex-bound agent turn. The report provides a shipped-version reproduction and the current repair sequence explains the allowlist loss, although this review did not execute the live upgrade.

    Is this the best way to solve the issue?

    No, preserving the allowlist alone is not the complete best fix. It should be combined with verified upgrade installation or loud failure and a maintainer-chosen readiness signal for configured harnesses that remain unavailable.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • The open allowlist repair lacks an actual v2026.6.11-to-v2026.7.1 update, restart, and successful Codex agent-turn proof.
    • Changing /readyz or status to account for configured harness registration requires a deliberate boundary between process liveness, startup readiness, and per-agent capability readiness.

    Codex review notes: model internal, reasoning high; reviewed against b4128978cdbd.

    Label changes

    Label justifications:

    • P0: A routine stable-channel update can leave configured agents completely unable to answer while Gateway health remains green and recovery requires terminal intervention.
    • impact:message-loss: Every affected agent turn fails before producing a reply, including channel-routed and scheduled work.
    • impact:auth-provider: The failure is caused by configured Codex runtime ownership and plugin registration no longer resolving after upgrade.
    • impact:ux-release-blocker: Users must inspect configuration and run plugin-install, allowlist, restart, and live-turn commands to recover from a normal update.
    Evidence reviewed

    What I checked:

    Likely related people:

    • vincentkoc: Recent history connects this contributor to configured harness collection, plugin doctor behavior, and missing configured-plugin repair used by this path. (role: recent CLI and runtime contributor; confidence: medium; commits: 7d09ff89ee3a; files: src/cli/plugins-cli.runtime.ts, src/agents/harness-runtimes.ts, src/commands/doctor/shared/missing-configured-plugin-install.ts)
    • pashpashpash: Recent merged work introduced or refined configured runtime requirement collection and the doctor repair path reused for Codex plugin installation. (role: recent adjacent runtime and doctor contributor; confidence: medium; commits: 3ce922437fb6, 1c3399010815, 02fe0d8978db; files: src/agents/harness-runtimes.ts, src/commands/doctor/shared/missing-configured-plugin-install.ts)
    • BKF-Gitty: Recent work covers missing configured-plugin installation and post-update convergence adjacent to the reported upgrade sequence. (role: recent doctor repair contributor; confidence: medium; commits: 109493bcdd62; files: src/commands/doctor/shared/missing-configured-plugin-install.ts, src/cli/update-cli/post-core-plugin-convergence.ts)
    • steipete: Merged and directly refined the configured runtime plugin doctor diagnostics, including Codex and ACP ownership guidance, and has recent history on gateway status semantics. (role: merger and recent gateway-status contributor; confidence: high; commits: 80db002, 39ba8e1, 31aca2c; files: src/cli/plugins-cli.runtime.ts, src/commands/doctor/shared/configured-runtime-plugin-installs.ts, src/commands/doctor/shared/missing-configured-plugin-install.ts)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  2. added
    P0Emergency: data loss, security bypass, crash loop, or unusable core runtime.
    impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.
    impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.
    impact:ux-release-blockerA non-technical user is blocked without terminal, logs, config, or support.
    issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
    clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.
    on Jul 14, 2026
  3. self-assigned this
    on Jul 15, 2026
  4. steipete commented on Jul 15, 2026

    @steipete
    Contributor

    The doctor/update half is fixed on main by #107285 (f638cbd0f909f747145b5c5851094e5bc942e920).

    Proof: the published openclaw@2026.6.11 upgrade-survivor scenario kept the Codex allow entry through doctor --fix, and final PR head d94d20c2d45671b423332b972f729c32d7b7f141 passed exact-head CI.

    Keeping this issue open. Gateway /readyz behavior for a configured-but-unregistered harness remains a separate product/operational-contract decision; #107285 intentionally did not change readiness semantics.

  5. locked as resolved and limited conversation to collaborators on Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P0Emergency: data loss, security bypass, crash loop, or unusable core runtime.clawsweeper:needs-product-decisionClawSweeper 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:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.impact:ux-release-blockerA non-technical user is blocked without terminal, logs, config, or support.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions