openclaw - 💡(How to fix) Fix doctor --fix migrates working openai-codex + PI runtime setup to codex runtime [1 comments, 2 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#84175Fetched 2026-05-20 03:43:08
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
1
Author
Timeline (top)
labeled ×3closed ×1commented ×1

openclaw doctor --fix currently migrates a working openai-codex/* configuration to openai/* with the Codex runtime. That may be intended for the newer native Codex path, but it breaks or invalidates a setup where ChatGPT+/Codex OAuth is intentionally used together with the OpenClaw PI runtime.

I would like OpenClaw to support or at least not overwrite this configuration:

  • model/provider route: openai-codex/gpt-*
  • auth: openai-codex:<account>
  • runtime: agentRuntime.id = "pi" on the model entries

This setup allows Codex OAuth / ChatGPT+ usage while still using the PI runtime.

Error Message

  1. Make doctor --fix warn but not rewrite this setup automatically.

Root Cause

The current migration makes it hard to keep a stable setup where:

  • billing/auth goes through Codex OAuth / ChatGPT+ rather than normal OpenAI API budget
  • the agent runtime remains PI
  • openclaw doctor --fix can still be used safely after updates

Right now I need a local guard script to undo the doctor migration after updates, which suggests the migration behavior is too aggressive for this valid use case.

Code Example

openclaw doctor --non-interactive --fix

---

primary:   openai-codex/gpt-5.5
fallback:  openai-codex/gpt-5.4
manual:    openai-codex/gpt-5.4-mini

agentRuntime:
  openai-codex/gpt-5.5      -> pi
  openai-codex/gpt-5.4      -> pi
  openai-codex/gpt-5.4-mini -> pi

auth.order.openai:
  - openai-codex:<account>
RAW_BUFFERClick to expand / collapse

doctor --fix migrates working openai-codex + PI runtime setup to codex runtime

Summary

openclaw doctor --fix currently migrates a working openai-codex/* configuration to openai/* with the Codex runtime. That may be intended for the newer native Codex path, but it breaks or invalidates a setup where ChatGPT+/Codex OAuth is intentionally used together with the OpenClaw PI runtime.

I would like OpenClaw to support or at least not overwrite this configuration:

  • model/provider route: openai-codex/gpt-*
  • auth: openai-codex:<account>
  • runtime: agentRuntime.id = "pi" on the model entries

This setup allows Codex OAuth / ChatGPT+ usage while still using the PI runtime.

Environment

  • OpenClaw version: 2026.5.18 Stable
  • macOS
  • Codex OAuth / ChatGPT+ account configured

Current behavior

After running:

openclaw doctor --non-interactive --fix

OpenClaw migrates the config away from openai-codex/* toward openai/* with the Codex runtime.

In my case this is not the desired state. The working local setup is:

primary:   openai-codex/gpt-5.5
fallback:  openai-codex/gpt-5.4
manual:    openai-codex/gpt-5.4-mini

agentRuntime:
  openai-codex/gpt-5.5      -> pi
  openai-codex/gpt-5.4      -> pi
  openai-codex/gpt-5.4-mini -> pi

auth.order.openai:
  - openai-codex:<account>

With that setup, status/usage shows the expected Codex OAuth usage while the runtime remains OpenClaw Pi Default.

Expected behavior

There should be a supported way to use Codex OAuth / ChatGPT+ auth with the PI runtime without doctor --fix rewriting it as legacy or invalid config.

Possible fixes could be one of:

  1. Treat openai-codex/* + agentRuntime.id="pi" as a valid configuration.
  2. Add an explicit config flag or migration mode for "use Codex OAuth with PI runtime".
  3. Make doctor --fix warn but not rewrite this setup automatically.
  4. Document the intended supported replacement if this path should no longer be used.

Why this matters

The current migration makes it hard to keep a stable setup where:

  • billing/auth goes through Codex OAuth / ChatGPT+ rather than normal OpenAI API budget
  • the agent runtime remains PI
  • openclaw doctor --fix can still be used safely after updates

Right now I need a local guard script to undo the doctor migration after updates, which suggests the migration behavior is too aggressive for this valid use case.

Question

Is using Codex OAuth / ChatGPT+ with the PI runtime supposed to be supported? If yes, can doctor preserve this setup? If no, what is the recommended supported configuration for this use case?

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

There should be a supported way to use Codex OAuth / ChatGPT+ auth with the PI runtime without doctor --fix rewriting it as legacy or invalid config.

Possible fixes could be one of:

  1. Treat openai-codex/* + agentRuntime.id="pi" as a valid configuration.
  2. Add an explicit config flag or migration mode for "use Codex OAuth with PI runtime".
  3. Make doctor --fix warn but not rewrite this setup automatically.
  4. Document the intended supported replacement if this path should no longer be used.

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 doctor --fix migrates working openai-codex + PI runtime setup to codex runtime [1 comments, 2 participants]