Skip to content

fix(macos): allow cold ChatGPT Codex probes - #130541

Closed
Patrick-Erichsen wants to merge 1 commit into
mainfrom
pe/macos-onboarding-codex-probe
Closed

Patrick-Erichsen wants to merge 1 commit into
mainfrom
pe/macos-onboarding-codex-probe

Conversation

@Patrick-Erichsen

@Patrick-Erichsen Patrick-Erichsen commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Give known macOS ChatGPT/Codex app-bundle binaries a 3-second --version probe budget so a cold signed binary is detected during the first onboarding pass. Generic PATH discovery, other tools, and non-macOS probes keep the existing 1.5-second budget.

This is the bottom layer of the macOS onboarding/prewarm stack and replaces #128819. The commit preserves Hannes Rudolph's authorship.

Stack

  1. fix(macos): allow cold ChatGPT Codex probes #130541 — Codex cold-start probe (this PR)
  2. fix(macos): keep Gateway profile Keychain reads noninteractive #130542 — noninteractive Gateway-profile Keychain access
  3. feat(macos): bundle an exact prewarmed core runtime #130543 — exact prewarmed core runtime
  4. feat(macos): cache exact plugins for prewarmed builds #130544 — exact prewarmed official-plugin cache

Evidence

  • Mac Studio focused Vitest validation passed as part of the exact stacked head.
  • Prior clean Parallels proof measured the first bundled Codex launch at 1.53s and the warm launch at 0.01s, directly crossing the generic 1.5-second budget.
  • The original PR's exact-head first-pass detection proof remains linked in fix(macos): allow cold ChatGPT Codex probes #128819.

Draft status

Draft while the complete stack finishes packaged-app acceptance in the dedicated Mac Studio Parallels guest.

@clawsweeper

clawsweeper Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added commands Command implementations size: S maintainer Maintainer-authored PR labels Aug 27, 2026
@Patrick-Erichsen Patrick-Erichsen changed the title pe/macos onboarding codex probe fix(macos): allow cold ChatGPT Codex probes Aug 27, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 27, 2026
@clawsweeper

clawsweeper Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 8:55 PM ET / August 27, 2026, 00:55 UTC.

ClawSweeper review

What this changes

This PR gives known macOS ChatGPT/Codex application-bundle binaries a three-second version-probe budget while retaining the generic 1.5-second probe budget elsewhere.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep open. The targeted repair is source-sound, but this draft has a protected maintainer label, lacks direct Codex-source contract inspection in this environment, and overlaps an open predecessor PR that needs an explicit canonical-PR decision.

Priority: P2
Reviewed head: 8b90f279770817ede1ecfe675233f1930a8469e5
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is focused and regression-covered, with merge readiness limited by the remaining Codex contract and packaged-macOS evidence rather than a concrete code defect.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body also links prior real macOS evidence, but final packaged-macOS acceptance is still pending by the author’s draft note.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body also links prior real macOS evidence, but final packaged-macOS acceptance is still pending by the author’s draft note.
Evidence reviewed 7 items Changed owner boundary: The PR changes only the known macOS app-bundle probe to pass a 3,000 ms timeout; PATH and non-macOS discovery retain the shared default path.
Current-main behavior: Current main calls the app-bundle probe without options, while the shared probe resolves that omission to a 1,500 ms timeout.
Regression coverage: The added case treats the known app executable as timed out unless it receives 3,000 ms, so it would omit the candidate on pre-fix behavior and retain a logged-in Codex candidate after the change.
Findings None None.
Security None None.

Live Verification

Command: pnpm openclaw onboard --help

Result: PASS (completed)

$ node scripts/run-node.mjs onboard --help
[openclaw] Building TypeScript (dist is stale: missing_build_stamp - build stamp missing).
[openclaw] Building bundled plugin assets.
[canvas] build: node scripts/bundle-a2ui.mjs
[log] ‹DIR›/a2ui.bundle.js  chunk │ size: 399.96 kB
[log] ‹DIR›/a2ui-v0.9.bundle.js  chunk │ size: 615.66 kB
[log]
[success] rolldown v1.2.0 Finished in 88.66 ms
[diffs] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts curated
[diffs-language-pack] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts full
[discord] build: node --import tsx ../../scripts/build-discord-activity-sdk.mts
[tsdown-build] invocation 1/2 finished in 0.5s
node_modules/playwright-core/lib/coreBundle.js (65821:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65821:29 ]
       │
 65821 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

node_modules/playwright-core/lib/coreBundle.js (65828:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65828:29 ]
       │
 65828 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

node_modules/web-tree-sitter/web-tree-sitter.js (2343:30) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2343:31 ]
      │
 2343 │           ASM_CONSTS[start] = eval(func);
      │                               ──┬─
      │                                 ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

node_modules/web-tree-sitter/web-tree-sitter.js (2366:32) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2366:33 ]
      │
 2366 │           moduleExports[name] = eval(func);
      │                                 ──┬─
      │                                   ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

[tsdown-build] invocation 2/2 finished in 11.4s
[plugin-control-plane-loads] verified 36 built modules with native require and checked doctor closures
runtime-postbuild: 11 phases completed in 2726ms (slowest: built plugin control-plane loads 2249ms)

OpenClaw 2026.8.1 (8b90f27) — All your chats, one OpenClaw.

Usage: openclaw onboard [options] [command]

Guided setup for auth, models, Gateway, workspace, channels, and skills

Options:
  --accept-risk                            Acknowledge that agents are powerful and full system access is risky (required for --non-interactive) (default:
                                           false)
  --agent-name ‹name›                      Name for the first agent (default: main)
  --ai-gateway-api-key ‹key›               Vercel AI Gateway API key
  --alibaba-model-studio-api-key ‹key›     Alibaba Model Studio API 
… output truncated …

Assertions:

  • PASS expect_output: onboard

How this fits together

Onboarding probes locally available AI command-line tools and feeds detected, authenticated candidates into setup selection. This change affects only the known macOS app-bundle Codex candidate before its login-status classification reaches the onboarding ladder.

flowchart LR
  A[Onboarding] --> B[Local CLI discovery]
  B --> C[Known macOS Codex app bundle]
  C --> D[Bounded version probe]
  D --> E[Login-status classification]
  E --> F[Setup candidate selection]
Loading

Decision needed

Question Recommendation
Should this stacked draft remain the canonical cold-probe PR, with #128819 retired only after equivalent proof is attached here? Keep the stacked PR canonical: Retain this PR as the base for its dependent stack, attach the required contract and packaged-macOS proof here, then resolve the older duplicate deliberately.

Why: Both open PRs implement the same narrow behavior, while this PR is the stated base of a newer stack and the older PR currently carries the stronger proof record.

Before merge

  • Resolve merge risk (P1) - A present but stalled known app-bundle executable can now delay onboarding by up to an additional 1.5 seconds; the direct Codex CLI contract check and packaged macOS trace were unavailable to this review.
  • Resolve merge risk (P1) - This draft explicitly replaces the still-open fix(macos): allow cold ChatGPT Codex probes #128819, which has the same central fix and stronger recorded runtime evidence; retaining both without a canonical decision risks duplicate review and landing work.
Agent review details

Security

None.

PR surface

Source +6, Tests +35. Total +41 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 7 1 +6
Tests 1 39 4 +35
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 46 5 +41

Review metrics

Metric Value Why it matters
Production versus test LOC production +7/-1; tests +39/-4 The small production increase is the named app-bundle timeout boundary; the added tests cover the timeout forwarding and cold-start candidate outcome.

Merge-risk options

Maintainer options:

  1. Complete bounded startup proof (recommended)
    Before marking ready, inspect the direct Codex command contract and attach a redacted packaged-macOS cold-start trace showing first-pass detection within the new bound.
  2. Keep the generic timeout
    Pause this PR if maintainers do not accept the extra bounded wait for a stalled known app-bundle executable during onboarding.

Technical review

Best possible solution:

Keep the per-known-app three-second budget, record direct Codex --version and login status contract inspection plus a redacted cold-start packaged-macOS trace, then retain one canonical PR for the stacked work.

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

Yes at source level: current main applies the shared 1.5-second probe to the discovered app binary, and the added regression case demonstrates that this path drops the candidate unless it receives the 3-second exception. A fresh packaged-macOS run was not available in this read-only environment.

Is this the best way to solve the issue?

Yes, provisionally: specializing the timeout at the known app-bundle discovery owner preserves the generic probe contract rather than widening every local-tool probe. Direct Codex contract inspection and packaged-app evidence remain required before merge readiness.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 35adcc6c6f3b.

Labels

Label changes:

  • add P2: This fixes a bounded first-pass onboarding detection failure for macOS users without an emergency availability or data-loss signal.
  • add merge-risk: 🚨 availability: The change intentionally extends a local executable probe from 1.5 to 3 seconds for known app bundles, increasing bounded onboarding wait time when that executable stalls.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body also links prior real macOS evidence, but final packaged-macOS acceptance is still pending by the author’s draft note.

Label justifications:

  • P2: This fixes a bounded first-pass onboarding detection failure for macOS users without an emergency availability or data-loss signal.
  • merge-risk: 🚨 availability: The change intentionally extends a local executable probe from 1.5 to 3 seconds for known app bundles, increasing bounded onboarding wait time when that executable stalls.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body also links prior real macOS evidence, but final packaged-macOS acceptance is still pending by the author’s draft note.

Evidence

What I checked:

  • Changed owner boundary: The PR changes only the known macOS app-bundle probe to pass a 3,000 ms timeout; PATH and non-macOS discovery retain the shared default path. (src/commands/onboard-inference.ts:206, 8b90f2797708)
  • Current-main behavior: Current main calls the app-bundle probe without options, while the shared probe resolves that omission to a 1,500 ms timeout. (src/commands/onboard-inference.ts:202, 35adcc6c6f3b)
  • Regression coverage: The added case treats the known app executable as timed out unless it receives 3,000 ms, so it would omit the candidate on pre-fix behavior and retain a logged-in Codex candidate after the change. (src/commands/onboard-inference.test.ts:511, 8b90f2797708)
  • Caller and sibling boundary: Inference detection invokes the native Codex-app probe alongside Claude and Gemini; the shared probe retains bounded output, process-tree termination, and timeout handling. (src/commands/onboard-inference.ts:276, 8b90f2797708)
  • History provenance: Current-main blame attributes the macOS app-bundle discovery loop and its generic probe call to the recent onboarding commit, identifying Peter Steinberger as the central current-main area contributor. (src/commands/onboard-inference.ts:202, b10beeee7c24)
  • Release and main status: The latest supplied release commit is dated 2026-07-18, before this 2026-08-26 patch; current main also does not contain the PR commit, so the behavior is neither released nor implemented on main. (src/commands/onboard-inference.ts:202, 0790d9f593ad)

Likely related people:

  • Peter Steinberger: Introduced the current-main macOS app-bundle discovery loop whose generic timeout this PR specializes. (role: recent area contributor; confidence: high; commits: b10beeee7c24; files: src/commands/onboard-inference.ts, src/system-agent/probes.ts)
  • Hannes Rudolph: Authored the preserved cold-probe patch and the linked earlier PR carrying the same focused behavior. (role: original patch author; confidence: medium; commits: 8b90f2797708, 703aca2086a5; files: src/commands/onboard-inference.ts, src/commands/onboard-inference.test.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Record direct Codex CLI source inspection for the invoked --version and login status commands.
  • Attach a redacted cold-start packaged-macOS trace before taking the PR out of draft.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • 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.

@Patrick-Erichsen

Copy link
Copy Markdown
Contributor Author

Superseded by #128819, which landed the exact same patch on main as 1fd1d3c.

Verified before closing:

  • fix(macos): allow cold ChatGPT Codex probes #128819 merged at 2026-08-27 02:43 UTC.
  • Source commit 8b90f279770817ede1ecfe675233f1930a8469e5 and landed commit 1fd1d3ccb975e91c79265a093c5a638084ae217d have the same stable patch ID: 95fde247551aff3e7eb005911009b6b58d44044c.
  • The two touched files have no content diff between those commits.
  • Current upstream Codex still defines --version through Clap and routes codex login status to the status implementation consumed by this probe.

Closing this duplicate; the cold-probe behavior is already present on main.

@RomneyDa
RomneyDa deleted the pe/macos-onboarding-codex-probe branch November 30, 2026 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations maintainer Maintainer-authored PR merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants