Skip to content

fix(installer): macOS onboarding cannot install plugins after the shell installer - #200247

Merged
RomneyDa merged 6 commits into
mainfrom
openclaw/grand-lobster-2
Nov 16, 2026
Merged

RomneyDa merged 6 commits into
mainfrom
openclaw/grand-lobster-2

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #200244

Adopts @miguelbranco80’s installer fix from #200257 unchanged (source commit da4fc50). This replaces the previous npm-call-site workaround entirely.

What Problem This Solves

Fixes: first-run macOS onboarding reports Install failed: Codex after installation with curl -fsSL https://openclaw.ai/install.sh | bash.

User Impact

Users can install plugins without leaving installer-launched onboarding. Installer-driven Doctor and plugin updates receive the same terminal handoff fix. Linux and Windows behavior is unchanged; no settings or migration are required.

Why This Change Was Made

Pass the controlling terminal’s concrete device, such as /dev/ttys003, instead of the /dev/tty alias that stops working in detached macOS children. Resolve it with ps -o tty= and retain /dev/tty as the fallback. Fixing the installer handoff covers its detached helpers without changing the shared process runner or adding npm-specific workarounds.

Evidence

  • Exact patch: only scripts/install.sh and test/scripts/install-sh.test.ts differ from the prepared base. Both files are byte-identical to da4fc50; the source and adopted diffs have the same stable patch ID.
  • macOS proof supplied by @miguelbranco80 in fix(installer): macOS onboarding cannot install plugins after the shell installer #200257: macOS 26.6.2 arm64, Node 24.22.1, installed OpenClaw 2026.11.4, piped installer-style shell and throwaway state. The old /dev/tty handoff failed in Node PlatformInit; the new concrete-device handoff completed with Installed plugin: codex. These are Miguel’s runs, not a new macOS run by RoboClaw.
  • Linux validation here: installer tests: 232 passed, one Darwin-only test skipped (12.20 s Vitest duration). Targeted test typecheck, lint, formatting, bash -n, and git diff --check pass.
  • Review: Miguel reports a clean P0–P2 autoreview of the source patch before its patch-identical rebase. The adopted code is unchanged. An additional local Auto Review against 6a6007663b36db8badd6967e7f2bed5c6b3a724e found no P0 findings.

Reported and reproduced by @miguelbranco80 in #200244.

Work sessions

Linked for team reference; these sessions aren’t public.

Worked on by

roboclaw-bot and others added 3 commits November 16, 2026 20:09
Co-authored-by: miguelbranco80 <[email protected]>
Worked on by:
- @miguelbranco80

Co-authored-by: miguelbranco80 <[email protected]>
OpenClaw-Publication: c311b760-0bbf-4f8c-b2a1-1ab476a3bd0a
@clawsweeper

clawsweeper Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@roboclaw-bot
roboclaw-bot marked this pull request as ready for review November 16, 2026 20:18
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 16, 2026
@clawsweeper

clawsweeper Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

The installer passes the concrete terminal device to OpenClaw instead of the /dev/tty alias for interactive onboarding and upgrade commands.

Example: Install @openclaw/[email protected] after a piped installer handoff on macOS 26.6.2 with Node 24.22.1.

  • Before: The detached npm child inherits /dev/tty and aborts during Node initialization.
  • After: Miguel’s linked run uses /dev/ttys007 and reports Installed plugin: codex.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The production repair is focused and source-consistent, with meaningful real CLI evidence; upgrade proof remains incomplete and the added tests do not cover the reported failure.
Proof confidence 🦪 silver shellfish (2/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A macOS user installing through the shell installer cannot complete the selected Codex onboarding route because plugin installation aborts.
Reason: This maintainer-authored repair restores intended onboarding behavior through the existing installer boundary without adding settings, APIs, or process-runner policy.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR addresses a confirmed stable-release onboarding failure with a focused installer fix; no introduced correctness defect was found.

Priority: P0
Reviewed head: fc0904a842d5ff46708cd848f8b1460ef9cdf67e

Before merge

None.

Findings

None.

Tests

  • Low-value test test/scripts/install-sh.test.ts: Remove the added ps-stub helper table and replace the updated source-pattern assertion with behavior coverage: these pin the resolver implementation without exercising the terminal handoff into a detached child.
  • Missing end-to-end proof: Provide redacted terminal output of a latest-stable macOS installer upgrade completing Doctor and plugin updates with existing settings intact; a native base-failing/head-passing regression is also not demonstrated.
Agent review details

How this fits together

The shell installer prepares stdin for onboarding, Doctor, and plugin updates; plugin installation reaches npm through the shared process runner, which detaches children while inheriting stdin.

flowchart TD
  A[Piped shell installer] --> B[Terminal device resolver]
  B --> C[Onboarding or upgrade commands]
  C --> D[Plugin installation]
  D --> E[Shared process runner]
  E --> F[Detached npm child]
Loading

Technical review

Best possible solution:

Keep terminal-device selection in the existing installer owner so onboarding can install plugins without requiring users to leave the wizard for terminal recovery.

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

The linked report supplies a controlled native macOS reproduction and the current-main descriptor inheritance matches it; this read-only review ran no product code.

Is this the best way to solve the issue?

The patch fixes the descriptor producer once, preserves interactive input and process-tree cleanup, and replaces the earlier npm-call-site workaround with the smallest complete production change.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 6a6007663b36.

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 504f0df adds scripts/install.sh:93 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 504f0dfa36be; files: scripts/install.sh)
  • Sebastien Tardif: Raw commit 1fa1507 adds scripts/install.sh:147 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 1fa1507fc4f9; files: scripts/install.sh)

PR surface

Tests +17, Other +13. Total +30 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 19 2 +17
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 17 4 +13
Total 2 36 6 +30

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #200244
Summary: The issue and both repair submissions concern detached macOS npm children inheriting the installer’s /dev/tty descriptor.

Members:

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

Labels

Label changes:

  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🦪 silver shellfish, so this older rating label is no longer current.

Label justifications:

  • P0: The first-run UX override applies: the selected Codex setup route fails inside onboarding, and recovery requires exiting the wizard and entering a terminal command.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-16T20:34:54.840Z sha 7791a76 :: needs maintainer review before merge. :: none

Reviewed November 16, 2026, 4:40 PM ET / 21:40 UTC (Revision 2).

Co-authored-by: miguelbranco80 <[email protected]>
roboclaw-bot and others added 2 commits November 16, 2026 21:21
Co-authored-by: miguelbranco80 <[email protected]>
Worked on by:
- @miguelbranco80

Co-authored-by: miguelbranco80 <[email protected]>
OpenClaw-Publication: b98ca81b-3dda-406e-9c71-3889e4ed9b60
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: XS and removed size: S labels Nov 16, 2026
@roboclaw-bot roboclaw-bot changed the title fix(onboarding): prevent macOS npm crashes after shell installation fix(installer): macOS onboarding cannot install plugins after the shell installer Nov 16, 2026
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Nov 16, 2026
@RomneyDa
RomneyDa enabled auto-merge (squash) November 16, 2026 21:51
@RomneyDa
RomneyDa disabled auto-merge November 16, 2026 21:59
@RomneyDa
RomneyDa merged commit 2540155 into main Nov 16, 2026
119 of 120 checks passed
@RomneyDa
RomneyDa deleted the openclaw/grand-lobster-2 branch November 16, 2026 21:59
@RomneyDa

Copy link
Copy Markdown
Member

Merged via squash auto-merge.

RomneyDa added a commit that referenced this pull request Nov 16, 2026
Backport the exact reviewed installer repair explicitly required by Dallin for 2026.11.5. Resolve the controlling terminal device before handing stdin to OpenClaw so detached macOS Node children do not inherit the /dev/tty alias. Noninteractive behavior is unchanged.

Applies cleanly to all four existing candidate call sites. No companion required: ps and tr are existing host tools and the fallback preserves prior behavior. No later same-path follow-up exists at the selected canonical cut.

Proof: 229 installer tests pass, one platform skip; Bash syntax and diff checks pass. Canonical macOS and installer platform evidence was reviewed. No new local reviewer; existing exact canonical hosted review is retained. Fresh full candidate qualification is required.

(cherry picked from commit 2540155)

Co-authored-by: miguelbranco80 <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
RomneyDa added a commit that referenced this pull request Nov 16, 2026
Backport #200063, #200208, #200247, #200260 and #190065 to 2026.10.33. Preserve canonical source credit and maintenance-branch contracts.

All selected exact-head checks passed except the inherited Docker plugin API mismatch; aggregate ci-gate reports that same cause. Landing authorized with this attributed pre-existing failure.

Co-authored-by: Ayaan Zaidi <[email protected]>
Co-authored-by: miguelbranco80 <[email protected]>
Co-authored-by: Shakker <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 17, 2026
…ll installer (openclaw#200247)

* Save workspace before refreshing its selected base

Co-authored-by: miguelbranco80 <[email protected]>

* fix(onboarding): prevent macOS npm crashes after shell installation

Worked on by:
- @miguelbranco80

Co-authored-by: miguelbranco80 <[email protected]>
OpenClaw-Publication: c311b760-0bbf-4f8c-b2a1-1ab476a3bd0a

* Publish openclaw/grand-lobster-2

Worked on by:
- @miguelbranco80

Co-authored-by: miguelbranco80 <[email protected]>
OpenClaw-Publication: b98ca81b-3dda-406e-9c71-3889e4ed9b60

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: miguelbranco80 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. scripts Repository scripts size: XS 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.

[Bug]: OpenClaw macOS onboarding crashes when detached npm inherits /dev/tty

2 participants