
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 againfollow-up prompts failstale-socket / Discord disconnect weirdnessThe 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.
⌄
How to install Codex
Step-by-step setup before you paste the migration prompt.
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.
Install the Codex CLI on the machine where your OpenClaw bots run, using OpenAI's current official install instructions for your OS.
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.
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
Open Codex CLI on the machine where your OpenClaw bots actually run
Paste the prompt exactly as-is
Let Codex discover your real local paths and bot layout before it changes anything
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.
- ✓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
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.
Platform and path discovery before any edits
Auth-store inspection instead of guessing which file matters
One-bot-at-a-time migration sequence
Real local probes to separate auth/model issues from Discord transport issues
Start here
OpenClaw + OpenAI Codex ChatGPT Setup
If your bots are breaking during the Claude-to-Codex transition, this is the first page to read. It covers the install walkthrough, the migration prompt, and the safer one-bot-at-a-time path.
Keep exploring
More free AI tools and guides from Don't Sleep On AI

What Is Clawdbot?
Your own AI assistant running 24/7 on your hardware. No subscriptions, no rate limits — just an AI that actually works for you.
VERSION 2.3.1 — JUST RELEASEDThe Claw Loop
Let Clawdbot and Claude Code build, test, and fix code on their own — while you sleep. This is what autonomous AI development looks like.
UPDATED — v1.1Claw Fix
Drop in a broken app. Claw Fix audits for bugs, writes the fixes, browser-tests every user flow, and ships — no hand-holding required.