openclaw - 💡(How to fix) Fix OpenClaw 2026.5.7 update/doctor rewrites Codex model provider and global agentRuntime defaults [2 pull requests]

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…

After the OpenClaw 2026.5.7 update / repair flow, model provider and agent runtime defaults were rewritten in a way that routed Codex work through the wrong billing/auth path and temporarily changed the default runtime behavior.

This is separate from the Weixin/Codex Computer Use issue filed as #79304. This issue is specifically about config migration / doctor / repair behavior around model provider IDs and agentRuntime defaults.

Environment observed:

  • OpenClaw: 2026.5.7 (eeef486)
  • macOS: Darwin 25.4.0 arm64
  • Node: 24.15.0
  • Current desired main model route: openai-codex/gpt-5.5 via ChatGPT/Codex OAuth
  • Current desired default runtime: OpenClaw Pi/default runtime for normal Doraemon sessions
  • Codex-specific worker runtime: agentRuntime.id = "codex" only on Codex-specific agent(s)

Error Message

  • If a config references openai/* while a matching openai-codex/* subscription route is configured as the durable default, warn before changing or using it.

Root Cause

This matters because the two provider IDs are not equivalent:

Fix Action

Fixed

Code Example

"agents.defaults.model.primary": "openai-codex/gpt-5.5"

---

"agents.defaults.model.primary": "openai/gpt-5.5"

---

"agents.defaults.agentRuntime": { "id": "codex" }

---

"agents.defaults.agentRuntime": { "id": "pi" }

---

"agents.list[7].id": "minidora-codex",
"agents.list[7].agentRuntime": { "id": "codex" },
"agents.list[7].model.primary": "openai/gpt-5.5"

---

"agents.list[7].model.primary": "openai-codex/gpt-5.5",
"agents.list[7].agentRuntime": { "id": "codex" }

---

openclaw.json.bak.2
agents.defaults.model.primary = openai-codex/gpt-5.5
agents.defaults.agentRuntime = null
agents.list[7].id = codex-d6
agents.list[7].agentRuntime.id = codex
agents.list[7].model.primary = openai/gpt-5.5
plugins.entries.codex.config.appServer.command = /Applications/Codex.app/Contents/Resources/codex

---

openclaw.json.bak.1
agents.defaults.model.primary = openai/gpt-5.5
agents.defaults.imageModel.primary = openai/gpt-5.5
agents.defaults.agentRuntime.id = codex
agents.list[7].id = codex-d6
agents.list[7].agentRuntime.id = codex
agents.list[7].model.primary = openai/gpt-5.5
plugins.entries.codex.config.appServer.command = /Applications/Codex.app/Contents/Resources/codex

---

openclaw.json.pre-codex-model-restore.20260508T064153Z.bak
agents.defaults.model.primary = openai/gpt-5.5
agents.defaults.imageModel.primary = openai/gpt-5.5
agents.defaults.agentRuntime.id = pi
agents.list[7].id = minidora-codex
agents.list[7].agentRuntime.id = codex
agents.list[7].model.primary = openai/gpt-5.5

---

openclaw.json.pre-api-text-model-prune.20260508T064437Z.bak
agents.defaults.model.primary = openai-codex/gpt-5.5
agents.defaults.imageModel.primary = openai-codex/gpt-5.5
agents.defaults.agentRuntime.id = pi
agents.list[7].id = minidora-codex
agents.list[7].agentRuntime.id = codex
agents.list[7].model.primary = openai/gpt-5.5

---

openclaw.json
agents.defaults.model.primary = openai-codex/gpt-5.5
agents.defaults.agentRuntime.id = pi
agents.list[7].id = minidora-codex
agents.list[7].agentRuntime.id = codex
agents.list[7].model.primary = openai-codex/gpt-5.5

---

Model: openai-codex/gpt-5.5
Auth: oauth (openai-codex:<account>)
Runtime: OpenClaw Pi Default
RAW_BUFFERClick to expand / collapse

Summary

After the OpenClaw 2026.5.7 update / repair flow, model provider and agent runtime defaults were rewritten in a way that routed Codex work through the wrong billing/auth path and temporarily changed the default runtime behavior.

This is separate from the Weixin/Codex Computer Use issue filed as #79304. This issue is specifically about config migration / doctor / repair behavior around model provider IDs and agentRuntime defaults.

Environment observed:

  • OpenClaw: 2026.5.7 (eeef486)
  • macOS: Darwin 25.4.0 arm64
  • Node: 24.15.0
  • Current desired main model route: openai-codex/gpt-5.5 via ChatGPT/Codex OAuth
  • Current desired default runtime: OpenClaw Pi/default runtime for normal Doraemon sessions
  • Codex-specific worker runtime: agentRuntime.id = "codex" only on Codex-specific agent(s)

What went wrong

1. openai-codex/gpt-5.5 was rewritten to openai/gpt-5.5

The intended model route is the native Codex / ChatGPT subscription provider:

"agents.defaults.model.primary": "openai-codex/gpt-5.5"

After the update/repair flow, config snapshots showed the provider had been rewritten to the generic OpenAI API-key provider:

"agents.defaults.model.primary": "openai/gpt-5.5"

This matters because the two provider IDs are not equivalent:

  • openai-codex/gpt-5.5 => ChatGPT/Codex OAuth / subscription route
  • openai/gpt-5.5 => OpenAI API-key route

In practice this caused/was caught because OpenAI API-key credits were being burned when the expected route was ChatGPT/Codex subscription billing.

2. agents.defaults.agentRuntime was changed globally

A config snapshot after the update/repair flow also showed:

"agents.defaults.agentRuntime": { "id": "codex" }

That effectively changed the default runtime route for normal agents/sessions, not just Codex-specific workers. Later repair restored the normal default runtime to Pi/default:

"agents.defaults.agentRuntime": { "id": "pi" }

But the unexpected global runtime flip was dangerous because normal Doraemon sessions should not be silently switched to Codex runtime. Codex runtime should be opt-in per Codex worker/agent.

3. Codex-specific worker model stayed on the wrong provider after partial repair

After the defaults were repaired, the Codex worker still had the wrong provider in an intermediate snapshot:

"agents.list[7].id": "minidora-codex",
"agents.list[7].agentRuntime": { "id": "codex" },
"agents.list[7].model.primary": "openai/gpt-5.5"

This meant the agent runtime was correctly Codex, but the model provider still pointed at the OpenAI API-key route instead of the Codex OAuth provider. Final local repair changed it to:

"agents.list[7].model.primary": "openai-codex/gpt-5.5",
"agents.list[7].agentRuntime": { "id": "codex" }

Evidence from local config snapshots

Relevant sanitized snapshots from ~/.openclaw/openclaw.json*:

Before the bad rewrite / older backup

openclaw.json.bak.2
agents.defaults.model.primary = openai-codex/gpt-5.5
agents.defaults.agentRuntime = null
agents.list[7].id = codex-d6
agents.list[7].agentRuntime.id = codex
agents.list[7].model.primary = openai/gpt-5.5
plugins.entries.codex.config.appServer.command = /Applications/Codex.app/Contents/Resources/codex

Bad state after update/repair flow

openclaw.json.bak.1
agents.defaults.model.primary = openai/gpt-5.5
agents.defaults.imageModel.primary = openai/gpt-5.5
agents.defaults.agentRuntime.id = codex
agents.list[7].id = codex-d6
agents.list[7].agentRuntime.id = codex
agents.list[7].model.primary = openai/gpt-5.5
plugins.entries.codex.config.appServer.command = /Applications/Codex.app/Contents/Resources/codex

Intermediate state before local model restore

openclaw.json.pre-codex-model-restore.20260508T064153Z.bak
agents.defaults.model.primary = openai/gpt-5.5
agents.defaults.imageModel.primary = openai/gpt-5.5
agents.defaults.agentRuntime.id = pi
agents.list[7].id = minidora-codex
agents.list[7].agentRuntime.id = codex
agents.list[7].model.primary = openai/gpt-5.5

Intermediate state after default restore but before per-agent prune/repair

openclaw.json.pre-api-text-model-prune.20260508T064437Z.bak
agents.defaults.model.primary = openai-codex/gpt-5.5
agents.defaults.imageModel.primary = openai-codex/gpt-5.5
agents.defaults.agentRuntime.id = pi
agents.list[7].id = minidora-codex
agents.list[7].agentRuntime.id = codex
agents.list[7].model.primary = openai/gpt-5.5

Final repaired local state

openclaw.json
agents.defaults.model.primary = openai-codex/gpt-5.5
agents.defaults.agentRuntime.id = pi
agents.list[7].id = minidora-codex
agents.list[7].agentRuntime.id = codex
agents.list[7].model.primary = openai-codex/gpt-5.5

Current runtime verification after repair:

Model: openai-codex/gpt-5.5
Auth: oauth (openai-codex:<account>)
Runtime: OpenClaw Pi Default

Expected behavior

  1. Config migration / doctor / repair should not rewrite provider IDs across billing/auth domains.

    • openai-codex/gpt-5.5 must not be normalized to openai/gpt-5.5.
    • Provider ID is semantically important, not just a prefix around the same model name.
  2. Runtime migration should not set agents.defaults.agentRuntime.id = "codex" unless the user explicitly requested Codex as the global default runtime.

    • Codex runtime should stay scoped to Codex-specific agents, e.g. minidora-codex.
  3. Repair flows should validate model provider + runtime pairings together.

    • If agentRuntime.id = "codex", model provider should be compatible with the Codex app-server/OAuth route unless the user explicitly chooses API-key-backed OpenAI.
    • If a config references openai/* while a matching openai-codex/* subscription route is configured as the durable default, warn before changing or using it.
  4. Post-update checks should surface billing-route changes clearly.

    • Example warning: Model provider changed from openai-codex/* to openai/*; this may switch from ChatGPT/Codex OAuth to OpenAI API-key billing.

Impact

  • Unexpected API-key credit usage.
  • Normal sessions can be routed through the wrong runtime.
  • Codex worker can appear to use Codex runtime while still billing through the generic OpenAI API provider.
  • Recovery requires manual config inspection of agents.defaults.model, agents.defaults.agentRuntime, and every Codex-specific agent model override.

Suggested fixes

  • Treat provider IDs as stable, semantically meaningful identifiers during config migration/normalization.
  • Add guardrails for openai-codex/* -> openai/* rewrites.
  • Add a doctor check that reports mismatches between:
    • configured auth profile/provider
    • model provider ID
    • agent runtime ID
    • Codex app-server command/auth route
  • Preserve explicit per-agent runtime settings and avoid writing global agents.defaults.agentRuntime during Codex-specific repair flows.

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

  1. Config migration / doctor / repair should not rewrite provider IDs across billing/auth domains.

    • openai-codex/gpt-5.5 must not be normalized to openai/gpt-5.5.
    • Provider ID is semantically important, not just a prefix around the same model name.
  2. Runtime migration should not set agents.defaults.agentRuntime.id = "codex" unless the user explicitly requested Codex as the global default runtime.

    • Codex runtime should stay scoped to Codex-specific agents, e.g. minidora-codex.
  3. Repair flows should validate model provider + runtime pairings together.

    • If agentRuntime.id = "codex", model provider should be compatible with the Codex app-server/OAuth route unless the user explicitly chooses API-key-backed OpenAI.
    • If a config references openai/* while a matching openai-codex/* subscription route is configured as the durable default, warn before changing or using it.
  4. Post-update checks should surface billing-route changes clearly.

    • Example warning: Model provider changed from openai-codex/* to openai/*; this may switch from ChatGPT/Codex OAuth to OpenAI API-key billing.

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 OpenClaw 2026.5.7 update/doctor rewrites Codex model provider and global agentRuntime defaults [2 pull requests]