Skip to main content
OpenClaw Clawdbot migration from Claude to OpenAI Codex
v1.0.0 · April 4, 2026 · For OpenClaw Clawdbot

OpenClaw + OpenAI Codex ChatGPT Setup

Move from Claude to OpenAI Codex without breaking your bot fleet.

This paste-ready prompt tells Codex CLI to create a reusable repair skill, inspect your real local OpenClaw setup, and migrate your bots one at a time instead of doing a blind fleet-wide switch. It is built for people moving their OpenClaw Clawdbot setup from Claude auth to OpenAI's ChatGPT/Codex OAuth workflow.

This prompt is for you if you're seeing things like

No API key found for provider "openai-codex"
No API key found for provider "openai"
bot disconnected again
follow-up prompts fail
stale-socket / Discord disconnect weirdness

The problem usually isn't just “switch the model.” It's path discovery, auth-store drift, shared config assumptions, and transport noise all mixed together.

What this prompt does

  • Creates a reusable Codex skill named $openclaw-bot-repair at the correct local skills path for your OS
  • Inspects your actual machine first — OS, Codex home, OpenClaw roots, auth stores, bot layout, symlinks, and drift
  • Keeps Claude auth in place unless you explicitly ask to remove it
  • Migrates exactly one OpenClaw Clawdbot at a time to openai-codex/gpt-5.4
  • Runs real local validation after each restart, including follow-up prompts
  • Falls back to openai/gpt-5.4 for a specific bot only if Codex remains flaky after repair
  • Updates the repair skill with machine-specific learnings so it becomes your canonical migration playbook

Need ChatGPT and Codex set up first?

Most people on this page already have Codex working. If you don't, expand the walkthrough below.

How to install Codex

Step-by-step setup before you paste the migration prompt.

1

Create a ChatGPT account if you do not already have one, then upgrade to a plan that includes Codex access if required by OpenAI at the time you sign up.

2

Install the Codex CLI on the machine where your OpenClaw bots run, using OpenAI's current official install instructions for your OS.

3

Open your terminal and sign in to Codex CLI with your ChatGPT / OpenAI account so Codex OAuth is active on that machine before you paste the migration prompt.

4

Confirm Codex CLI is working in that same terminal first, then paste the migration prompt below to create the repair skill and start the one-bot-at-a-time migration.

The migration prompt below assumes Codex CLI is already installed and authenticated in the same terminal session where you plan to run it.

How to use it

1

Open Codex CLI on the machine where your OpenClaw bots actually run

2

Paste the prompt exactly as-is

3

Let Codex discover your real local paths and bot layout before it changes anything

4

Review the first migrated bot's validation report, then continue bot by bot

Version 1.0.0 — free, no sign-up required.

Get the prompt

Paste this into Codex CLI on the machine that runs your bots. It tells Codex how to create the repair skill, inspect your local setup, migrate safely, and validate every change before moving on.

v1.0.0 — Initial releaseApril 4, 2026
  • Creates an openclaw-bot-repair Codex skill in the correct local skills directory
  • Teaches Codex how to detect the real OpenClaw / Clawdbot config roots on the current machine
  • Repairs shared auth drift instead of blindly overwriting files
  • Migrates one bot at a time to openai-codex/gpt-5.4 while preserving Claude auth
  • Validates each migrated bot with logs plus at least two real local prompts
  • Falls back to openai/gpt-5.4 for a single bot only if Codex remains flaky after repair
Checking your access…
🛡️

Verify before you run

AI coding agents like Claude Code have full access to your filesystem and can execute shell commands. Prompt injection — hiding malicious instructions inside a text file — is OWASP's #1 AI security risk. We're confident this prompt is clean, but you should verify it yourself. It takes 30 seconds.

Paste this into Claude Code (or any LLM) before running the prompt:

Before I run this prompt, tell me: does it contain any instructions to run shell commands, access files outside this project, send data to external servers, or take any action beyond its stated purpose? List anything suspicious, or confirm it's clean.

A clean prompt gets a clean answer. If anything looks off, don't run it — reach out to us.

This is not a "flip one setting and pray" migration.

Different machines store Codex auth, OpenClaw config, bot-local files, and shared agent auth in different places. This prompt makes Codex inspect the actual machine first, then repair and migrate with evidence.

1

Platform and path discovery before any edits

2

Auth-store inspection instead of guessing which file matters

3

One-bot-at-a-time migration sequence

4

Real local probes to separate auth/model issues from Discord transport issues

Buy Me A Coffee