





















@@ -41,19 +41,19 @@ There are two runtime families:
41414242Most confusion comes from several different surfaces sharing the Codex name:
434344-| Surface | OpenClaw name/config | What it does |
45-| ------------------------------------------------ | ------------------------------------ | -------------------------------------------------------------------------------------------------------------- |
46-| Native Codex app-server runtime | `openai/*` model refs | Runs OpenAI embedded agent turns through Codex app-server. This is the usual ChatGPT/Codex subscription setup. |
47-| Codex OAuth auth profiles | `openai-codex` auth provider | Stores ChatGPT/Codex subscription auth that the Codex app-server harness consumes. |
48-| Codex ACP adapter | `runtime: "acp"`, `agentId: "codex"` | Runs Codex through the external ACP/acpx control plane. Use only when ACP/acpx is explicitly asked. |
49-| Native Codex chat-control command set | `/codex ...` | Binds, resumes, steers, stops, and inspects Codex app-server threads from chat. |
50-| OpenAI Platform API route for non-agent surfaces | `openai/*` plus API-key auth | Used for direct OpenAI APIs such as images, embeddings, speech, and realtime. |
44+| Surface | OpenClaw name/config | What it does |
45+| ---------------------------------------------------- | ------------------------------------------ | ---------------------------------------------------------------------------------------------------------- |
46+| Native Codex app-server runtime | `openai/*` plus `agentRuntime.id: "codex"` | Runs the embedded agent turn through Codex app-server. This is the usual ChatGPT/Codex subscription setup. |
47+| Codex OAuth provider route | `openai-codex/*` model refs | Uses ChatGPT/Codex subscription OAuth through the normal OpenClaw PI runner. |
48+| Codex ACP adapter | `runtime: "acp"`, `agentId: "codex"` | Runs Codex through the external ACP/acpx control plane. Use only when ACP/acpx is explicitly asked. |
49+| Native Codex chat-control command set | `/codex ...` | Binds, resumes, steers, stops, and inspects Codex app-server threads from chat. |
50+| OpenAI Platform API route for GPT/Codex-style models | `openai/*` model refs | Uses OpenAI API-key auth unless a runtime override, such as `agentRuntime.id: "codex"`, runs the turn. |
51515252Those surfaces are intentionally independent. Enabling the `codex` plugin makes
53-the native app-server features available; `openclaw doctor --fix` owns legacy
54-`openai-codex/*` route repair and stale session pin cleanup. Selecting
55-`openai/*` for an agent model now means "run this through Codex" unless a
56-non-agent OpenAI API surface is being used.
53+the native app-server features available; it does not rewrite
54+`openai-codex/*` into `openai/*`, does not change existing sessions, and does
55+not make ACP the Codex default. Selecting `openai-codex/*` means "use the Codex
56+OAuth provider route" unless you separately force a runtime.
57575858The common ChatGPT/Codex subscription setup uses Codex OAuth for auth, but keeps
5959the model ref as `openai/*` and selects the `codex` runtime:
@@ -63,6 +63,9 @@ the model ref as `openai/*` and selects the `codex` runtime:
6363 agents: {
6464 defaults: {
6565 model: "openai/gpt-5.5",
66+ agentRuntime: {
67+ id: "codex",
68+ },
6669 },
6770 },
6871}
@@ -85,9 +88,10 @@ This is the agent-facing decision tree:
85881. If the user asks for **Codex bind/control/thread/resume/steer/stop**, use the
8689 native `/codex` command surface when the bundled `codex` plugin is enabled.
87902. If the user asks for **Codex as the embedded runtime** or wants the normal
88- subscription-backed Codex agent experience, use `openai/<model>`.
89-3. If legacy config still contains **`openai-codex/*` model refs**, repair it to
90-`openai/<model>` with `openclaw doctor --fix`.
91+ subscription-backed Codex agent experience, use
92+`openai/<model>` with `agentRuntime.id: "codex"`.
93+3. If the user asks for **Codex OAuth/subscription auth on the normal OpenClaw
94+ runner**, use `openai-codex/<model>` and leave the runtime as PI.
91954. If the user explicitly says **ACP**, **acpx**, or **Codex ACP adapter**, use
9296 ACP with `runtime: "acp"` and `agentId: "codex"`.
93975. If the request is for **Claude Code, Gemini CLI, OpenCode, Cursor, Droid, or
@@ -96,8 +100,8 @@ This is the agent-facing decision tree:
96100| You mean... | Use... |
97101| --------------------------------------- | -------------------------------------------- |
98102| Codex app-server chat/thread control | `/codex ...` from the bundled `codex` plugin |
99-| Codex app-server embedded agent runtime | `openai/*` agent model refs |
100-| OpenAI Codex OAuth | `openai-codex` auth profiles |
103+| Codex app-server embedded agent runtime | `agentRuntime.id: "codex"` |
104+| OpenAI Codex OAuth on the PI runner | `openai-codex/*` model refs |
101105| Claude Code or other external harness | ACP/acpx |
102106103107For the OpenAI-family prefix split, see [OpenAI](/providers/openai) and
@@ -162,14 +166,17 @@ Legacy refs such as `claude-cli/claude-opus-4-7` remain supported for
162166compatibility, but new config should keep the provider/model canonical and put
163167the execution backend in `agentRuntime.id`.
164168165-`auto` mode is intentionally conservative for most providers. OpenAI agent
166-models are the exception: unset runtime and `auto` both resolve to the Codex
167-harness, while explicit PI runtime config is rejected for `openai/*` agent
168-turns.
169+`auto` mode is intentionally conservative. Plugin runtimes can claim
170+provider/model pairs they understand, but the Codex plugin does not claim the
171+`openai-codex` provider in `auto` mode. That keeps
172+`openai-codex/*` as the explicit PI Codex OAuth route and avoids silently
173+moving subscription-auth configs onto the native app-server harness.
169174170175If `openclaw doctor` warns that the `codex` plugin is enabled while
171-`openai-codex/*` remains in config, treat that as legacy route state. Run
172-`openclaw doctor --fix` to rewrite it to `openai/*` with the Codex runtime.
176+`openai-codex/*` still routes through PI, treat that as a diagnosis, not a
177+migration. Keep the config unchanged when PI Codex OAuth is what you want.
178+Switch to `openai/<model>` plus `agentRuntime.id: "codex"` only when you want native
179+Codex app-server execution.
173180174181## Compatibility contract
175182此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。