OpenClaw 5.12 故障修复:Codex Harness 未注册的定位与恢复
摘要

Embedded agent failed before reply: Requested agent harness "codex" is not registered.Agent failed before reply: Requested agent harness "codex" is not registered.
⚠️ Something went wrong while processing your request. Please try again, or use /new to start a fresh session.
这篇文章记录一下完整排查过程。结论先说:
1. 故障现象
Requested agent harness "codex" is not registered.
2. 初步检查
openclaw --helpopenclaw config validateopenclaw statusopenclaw models statusopenclaw agents listopenclaw memory status
-
OpenClaw CLI 正常 -
版本为 2026.5.12 -
配置文件有效: ~/.openclaw/openclaw.json -
Gateway 服务在运行 -
openai-codexOAuth profile 存在 -
多个 agent 的主模型都是 openai/gpt-5.5
{"agentRuntime": {"id": "codex"}}
3. 关键定位:插件没装
openclaw plugins list
openaiollamaopenroutermemory-corebrowseropenclaw-larkopenclaw-weixin
codex
{"plugins": {"entries": {"codex": {"enabled": true}}}}
codex
@openclaw/codex
4. 修复:安装 Codex 插件
openclaw plugins install npm:@openclaw/codex
npm error code ENOTFOUNDrequest to https://registry.npmjs.org/@openclaw%2fcodex failed
Installing @openclaw/codex into ~/.openclaw/npm…Installed plugin: codexRestart the gateway to load plugins.
~/.openclaw/openclaw.json.bak
5. 确认配置
openclaw config get plugins.entries.codex
{"enabled": true,"config": {"codexDynamicToolsLoading": "searchable","codexDynamicToolsExclude": []}}
openclaw config get plugins.allow
codex
6. 重启 Gateway
openclaw gateway restart
Restarted LaunchAgent: gui/501/ai.openclaw.gateway
7. 验证插件加载
openclaw plugins inspect codex
Codexid: codexStatus: loadedSource: ~/.openclaw/npm/node_modules/@openclaw/codex/dist/index.jsVersion: 2026.5.12Capabilities:text-inference: codexmedia-understanding: codex
http server listening (5 plugins: browser, codex, memory-core, openclaw-lark, openclaw-weixin)gateway ready
8. 根因总结
{"agentRuntime": {"id": "codex"}}
@openclaw/codex
Requested agent harness "codex" is not registered.
9. 排查经验
Requested agent harness "" is not registered
openclaw config validateopenclaw agents listopenclaw models statusopenclaw plugins listopenclaw plugins inspectopenclaw logs --limit 200 --plain
夜雨聆风