






















@@ -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/*` 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. |
44+| 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. |
51515252Those surfaces are intentionally independent. Enabling the `codex` plugin makes
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.
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.
57575858The common ChatGPT/Codex subscription setup uses Codex OAuth for auth, but keeps
5959the model ref as `openai/*` and selects the `codex` runtime:
@@ -63,9 +63,6 @@ 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- },
6966 },
7067 },
7168}
@@ -88,20 +85,23 @@ This is the agent-facing decision tree:
88851. If the user asks for **Codex bind/control/thread/resume/steer/stop**, use the
8986 native `/codex` command surface when the bundled `codex` plugin is enabled.
90872. If the user asks for **Codex as the embedded runtime** or wants the normal
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.
95-4. If the user explicitly says **ACP**, **acpx**, or **Codex ACP adapter**, use
88+ subscription-backed Codex agent experience, use `openai/<model>`.
89+3. If the user explicitly chooses **PI for an OpenAI model**, keep the model ref
90+ as `openai/<model>` and set `agentRuntime.id: "pi"`. A selected
91+`openai-codex` auth profile is routed internally through PI's legacy
92+ Codex-auth transport.
93+4. If legacy config still contains **`openai-codex/*` model refs**, repair it to
94+`openai/<model>` with `openclaw doctor --fix`.
95+5. If the user explicitly says **ACP**, **acpx**, or **Codex ACP adapter**, use
9696 ACP with `runtime: "acp"` and `agentId: "codex"`.
97-5. If the request is for **Claude Code, Gemini CLI, OpenCode, Cursor, Droid, or
97+6. If the request is for **Claude Code, Gemini CLI, OpenCode, Cursor, Droid, or
9898 another external harness**, use ACP/acpx, not the native sub-agent runtime.
9999100100| You mean... | Use... |
101101| --------------------------------------- | -------------------------------------------- |
102102| Codex app-server chat/thread control | `/codex ...` from the bundled `codex` plugin |
103-| Codex app-server embedded agent runtime | `agentRuntime.id: "codex"` |
104-| OpenAI Codex OAuth on the PI runner | `openai-codex/*` model refs |
103+| Codex app-server embedded agent runtime | `openai/*` agent model refs |
104+| OpenAI Codex OAuth | `openai-codex` auth profiles |
105105| Claude Code or other external harness | ACP/acpx |
106106107107For the OpenAI-family prefix split, see [OpenAI](/providers/openai) and
@@ -166,17 +166,17 @@ Legacy refs such as `claude-cli/claude-opus-4-7` remain supported for
166166compatibility, but new config should keep the provider/model canonical and put
167167the execution backend in `agentRuntime.id`.
168168169-`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.
169+`auto` mode is intentionally conservative for most providers. OpenAI agent
170+models are the exception: unset runtime and `auto` both resolve to the Codex
171+harness. Explicit PI runtime config remains an opt-in compatibility route for
172+`openai/*` agent turns; when paired with a selected `openai-codex` auth profile,
173+OpenClaw routes PI internally through the legacy Codex-auth transport while
174+keeping the public model ref as `openai/*`. Stale OpenAI PI session pins without
175+explicit config are repaired back to Codex.
174176175177If `openclaw doctor` warns that the `codex` plugin is enabled while
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.
178+`openai-codex/*` remains in config, treat that as legacy route state. Run
179+`openclaw doctor --fix` to rewrite it to `openai/*` with the Codex runtime.
180180181181## Compatibility contract
182182此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。