openclaw binary in PATH + re-auth via onboardOpenClaw stops replying and shows:
⚠️ Agent failed before reply: OAuth token refresh failed for openai-codexAt the same time, install reports success (new version), but shell still resolves an older openclaw binary.
Two issues overlapped:
PATH
openclaw --version returned old version (for example 2026.2.26),~/.openclaw/bin/openclaw --version returned new version (2026.3.2).models auth login --provider openai-codex may fail in some environments,openai-codex re-auth.~/.openclaw/bin/openclaw --version
export PATH="$HOME/.openclaw/bin:$HOME/.openclaw/tools/node/bin:$PATH"
hash -r
openclaw --version
which -a openclaw
Expected first path:
/root/.openclaw/bin/openclaw
Persist for future shells:
echo 'export PATH="$HOME/.openclaw/bin:$HOME/.openclaw/tools/node/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
~/.openclaw/bin/openclaw onboard --auth-choice openai-codex --skip-channels --skip-skills --skip-ui --skip-health --no-install-daemon
~/.openclaw/bin/openclaw gateway restart
~/.openclaw/bin/openclaw models status --json
~/.openclaw/bin/openclaw logs --follow
openclaw logs --follow