#switch from codex to pi harness

1 messages · Page 1 of 1 (latest)

glass vector
#

I'm trying to switch 2026.5.20 from the "codex" to "pi" harness to avoid an error that might be resulting from the codex harness. I've run this command:

openclaw config set agents.defaults.embeddedHarness.runtime '"pi"' --strict-json

restarted the gateway, run "/new" and "reset", verified the config took, etc. However, I'm still getting the suspicious error. When I run "/status", I see the below. What harness is being used and if it's codex, how can I actually switch to pi?

🦞 OpenClaw 2026.5.20 (e510042)
⏱️ Uptime: gateway 6m 2s · system 1h 22m
🧠 Model: openai/gpt-5.4-mini · 🔑 api-key (openai:default)
🔄 Fallbacks: openai/gpt-5.4-mini, openai/gpt-5.4-nano
🧮 Tokens: 31k in / 1.6k out
🗄️ Cache: 49% hit · 30k cached, 0 new
📚 Context: 61k/272k (23%) · 🧹 Compactions: 0
🧵 Session: agent:main:main • updated just now
⚙️ Execution: direct · Runtime: OpenAI Codex · Think: medium · Text: low
🪢 Queue: steer (depth 0)

oak valveBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

dark sirenBOT
naive yewBOT
# glass vector I'm trying to switch 2026.5.20 from the "codex" to "pi" harness to avoid an erro...

I checked the 2026.5.20 docs/code path. That /status line means the turn is using the Codex app-server harness: Runtime: OpenAI Codex.

The command you used is the older knob. In 2026.5.20, agents.defaults.embeddedHarness is legacy/ignored for runtime selection; runtime policy moved to provider/model-scoped agentRuntime.

To force OpenAI models through PI, set the OpenAI provider runtime:

openclaw config set models.providers.openai.agentRuntime '{"id":"pi"}' --strict-json
openclaw doctor --fix
openclaw gateway restart

Then start a fresh session with /new or /reset and check /status again. If it still says Runtime: OpenAI Codex, check for a more-specific model override, because exact model policy wins over provider policy:

openclaw config get agents.defaults.models --json
naive yewBOT
# glass vector I'm trying to switch 2026.5.20 from the "codex" to "pi" harness to avoid an erro...
openclaw config get models.providers.openai.agentRuntime --json

For your current model specifically, this should override just that model:

openclaw config set agents.defaults.models '{"openai/gpt-5.4-mini":{"agentRuntime":{"id":"pi"}},"openai/gpt-5.4-nano":{"agentRuntime":{"id":"pi"}}}' --strict-json --merge
openclaw gateway restart

Docs I checked: https://docs.openclaw.ai/concepts/agent-runtimes and https://docs.openclaw.ai/plugins/codex-harness

glass vector
#

This fixed it:

openclaw config set models.providers.openai.agentRuntime '{"id":"pi"}' --strict-json

thank you.