Skip to content

[Bug]: macOS onboarding rejects a logged-in Codex CLI on fresh installs #102614

Description

@steipete

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Fresh macOS onboarding detects and recommends a logged-in Codex CLI, but rejects it because the live setup test runs before the required Codex runtime plugin is installed.

Steps to reproduce

  1. Restore a fresh macOS 26.5.2 Parallels VM snapshot.
  2. Install a current-main OpenClaw CLI and signed macOS app build.
  3. Install @openai/codex, log in with codex login --with-api-key, and confirm codex login status reports a successful API-key login.
  4. Ensure OpenClaw has no default model and no OPENAI_API_KEY in the GUI or Gateway environment.
  5. Start macOS onboarding and choose the local Gateway.
  6. Observe that Connect your AI detects Codex, marks it Recommended, then reports that the login did not work.

Expected behavior

The onboarding live test should provision the Codex runtime required to exercise the detected Codex CLI, complete one real inference turn, and persist openai/gpt-5.5 only after that turn succeeds.

Actual behavior

Codex is detected and officially logged in, but openclaw plugins info codex --json reports Plugin not found: codex. The setup test enables the absent plugin in an ephemeral config, falls through to direct OpenAI auth, and reports a false Codex login failure.

OpenClaw version

OpenClaw 2026.6.11 (9566ade); source defect confirmed unchanged on main at 3f2466c.

Operating system

macOS 26.5.2 guest in Parallels Desktop 26.4.0 on macOS.

Install method

Current-main signed macOS app build plus globally installed current-main npm tarballs in OpenClaw's managed Node runtime.

Model

openai/gpt-5.5 via the Codex app-server harness.

Provider / routing chain

OpenClaw macOS onboarding -> local Gateway -> Codex runtime plugin -> locally installed Codex CLI app-server -> OpenAI.

Additional provider/model setup details

The Codex CLI login was verified independently before onboarding. OPENAI_API_KEY was removed from the app and Gateway environment so the test could not silently use the direct OpenAI API-key route.

Logs

UI: Codex is installed, but the login didn't work. Sign in again, then retry.
CLI: Plugin not found: codex.
Gateway: lane=setup-inference:openai ... ProviderAuthError: No API key found for provider "openai".

Screenshots, recordings, and evidence

Observed through Computer Use in a fresh Parallels VM. The same VM successfully completed current-main OpenAI-key onboarding and a live macOS-app chat turn before the isolated Codex variant.

Impact and severity

Affected: fresh macOS users who already have a logged-in Codex CLI but no direct OpenAI API key exposed to OpenClaw.

Severity: high for this route because onboarding incorrectly rejects the usable local credential.

Frequency: 1/1 isolated attempts; deterministic from the install ordering.

Consequence: users cannot finish the recommended Codex onboarding path and are told to re-authenticate even though Codex authentication is valid.

Additional information

src/crestodian/setup-inference.ts currently runs the Codex live test before calling ensureCodexRuntimePluginForModelSelection. The test config can enable a plugin only if it is already installed, so a fresh system cannot reach the Codex app-server harness.

Metadata

Metadata

Assignees

Labels

P0Emergency: data loss, security bypass, crash loop, or unusable core runtime.bugSomething isn't workingclawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.impact:ux-release-blockerA non-technical user is blocked without terminal, logs, config, or support.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.maintainerMaintainer-authored PRmaturity:stableIssue affects a taxonomy feature currently scored M4/M5.

Type

No type

Fields

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions