macOS: honor stable Nix defaults suite#12205
Merged
Conversation
Fixes repeated onboarding in Nix deployments by detecting nixMode from the stable defaults suite (ai.openclaw.mac) and bridging key settings into the current defaults domain. Also enables LaunchAgent autostart by default in Nix mode (escape hatch: openclaw.nixAutoLaunchAtLogin=false).
Drop the automatic launch-at-login behavior from the Nix defaults patch; keep this PR scoped to reliable nixMode detection + defaults bridging.
Comment on lines
18
to
21
| static func applyIfNeeded() { | ||
| guard ProcessInfo.processInfo.isNixMode else { return } | ||
| guard let nixSuite = UserDefaults(suiteName: nixDefaultsSuiteName) else { return } | ||
|
|
Contributor
There was a problem hiding this comment.
Nix mode check can recurse
NixDefaultsBridge.applyIfNeeded() calls ProcessInfo.processInfo.isNixMode, but isNixMode now consults the stable nixDefaultsSuiteName (via resolveNixMode). That means when Nix mode is only enabled in the stable suite, isNixMode becomes true (because the stable suite says so), and then applyIfNeeded() runs and copies that same openclaw.nixMode into UserDefaults.standard, making the app permanently think it’s in Nix mode even if the stable suite was set unintentionally. If the intent is “bridge only after we already know we’re in Nix mode”, this check needs to rely on env/standard only (or otherwise avoid promoting stable-suite nixMode into standard).
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/macos/Sources/OpenClaw/NixDefaultsBridge.swift
Line: 18:21
Comment:
**Nix mode check can recurse**
`NixDefaultsBridge.applyIfNeeded()` calls `ProcessInfo.processInfo.isNixMode`, but `isNixMode` now consults the stable `nixDefaultsSuiteName` (via `resolveNixMode`). That means when Nix mode is *only* enabled in the stable suite, `isNixMode` becomes true (because the stable suite says so), and then `applyIfNeeded()` runs and copies that same `openclaw.nixMode` into `UserDefaults.standard`, making the app permanently think it’s in Nix mode even if the stable suite was set unintentionally. If the intent is “bridge only after we already know we’re in Nix mode”, this check needs to rely on env/standard only (or otherwise avoid promoting stable-suite nixMode into standard).
How can I resolve this? If you propose a fix, please make it concise.Remove the defaults-bridging helper and rely on a single, stable defaults suite (ai.openclaw.mac) for nixMode detection when running as an app bundle. This keeps the fix focused on onboarding suppression and rename churn resilience.
Contributor
Author
|
Landed via squash.
|
zendizmo
pushed a commit
to zendizmo/openclaw
that referenced
this pull request
Feb 9, 2026
* macOS: honor Nix defaults suite; auto launch in Nix mode Fixes repeated onboarding in Nix deployments by detecting nixMode from the stable defaults suite (ai.openclaw.mac) and bridging key settings into the current defaults domain. Also enables LaunchAgent autostart by default in Nix mode (escape hatch: openclaw.nixAutoLaunchAtLogin=false). * macOS: keep Nix mode fix focused Drop the automatic launch-at-login behavior from the Nix defaults patch; keep this PR scoped to reliable nixMode detection + defaults bridging. * macOS: simplify nixMode fix Remove the defaults-bridging helper and rely on a single, stable defaults suite (ai.openclaw.mac) for nixMode detection when running as an app bundle. This keeps the fix focused on onboarding suppression and rename churn resilience. * macOS: fix nixMode defaults suite churn (openclaw#12205)
yeboster
pushed a commit
to yeboster/openclaw
that referenced
this pull request
Feb 9, 2026
* macOS: honor Nix defaults suite; auto launch in Nix mode Fixes repeated onboarding in Nix deployments by detecting nixMode from the stable defaults suite (ai.openclaw.mac) and bridging key settings into the current defaults domain. Also enables LaunchAgent autostart by default in Nix mode (escape hatch: openclaw.nixAutoLaunchAtLogin=false). * macOS: keep Nix mode fix focused Drop the automatic launch-at-login behavior from the Nix defaults patch; keep this PR scoped to reliable nixMode detection + defaults bridging. * macOS: simplify nixMode fix Remove the defaults-bridging helper and rely on a single, stable defaults suite (ai.openclaw.mac) for nixMode detection when running as an app bundle. This keeps the fix focused on onboarding suppression and rename churn resilience. * macOS: fix nixMode defaults suite churn (openclaw#12205)
NikolasP98
pushed a commit
to NikolasP98/openclaw
that referenced
this pull request
Feb 9, 2026
* macOS: honor Nix defaults suite; auto launch in Nix mode Fixes repeated onboarding in Nix deployments by detecting nixMode from the stable defaults suite (ai.openclaw.mac) and bridging key settings into the current defaults domain. Also enables LaunchAgent autostart by default in Nix mode (escape hatch: openclaw.nixAutoLaunchAtLogin=false). * macOS: keep Nix mode fix focused Drop the automatic launch-at-login behavior from the Nix defaults patch; keep this PR scoped to reliable nixMode detection + defaults bridging. * macOS: simplify nixMode fix Remove the defaults-bridging helper and rely on a single, stable defaults suite (ai.openclaw.mac) for nixMode detection when running as an app bundle. This keeps the fix focused on onboarding suppression and rename churn resilience. * macOS: fix nixMode defaults suite churn (openclaw#12205)
NikolasP98
added a commit
to NikolasP98/openclaw
that referenced
this pull request
Feb 9, 2026
Integrated upstream improvements: - CRITICAL: Fix bundled hooks broken since 2026.2.2 (openclaw#9295) - Grok web search provider (xAI) with inline citations - Telegram video note support with tests and docs - QMD model cache sharing optimization (openclaw#12114) - Context overflow false positive fix (openclaw#2078) - Model failover 400 status handling (openclaw#1879) - Dynamic config loading per-message (openclaw#11372) - Gateway post-compaction amnesia fix (openclaw#12283) - Skills watcher: ignore Python venvs and caches - Telegram send recovery from stale thread IDs - Cron job parameter recovery (openclaw#12124) - Auto-reply weekday timestamps (openclaw#12438) - Utility consolidation refactoring (PNG, JSON, errors) - Cross-platform test normalization (openclaw#12212) - macOS Nix defaults support (openclaw#12205) Preserved DEV enhancements: - Docker multi-stage build with enhanced tooling (gh, gog, obsidian-cli, uv, nano-pdf, mcporter, qmd) - Comprehensive .env.example documentation (371 lines) - Multi-environment docker-compose support (DEV/PRD) - GOG/Tailscale integration - Fork-sync and openclaw-docs skills - UI config editor (Svelte) - Fork workflow documentation Merge strategy: Cherry-picked 22 upstream commits, preserved DEV Docker architecture. Docker files unchanged: Dockerfile, docker-compose.yml, docker-setup.sh, .env.example Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Ethermious
pushed a commit
to Ethermious/openclaw
that referenced
this pull request
Feb 9, 2026
* macOS: honor Nix defaults suite; auto launch in Nix mode Fixes repeated onboarding in Nix deployments by detecting nixMode from the stable defaults suite (ai.openclaw.mac) and bridging key settings into the current defaults domain. Also enables LaunchAgent autostart by default in Nix mode (escape hatch: openclaw.nixAutoLaunchAtLogin=false). * macOS: keep Nix mode fix focused Drop the automatic launch-at-login behavior from the Nix defaults patch; keep this PR scoped to reliable nixMode detection + defaults bridging. * macOS: simplify nixMode fix Remove the defaults-bridging helper and rely on a single, stable defaults suite (ai.openclaw.mac) for nixMode detection when running as an app bundle. This keeps the fix focused on onboarding suppression and rename churn resilience. * macOS: fix nixMode defaults suite churn (openclaw#12205)
lucasmpramos
pushed a commit
to butley/openclaw
that referenced
this pull request
Feb 10, 2026
* macOS: honor Nix defaults suite; auto launch in Nix mode Fixes repeated onboarding in Nix deployments by detecting nixMode from the stable defaults suite (ai.openclaw.mac) and bridging key settings into the current defaults domain. Also enables LaunchAgent autostart by default in Nix mode (escape hatch: openclaw.nixAutoLaunchAtLogin=false). * macOS: keep Nix mode fix focused Drop the automatic launch-at-login behavior from the Nix defaults patch; keep this PR scoped to reliable nixMode detection + defaults bridging. * macOS: simplify nixMode fix Remove the defaults-bridging helper and rely on a single, stable defaults suite (ai.openclaw.mac) for nixMode detection when running as an app bundle. This keeps the fix focused on onboarding suppression and rename churn resilience. * macOS: fix nixMode defaults suite churn (openclaw#12205)
slathrop
referenced
this pull request
in slathrop/openclaw-js
Feb 11, 2026
- Add resolveNixMode() reading from stable defaults suite ai.openclaw.mac - Add NixModeStableSuiteTests for reliable nixMode detection - Update Constants.swift with stable suite name constant - Fix onboarding suppression and rename churn resilience in Nix mode
slathrop
referenced
this pull request
in slathrop/openclaw-js
Feb 11, 2026
Tasks completed: 2/2 - Port iOS alpha node app + setup-code onboarding (#11756) - Port macOS Nix defaults suite (#12205) SUMMARY: .planning/phases/16-gateway-cron-ios/16-06-SUMMARY.md
yeboster
pushed a commit
to yeboster/openclaw
that referenced
this pull request
Feb 13, 2026
* macOS: honor Nix defaults suite; auto launch in Nix mode Fixes repeated onboarding in Nix deployments by detecting nixMode from the stable defaults suite (ai.openclaw.mac) and bridging key settings into the current defaults domain. Also enables LaunchAgent autostart by default in Nix mode (escape hatch: openclaw.nixAutoLaunchAtLogin=false). * macOS: keep Nix mode fix focused Drop the automatic launch-at-login behavior from the Nix defaults patch; keep this PR scoped to reliable nixMode detection + defaults bridging. * macOS: simplify nixMode fix Remove the defaults-bridging helper and rely on a single, stable defaults suite (ai.openclaw.mac) for nixMode detection when running as an app bundle. This keeps the fix focused on onboarding suppression and rename churn resilience. * macOS: fix nixMode defaults suite churn (openclaw#12205)
skyhawk14
pushed a commit
to skyhawk14/openclaw
that referenced
this pull request
Feb 13, 2026
* macOS: honor Nix defaults suite; auto launch in Nix mode Fixes repeated onboarding in Nix deployments by detecting nixMode from the stable defaults suite (ai.openclaw.mac) and bridging key settings into the current defaults domain. Also enables LaunchAgent autostart by default in Nix mode (escape hatch: openclaw.nixAutoLaunchAtLogin=false). * macOS: keep Nix mode fix focused Drop the automatic launch-at-login behavior from the Nix defaults patch; keep this PR scoped to reliable nixMode detection + defaults bridging. * macOS: simplify nixMode fix Remove the defaults-bridging helper and rely on a single, stable defaults suite (ai.openclaw.mac) for nixMode detection when running as an app bundle. This keeps the fix focused on onboarding suppression and rename churn resilience. * macOS: fix nixMode defaults suite churn (openclaw#12205)
mbelinky
pushed a commit
that referenced
this pull request
Feb 14, 2026
* macOS: honor Nix defaults suite; auto launch in Nix mode Fixes repeated onboarding in Nix deployments by detecting nixMode from the stable defaults suite (ai.openclaw.mac) and bridging key settings into the current defaults domain. Also enables LaunchAgent autostart by default in Nix mode (escape hatch: openclaw.nixAutoLaunchAtLogin=false). * macOS: keep Nix mode fix focused Drop the automatic launch-at-login behavior from the Nix defaults patch; keep this PR scoped to reliable nixMode detection + defaults bridging. * macOS: simplify nixMode fix Remove the defaults-bridging helper and rely on a single, stable defaults suite (ai.openclaw.mac) for nixMode detection when running as an app bundle. This keeps the fix focused on onboarding suppression and rename churn resilience. * macOS: fix nixMode defaults suite churn (#12205)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human written summary:
The intent of this change is, as written by a human:
The rest of this PR was written by ChatGPT-unknown, running in the pi harness. Full environment + prompt history appear at the end.
Changes
ai.openclaw.macas the stable defaults suite for Nix-managed deployments and consult it when determining Nix mode (only when running as a.appbundle).Tests
cd apps/macos && swift test --filter NixModeStableSuiteTests(pass)cd apps/macos && swift test --filter WideAreaGatewayDiscoveryTests(pass)Risks
openclaw.nixMode=trueis set in the stable suite while running the app bundle; that’s intended for Nix deployments, but could surprise users who set it manually.Follow-ups
Prompt History
Environment
Harness: pi-coding-agent
Model: unknown
Thinking level: unknown
Terminal: unknown
System: macOS 26.1 (25B78)
Prompts
onboarding flow still triggers when i open it. also the app should auto open imo.command hanging?fix nix mode after our rename churn!