openclaw - 💡(How to fix) Fix [Bug]: `agentRuntime.id=codex` can be configured without the Codex plugin installed, causing harness-not-registered failures [3 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#81326Fetched 2026-05-14 03:33:18
View on GitHub
Comments
3
Participants
3
Timeline
4
Reactions
2
Author
Timeline (top)
commented ×3cross-referenced ×1

On OpenClaw 2026.5.7, my install ended up with defaults pointing at the Codex agent runtime, but the Codex plugin was not installed or enabled. The gateway stayed up, plugins doctor did not flag the missing runtime dependency, and every OpenAI/Codex agent turn failed before reply with:

Requested agent harness "codex" is not registered.

Manually installing the official Codex plugin fixed the system immediately:

openclaw plugins install clawhub:@openclaw/codex

After that, plugins inspect codex reported Status: loaded, plugins doctor reported no plugin issues, and a direct openclaw agent --agent main --message ... --json smoke test returned successfully with agentHarnessId: "codex".

Error Message

[diagnostic] lane task error: lane=main durationMs=2 error="Error: Requested agent harness "codex" is not registered." [model-fallback/decision] model fallback decision: decision=candidate_failed requested=openai/gpt-5.5 candidate=openai/gpt-5.5 reason=unknown next=openai/gpt-5.4 detail=Requested agent harness "codex" is not registered. Embedded agent failed before reply: Requested agent harness "codex" is not registered.

Root Cause

The failure is hard to self-diagnose from the user-facing error because the model configuration looks valid (openai/gpt-5.5 + Codex runtime), but the real fix is to install the runtime owner plugin. A doctor/config validation check would have made this a one-command repair instead of repeated Agent failed before reply failures.

Code Example

Requested agent harness "codex" is not registered.

---

openclaw plugins install clawhub:@openclaw/codex

---

{
  "agents": {
    "defaults": {
      "agentRuntime": { "id": "codex" },
      "model": { "primary": "openai/gpt-5.5" }
    }
  }
}

---

[diagnostic] lane task error: lane=main durationMs=2 error="Error: Requested agent harness "codex" is not registered."
[model-fallback/decision] model fallback decision: decision=candidate_failed requested=openai/gpt-5.5 candidate=openai/gpt-5.5 reason=unknown next=openai/gpt-5.4 detail=Requested agent harness "codex" is not registered.
Embedded agent failed before reply: Requested agent harness "codex" is not registered.

---

openclaw plugins install clawhub:@openclaw/codex
openclaw plugins inspect codex
openclaw plugins doctor
openclaw agent --agent main --message "Reply with exactly: OK" --timeout 90 --json

---

Codex plugin: Status: loaded
Source: ~/.openclaw/extensions/codex/dist/index.js
Origin: global
Version: 2026.5.7
Install source: clawhub:@openclaw/codex
Agent smoke: OK, agentHarnessId="codex"
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug / configuration validation gap

Summary

On OpenClaw 2026.5.7, my install ended up with defaults pointing at the Codex agent runtime, but the Codex plugin was not installed or enabled. The gateway stayed up, plugins doctor did not flag the missing runtime dependency, and every OpenAI/Codex agent turn failed before reply with:

Requested agent harness "codex" is not registered.

Manually installing the official Codex plugin fixed the system immediately:

openclaw plugins install clawhub:@openclaw/codex

After that, plugins inspect codex reported Status: loaded, plugins doctor reported no plugin issues, and a direct openclaw agent --agent main --message ... --json smoke test returned successfully with agentHarnessId: "codex".

Environment

  • OpenClaw: 2026.5.7 (eeef486)
  • OS: macOS 26.3.1 (a) / build 25D771280a
  • Node: v22.22.0
  • Install method: npm global through nvm (~/.nvm/.../bin/openclaw)
  • Gateway: local managed gateway
  • Primary model: openai/gpt-5.5

Relevant config state before recovery

The defaults selected the Codex runtime:

{
  "agents": {
    "defaults": {
      "agentRuntime": { "id": "codex" },
      "model": { "primary": "openai/gpt-5.5" }
    }
  }
}

But the Codex plugin was absent from plugins.entries, absent from plugins list, and openclaw plugins inspect codex failed with Plugin not found: codex.

Actual behavior

Agent turns and channel-routed work failed before reply. Representative sanitized logs:

[diagnostic] lane task error: lane=main durationMs=2 error="Error: Requested agent harness "codex" is not registered."
[model-fallback/decision] model fallback decision: decision=candidate_failed requested=openai/gpt-5.5 candidate=openai/gpt-5.5 reason=unknown next=openai/gpt-5.4 detail=Requested agent harness "codex" is not registered.
Embedded agent failed before reply: Requested agent harness "codex" is not registered.

This also affected cron/fallback paths that attempted openai-codex/* or openai/* candidates under the same missing Codex harness state.

Expected behavior

If config selects agentRuntime.id = "codex", OpenClaw should do at least one of the following before user traffic reaches a failing runtime state:

  1. install/enable the official @openclaw/codex plugin automatically, similar to other missing configured plugin recovery paths;
  2. have openclaw doctor / plugins doctor produce a clear error such as agentRuntime.id=codex requires @openclaw/codex to be installed and enabled;
  3. block or repair startup/config validation so a strict Codex runtime cannot remain active without a registered codex agent harness.

Recovery that worked

openclaw plugins install clawhub:@openclaw/codex
openclaw plugins inspect codex
openclaw plugins doctor
openclaw agent --agent main --message "Reply with exactly: OK" --timeout 90 --json

Post-recovery state:

Codex plugin: Status: loaded
Source: ~/.openclaw/extensions/codex/dist/index.js
Origin: global
Version: 2026.5.7
Install source: clawhub:@openclaw/codex
Agent smoke: OK, agentHarnessId="codex"

Related but not exact duplicates

  • #66260 is conceptually close, but it is closed as a startup activation issue where the Codex harness owner plugin can be skipped. My case was a stable 2026.5.7 install where the configured runtime plugin was not installed at all.
  • #81194 / #81196 cover beta @openclaw/codex module-resolution failures after the plugin is installed. My failure happened before that: codex was missing, and installing the stable ClawHub plugin fixed it.
  • #81295 is about deferred loading of non-bundled plugins. In my case other non-bundled plugins were discoverable; the codex plugin specifically was absent while agentRuntime.id=codex remained configured.

Impact

The failure is hard to self-diagnose from the user-facing error because the model configuration looks valid (openai/gpt-5.5 + Codex runtime), but the real fix is to install the runtime owner plugin. A doctor/config validation check would have made this a one-command repair instead of repeated Agent failed before reply failures.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

If config selects agentRuntime.id = "codex", OpenClaw should do at least one of the following before user traffic reaches a failing runtime state:

  1. install/enable the official @openclaw/codex plugin automatically, similar to other missing configured plugin recovery paths;
  2. have openclaw doctor / plugins doctor produce a clear error such as agentRuntime.id=codex requires @openclaw/codex to be installed and enabled;
  3. block or repair startup/config validation so a strict Codex runtime cannot remain active without a registered codex agent harness.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: `agentRuntime.id=codex` can be configured without the Codex plugin installed, causing harness-not-registered failures [3 comments, 3 participants]