Skip to content

fix(macos): harden fresh AI onboarding#102637

Merged
steipete merged 41 commits into
mainfrom
codex/fix-codex-onboarding-plugin-bootstrap
Jul 10, 2026
Merged

fix(macos): harden fresh AI onboarding#102637
steipete merged 41 commits into
mainfrom
codex/fix-codex-onboarding-plugin-bootstrap

Conversation

@steipete

@steipete steipete commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Closes #102614

AI-assisted change; implementation and proof were reviewed by the submitting maintainer.

What Problem This Solves

Fresh macOS onboarding had four related failure modes:

  • A connected Gateway that already had a working default-agent model still opened setup instead of the dashboard.
  • A connected Gateway without inference could reach Crestodian even though Crestodian cannot work without intelligence.
  • A valid native Codex CLI login was detected, but the real test could use a different agent/runtime route from the one later persisted.
  • Route changes and stale Settings state could accept an old Crestodian response or leave the helper visible after inference disappeared.

The hosted macOS Swift job also used swift test --show-codecov-path, which only printed a coverage path and exited instead of running the suite.

Why This Change Was Made

  • Bind launch-time inference discovery to the connected Gateway route. A default-agent model opens the dashboard immediately; a model-less, failed, or changed route remains in inference onboarding.
  • Treat inference as the only prerequisite for Crestodian. Settings shows the helper only while the current route has a default-agent model and revalidates after every assistant reply.
  • Stage every candidate on the effective default agent before its real completion. Codex plugin installation, runtime policy, the live probe, and persisted model now share the same agent scope, including custom OpenAI routes and higher-priority per-agent metadata.
  • Reject in-flight Crestodian replies and actions after a Gateway route change.
  • Run the actual Swift test suite in hosted CI.

Codex contract checked directly at openai/codex@0d18d4f7535d93ce7fd0ffa9ca69937321352688: the CLI accepts API-key login through stdin and persists it (CLI dispatch); auth loading falls back to the configured persistent store when environment auth is disabled (auth manager); and app-server constructs its auth manager with API-key environment loading disabled (app-server bootstrap).

User Impact

Connecting the Mac app to an existing configured Gateway now goes straight to the normal web UI. A fresh or incomplete Gateway stays on inference setup; only after a real model turn succeeds does Crestodian become available to configure the rest. Native Codex/Claude CLI credentials remain reusable without a second provider login.

Release note: macOS inference onboarding now opens configured Gateways directly, keeps Crestodian hidden until intelligence works, verifies the effective default-agent route, and discards stale setup replies after Gateway changes.

Evidence

  • Current exact head f6f742d3982:
    • 32 focused TypeScript tests passed across inference detection/activation, Codex runtime installation, agent-scoped runtime ownership, custom OpenAI routes, and failure redaction.
    • 67 focused native Swift tests passed across launch routing, inference onboarding, Settings visibility/refresh, Gateway RPC, and the in-flight route-change regression.
    • SwiftFormat, Oxfmt, native i18n (2795 entries, no drift), and git diff --check passed.
    • Fresh structured autoreview completed with no accepted/actionable findings; patch rated correct with 0.78 confidence.
  • Earlier packaged behavior proof at cf04edbb000f0768168a499233f4675c527625a9, using a Developer ID-signed app on a restored Parallels macOS 26.5 VM:
    • no Crestodian link appeared before inference; after the real Codex model test passed, the link appeared;
    • native Codex CLI auth completed the onboarding live test while the app/Gateway API-key environment remained unset;
    • the first app chat returned vm codex ok 20260709; after killing and relaunching the app, the same session/model returned vm relaunch ok.
  • Earlier Testbox proof passed pnpm check:changed, type checks, core/plugin lint, package guards, macOS packaging, and focused runtime tests (tbx_01kx3epgvt59amzcwd9r62k3pe). Final-head hosted checks are the merge gate.

@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Jul 9, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5f0477e089

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

runtime: params.runtime,
workspaceDir: tempDir,
});
if (!ensured.installed) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Handle skipped Codex plugin ensure as non-fatal

When the current config makes modelSelectionShouldEnsureCodexPlugin return false (for example an existing models.providers.openai.baseUrl custom endpoint), ensureRuntimePluginForModelSelection returns { required: false, installed: false }; this new check treats that legitimate “not required” result as an install failure and returns before the live Codex test. A user with a custom OpenAI-compatible provider config who explicitly selects the detected Codex CLI will now see a misleading plugin-install failure instead of exercising the candidate; gate this on ensured.required && !ensured.installed or ensure against the Codex test plan instead.

Useful? React with 👍 / 👎.

@clawsweeper

clawsweeper Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed July 9, 2026, 7:20 PM ET / 23:20 UTC.

Summary
The PR hardens macOS AI onboarding by staging Codex runtime/plugin setup, adding harness-owned auth bootstrap, improving setup error details, gating Crestodian, refreshing settings state, updating docs, packaging helpers, and regression tests.

PR surface: Source +186, Tests +772, Docs +31, Other +1113. Total +2102 across 41 files.

Reproducibility: yes. The linked issue provides fresh macOS VM steps, and current-main source still runs the Codex live setup test before ensuring the runtime plugin; I did not rerun the Parallels flow in this read-only review.

Review metrics: 2 noteworthy metrics.

  • Plugin API surface: 1 optional harness property added. The new authBootstrap marker changes whether core or a plugin harness performs credential bootstrap.
  • Setup persistence surfaces: 1 runtime pin and 1 plugin install/enablement path changed. Fresh Codex onboarding now stages and persists runtime/plugin state, which matters for upgrade and provider-routing review.

Stored data model
Persistent data-model change detected: serialized state: apps/macos/Tests/OpenClawIPCTests/OnboardingAISetupTests.swift, serialized state: scripts/e2e/parallels/package-artifact.ts, vector/embedding metadata: src/plugins/active-runtime-registry.test.ts, vector/embedding metadata: test/e2e/qa-lab/runtime/package-openclaw-for-docker.e2e.test.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #102614
Summary: This PR is the candidate fix for the canonical fresh macOS Codex onboarding bug; related macOS Gateway onboarding work is adjacent context, not the same remaining root cause.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🦐 gold shrimp
Proof: 🦞 diamond lobster
Patch quality: 🦐 gold shrimp
Result: needs maintainer review before merge.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Exclude decode/protocol errors from activation reconciliation and add focused coverage for that case.
  • Refresh the branch against current main and rerun exact-head macOS/Codex onboarding proof before landing.

Risk before merge

  • [P1] A malformed or version-skewed successful activation response can still enter the 150s/480s reconciliation loop instead of failing promptly or trying the next candidate.
  • [P1] The PR changes provider auth/bootstrap ownership and success-gated Codex runtime/plugin config persistence, which can affect existing provider routing and upgrade behavior even with green checks.
  • [P1] The branch is mergeable but behind the current base, so maintainers should refresh and proof the final merge head before landing.

Maintainer options:

  1. Fix decode handling and refresh proof (recommended)
    Exclude decode/protocol errors from transport-drop reconciliation, refresh the branch, and rerun exact-head macOS/Codex onboarding proof before merge.
  2. Accept the auth boundary
    Maintainers can intentionally accept that the Codex harness owns auth bootstrap and that successful setup persists model-scoped Codex runtime state.
  3. Pause or split the branch
    If the plugin API direction is not ready, pause this PR or split the generic harness contract from the onboarding bug fix.

Next step before merge

  • [P2] The remaining code defect is concrete, but the protected maintainer label and auth-provider compatibility decision should be resolved by the author/maintainer before merge automation.

Maintainer decision needed

  • Question: After the decode/protocol-error bug is fixed, should OpenClaw accept the additive Codex harness auth-bootstrap contract and success-gated Codex runtime/plugin config writes as the permanent fix for fresh macOS Codex onboarding?
  • Rationale: The central bug fix is in the right owner boundary, but auth bootstrap ownership and setup persistence are compatibility-sensitive provider/plugin decisions that automation should not finalize alone.
  • Likely owner: steipete — They authored the relevant macOS onboarding history, this PR's Codex/auth repair commits, and are assigned to the PR.
  • Options:
    • Fix, refresh, then land (recommended): Exclude decode/protocol errors from reconciliation, update against current main, rerun exact-head macOS/Codex onboarding proof, and land if maintainers accept the auth-provider compatibility change.
    • Split the API seam: Separate the generic authBootstrap plugin API decision from the macOS onboarding repair if maintainers want a narrower emergency fix.
    • Pause this direction: Keep the linked issue open and pause the branch until maintainers decide the permanent Codex harness auth boundary.

Security
Cleared: No concrete security or supply-chain regression was found; the auth-routing changes are compatibility-sensitive, but the diff keeps install policy gates, error redaction, and package ignore-scripts checks.

Review findings

  • [P2] Exclude decode errors from activation reconciliation — apps/macos/Sources/OpenClaw/OnboardingAISetup.swift:305-306
Review details

Best possible solution:

Fix the decode/protocol-error reconciliation path, refresh against current main, then land this as the linked macOS Codex onboarding fix if maintainers accept the additive harness auth-bootstrap contract and success-gated Codex setup persistence.

Do we have a high-confidence way to reproduce the issue?

Yes. The linked issue provides fresh macOS VM steps, and current-main source still runs the Codex live setup test before ensuring the runtime plugin; I did not rerun the Parallels flow in this read-only review.

Is this the best way to solve the issue?

No as currently submitted. The owner-boundary direction is acceptable, but the decode/protocol-error reconciliation bug must be fixed and maintainers must accept the auth/provider compatibility change before this is the best landable fix.

Full review comments:

  • [P2] Exclude decode errors from activation reconciliation — apps/macos/Sources/OpenClaw/OnboardingAISetup.swift:305-306
    This prior blocker is still present on the latest head. JSONDecoder().decode(ActivateResult.self, from: data) failures happen after the gateway has already returned a response, but activationMayStillBeRunning excludes only structured gateway/auth/TLS errors, so a malformed or version-skewed successful response can poll until the 150s/480s reconciliation deadline instead of surfacing the protocol error or trying the next candidate.
    Confidence: 0.9

Overall correctness: patch is incorrect
Overall confidence: 0.88

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 50cb0d66b8e6.

Label changes

Label justifications:

  • P0: The linked bug blocks first-time macOS AI onboarding for users with a valid logged-in Codex CLI and no direct OpenAI API key exposed to OpenClaw.
  • merge-risk: 🚨 compatibility: The PR adds a plugin harness API contract and changes onboarding persistence of runtime/plugin state, which can affect upgrades and existing configuration behavior.
  • merge-risk: 🚨 auth-provider: The PR moves Codex setup probing onto harness-owned auth bootstrap and forwarded/native credentials, directly affecting provider credential routing.
  • merge-risk: 🚨 availability: The current patch can keep setup activation in a long reconciliation loop for decode/protocol failures instead of failing promptly.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (live_output): The PR body provides after-fix signed macOS VM proof for Codex onboarding, copied setup errors, Crestodian gating, persisted config, relaunch chat, Testbox checks, focused regressions, Swift tests, and package build evidence.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides after-fix signed macOS VM proof for Codex onboarding, copied setup errors, Crestodian gating, persisted config, relaunch chat, Testbox checks, focused regressions, Swift tests, and package build evidence.
Evidence reviewed

PR surface:

Source +186, Tests +772, Docs +31, Other +1113. Total +2102 across 41 files.

View PR surface stats
Area Files Added Removed Net
Source 7 217 31 +186
Tests 9 788 16 +772
Docs 5 34 3 +31
Config 0 0 0 0
Generated 0 0 0 0
Other 20 1412 299 +1113
Total 41 2451 349 +2102

What I checked:

  • Root and scoped policy read: Read root AGENTS.md plus scoped guidance for extensions, agents, plugins, docs, scripts, and tests; applied the Codex dependency-inspection gate and compatibility-sensitive auth/provider review policy. (AGENTS.md:13, 50cb0d66b8e6)
  • Current main still has the linked bug shape: Current main runs the setup live test before ensuring/enabling the Codex runtime plugin, matching the reported fresh-install failure where the plugin is absent before the Codex probe. (src/crestodian/setup-inference.ts:605, 50cb0d66b8e6)
  • PR stages Codex before the live probe: The PR applies the Codex runtime pin, enables the Codex plugin, ensures the runtime plugin, records managed install metadata, then feeds the staged config into the live setup test before success-gated persistence. (src/crestodian/setup-inference.ts:628, c6260953903e)
  • Prior blocker remains on the latest head: The latest head still treats any error except structured gateway/auth/TLS errors as possibly running, so JSON decode/protocol errors after a completed response can enter the 150s/480s reconciliation loop. (apps/macos/Sources/OpenClaw/OnboardingAISetup.swift:305, c6260953903e)
  • Codex CLI API-key login contract checked: At openai/codex 0d18d4f7535d93ce7fd0ffa9ca69937321352688, codex login --with-api-key reads the API key from stdin and dispatches to API-key login. (codex-rs/cli/src/main.rs:1350, 0d18d4f7535d)
  • Codex app-server auth contract checked: Codex auth loading falls back to the configured persistent store, and app-server constructs its AuthManager with API-key environment loading disabled, supporting the PR's native/persistent credential path. (codex-rs/login/src/auth/manager.rs:1215, 0d18d4f7535d)

Likely related people:

  • steipete: Recent history shows Peter Steinberger authored the macOS AI verification path, the local Gateway onboarding work, and the current Codex onboarding/auth hardening branch. (role: recent area contributor; confidence: high; commits: 2bc50d0656bd, 6a7b62889e8c, a6d1543413d2; files: apps/macos/Sources/OpenClaw/OnboardingAISetup.swift, src/crestodian/setup-inference.ts, extensions/codex/harness.ts)
  • Vincent Koc: Prior merged work touched agent harness helper types and OpenAI/Codex provider identity surfaces that this PR now extends with an auth-bootstrap capability. (role: adjacent owner; confidence: medium; commits: bfffc77bfc86, cbf6f0001bc0; files: src/agents/harness/types.ts, src/agents/openai-routing.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (15 earlier review cycles; latest 8 shown)
  • reviewed 2026-07-09T16:37:35.479Z sha 3faa6c7 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-09T16:44:46.416Z sha 3faa6c7 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-09T17:12:32.275Z sha 1b49fdd :: found issues before merge. :: [P2] Keep real PTY backend tests serial
  • reviewed 2026-07-09T19:46:27.554Z sha 7ee156f :: needs maintainer review before merge. :: none
  • reviewed 2026-07-09T19:59:13.271Z sha 7ee156f :: needs maintainer review before merge. :: none
  • reviewed 2026-07-09T20:44:38.432Z sha 754a7d7 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-09T21:13:21.238Z sha d1dc07c :: found issues before merge. :: [P2] Exclude decode errors from activation reconciliation
  • reviewed 2026-07-09T21:22:37.323Z sha 895ef9b :: found issues before merge. :: [P2] Exclude decode errors from activation reconciliation

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. labels Jul 9, 2026
@openclaw-barnacle openclaw-barnacle Bot added app: macos App: macos size: L and removed size: M labels Jul 9, 2026
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation commands Command implementations agents Agent runtime and tooling extensions: codex size: XL and removed size: L labels Jul 9, 2026
@steipete steipete changed the title fix: macOS onboarding accepts logged-in Codex CLI fix(macos): harden fresh AI onboarding Jul 9, 2026
@steipete steipete self-assigned this Jul 9, 2026
@clawsweeper clawsweeper Bot added the merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. label Jul 9, 2026
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Jul 9, 2026
@openclaw-barnacle openclaw-barnacle Bot added the docker Docker and sandbox tooling label Jul 9, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c626095390

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

}

func handleConnectionModeChange(updatePageMonitoring: ((Int) -> Void)? = nil) {
self.resetGatewayBoundAIState()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Send users back through AI setup after route reset

When connectionMode changes after the user has already advanced past the AI page (for example from an external config save or route change while they are on Permissions/Ready), this reset clears aiSetup.connected but reconcilePageForModeChange can keep the current later page if it still exists in the new pageOrder. Since canAdvance only blocks while the active page is the AI page, the user can click Next/Finish without retesting inference against the new gateway; force the cursor back to the AI page or make the gate position-based after resetting route-bound AI state.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: babcd5f850

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

private func resetRemoteProbeFeedback() {
self.remoteProbeState = .idle
self.remoteAuthIssue = nil
self.resetGatewayBoundAIState()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restart AI setup after remote route edits

When a remote-route field such as URL, token, identity, or transport changes via config sync while the user is already on the AI page, this reset clears aiSetup.started and returns the model to .idle, but this path never calls updateMonitoring/maybeStartAISetup like the connection-mode reset does. The page then stays in the “Looking for AI…” state without dispatching a new crestodian.setup.detect until the user navigates away and back; route this reset through the same monitoring restart path or explicitly restart AI setup when the active page is the AI page.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0981a9659a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +237 to +242
static func activationIsPersisted(
expectedModel: String,
setupComplete: Bool,
configuredModel: String?) -> Bool
{
setupComplete && configuredModel == expectedModel

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Require activation proof before reconciliation

When the selected candidate's model is already present in config (for example the existing-model candidate, or Codex selecting the same openai/gpt-5.5 default), a timed-out or dropped crestodian.setup.activate request can enter the reconciliation path and this predicate returns true solely from the pre-existing configuredModel/setupComplete reported by crestodian.setup.detect (those are derived from current config in src/crestodian/setup-inference.ts:200 and :214). That lets onboarding mark AI as connected without proving the live completion succeeded, and for Codex can also skip proving the runtime pin/install reached the final persisted state.

Useful? React with 👍 / 👎.

@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof for exact head f6f742d398285f216a104df644ad099b27615319:

  • Native review artifacts validated with no findings; fresh structured autoreview reported no accepted/actionable findings.
  • Focused TypeScript inference/runtime coverage: 32/32 passed across onboard-inference, Codex runtime installation, and setup-inference shards.
  • Focused macOS launch/onboarding/Settings/Gateway/Crestodian coverage: 67/67 passed.
  • Oxfmt, SwiftFormat, native i18n (2795 entries, no drift), and git diff --check passed.
  • Exact-head CI run 29067669395 passed. This includes production/test types, build artifacts, native i18n, all Node shards, and the repaired real macos-swift suite (job 86282647112).
  • OPENCLAW_TESTBOX=1 scripts/pr prepare-run 102637 passed with prep_head_sha and pr_head_sha both equal to the exact head above.
  • Earlier Developer ID-signed Parallels proof at cf04edb completed native Codex onboarding with no app/Gateway API-key environment, exposed Crestodian only after the real turn, and returned successful app chat before and after relaunch. The final-head route/owner/CI fixes are covered by the exact-head suites above.

Known proof gaps: none for the changed behavior. Release-note text is in the PR body; the landing gate reports repository changelog not required for this changed-file set.

@steipete
steipete merged commit a789b92 into main Jul 10, 2026
108 checks passed
@steipete
steipete deleted the codex/fix-codex-onboarding-plugin-bootstrap branch July 10, 2026 03:59
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f6f742d398

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

...strippedCurrent,
plugins: {
...strippedCurrent.plugins,
installs: { codex: pendingCodexInstall },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve existing pending plugin installs

When current.plugins.installs already contains another pending install record (for example, a provider/channel install that has not yet been committed into the installed-plugin index), this transform strips all pending records and then writes an installs map containing only Codex. Since transformConfigWithPendingPluginInstalls can only migrate records that remain in nextConfig, the other plugin's ownership record is silently dropped, leaving its enabled config without install metadata after this setup path; merge the Codex record with existing pending installs instead of replacing the map.

Useful? React with 👍 / 👎.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 10, 2026
* fix(macos): bootstrap Codex before onboarding test

* fix(plugins): activate deferred runtimes on demand

* fix(macos): stage Codex runtime for onboarding probe

* fix(macos): expose sanitized onboarding errors

* fix(codex): reuse native CLI auth during onboarding

* fix(macos): hide Crestodian without inference

* fix(codex): honor explicit runtime policy during setup

* fix(onboarding): redact verification errors

* fix(macos): reset onboarding state with gateway route

* fix(onboarding): persist Codex plugin install metadata

* chore: refresh onboarding inventories

* fix(macos): restart AI setup after gateway change

* chore: refresh native onboarding inventory

* fix(onboarding): defer gateway restart until setup persists

* fix(macos): reset Crestodian on gateway changes

* chore(macos): refresh native i18n inventory

* fix(onboarding): harden inference setup state

* docs(skills): reuse pristine Parallels snapshots

* chore(macos): refresh onboarding i18n inventory

* fix(onboarding): prevent stale gateway and install state

* docs(skills): preserve saved Parallels sessions

* fix(macos): balance AI onboarding layout

* fix(parallels): parse npm workspace pack output

* chore(macos): refresh onboarding i18n inventory

* fix(parallels): bundle workspace runtime in package artifact

* fix(parallels): isolate canonical package helper

* fix(parallels): pack self-contained workspace artifact

* fix(packaging): exclude macOS app bundle

* fix(macos): restart inference checks after route changes

* docs(changelog): defer onboarding note to release

* fix(onboarding): enforce inference-first gateway setup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: macos App: macos commands Command implementations docker Docker and sandbox tooling docs Improvements or additions to documentation extensions: codex maintainer Maintainer-authored PR merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant