You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NSUserDefaults warning: app passes own bundle identifier as suite name #88909
OpenClaw[...] Using your own bundle identifier as an NSUserDefaults suite name does not make sense and will not work. Break on _NSUserDefaults_Log_Nonsensical_Suites to find this
Version: 2026.5.28 macOS: Darwin 25.5 (Sequoia) Bundle ID:ai.openclaw.mac
Cause:UserDefaults(suiteName:) is called with Bundle.main.bundleIdentifier. A suite name must differ from the app's own bundle ID; otherwise the init no-ops and falls back to standard defaults, and macOS logs the warning above.
Fix: use UserDefaults.standard, or a distinct app-group suite (e.g. group.ai.openclaw) if defaults need to be shared with a helper/extension.
Impact: cosmetic — stderr noise only, preferences still persist.
This only quiets the stderr line; it does not change app behavior. The real fix still belongs in code (UserDefaults.standard or a distinct group.* suite).
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed August 1, 2026, 6:49 AM ET / 10:49 UTC.
Summary
Current main still opens a defaults suite named ai.openclaw.mac on the macOS Nix-mode launch path, and that name is also the reported app identifier. This remains a narrow, source-reproducible cosmetic defect; a focused repair should preserve the existing Nix stable-suite contract rather than replacing all reads with standard defaults.
Reproducibility: yes. from source: every evaluation of isNixMode constructs the self-named suite, and two users reported the warning on released macOS app launches. This read-only Linux checkout cannot perform the native runtime launch confirmation.
Next step
Current source proves a small existing-behavior defect, the affected files and tests are clear, and no confirmed open PR currently owns the repair.
Review details
Best possible solution:
Use standard defaults when the stable Nix domain equals the running app’s bundle identifier, while retaining the stable-suite lookup for renamed app bundles, with regression coverage for both paths.
Do we have a high-confidence way to reproduce the issue?
Yes, from source: every evaluation of isNixMode constructs the self-named suite, and two users reported the warning on released macOS app launches. This read-only Linux checkout cannot perform the native runtime launch confirmation.
Is this the best way to solve the issue?
Yes: a conditional stable-suite lookup preserves the existing Nix contract while avoiding the self-suite construction; an unconditional UserDefaults.standard replacement would not be the best fix.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
The repair must prove both the normal matching-identifier path and the renamed-bundle Nix path; removing the stable lookup wholesale would make Nix mode undiscoverable after bundle-identifier churn.
Codex review notes: model internal, reasoning high; reviewed against a88f3ffc9609.
Label changes
Label changes:
add issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.
add clawsweeper:source-repro: Current issue advisory state selects this label.
add clawsweeper:queueable-fix: Current issue advisory state selects this label.
add clawsweeper:fix-shape-clear: Current issue advisory state selects this label.
remove clawsweeper:needs-live-repro: Current issue advisory state no longer selects this label.
remove issue-rating: 🐚 platinum hermit: Current issue advisory state no longer selects this label.
Label justifications:
P3: The observed effect is cosmetic stderr noise; reporters state that preferences still persist and normal operation continues.
impact:other: This is a concrete native macOS launch-diagnostics issue that does not fit the specialized message, session, provider, security, or crash labels.
Evidence reviewed
Acceptance criteria:
cd apps/macos && swift test --filter NixModeStableSuiteTests
Launch the packaged macOS app with bundle identifier ai.openclaw.mac and verify that the NSUserDefaults self-suite warning is absent.
Exercise a renamed-bundle fixture or focused test where the stable ai.openclaw.mac domain still enables Nix mode.
What I checked:
Current self-suite construction: Current main creates UserDefaults(suiteName: launchdLabel) during isNixMode; the shared constant defines that label as ai.openclaw.mac, matching the reported app identifier. (apps/macos/Sources/OpenClaw/ProcessInfo+OpenClaw.swift:36, a88f3ffc9609)
Stable-domain contract: The constant documents that Nix writes defaults to ai.openclaw.mac to survive bundle-identifier churn, and focused tests require that domain to affect Nix mode for app bundles. (apps/macos/Sources/OpenClaw/Constants.swift:3, a88f3ffc9609)
Current consumer:ConfigSettings reads ProcessInfo.processInfo.isNixMode to disable configuration editing, making the defaults lookup a real launch/UI behavior rather than dead code. (apps/macos/Sources/OpenClaw/ConfigSettings.swift:6, a88f3ffc9609)
Current-path provenance:git blame attributes the present suite construction and Nix-mode path to commit 02419ed1998feeaeaca21a92de7d23e805742f13; the cited older merge object could not be inspected locally because this partial clone could not retrieve it. (apps/macos/Sources/OpenClaw/ProcessInfo+OpenClaw.swift:36, 02419ed1998f)
Maturity check: The maturity helper lists the macOS companion app as M3 Beta, below the M4/M5 eligibility threshold for maturity:stable. (qa/maturity-scores.yaml, a88f3ffc9609)
Likely related people:
Peter Steinberger: Current-line blame maps the Nix defaults resolution and suite creation to 02419ed1998feeaeaca21a92de7d23e805742f13. (role: recent contributor on the current path; confidence: medium; commits: 02419ed1998f; files: apps/macos/Sources/OpenClaw/ProcessInfo+OpenClaw.swift)
joshp123: The provided merged PR context identifies this contributor as the author of the stable Nix defaults-suite behavior that the repair must preserve. (role: related stable-suite contributor; confidence: medium; commits: 69aa3df116d3; files: apps/macos/Sources/OpenClaw/ProcessInfo+OpenClaw.swift, apps/macos/Tests/OpenClawIPCTests/NixModeStableSuiteTests.swift)
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.
I can confirm the issue on my Mac with latest (v2026.5.28) OpenClaw app.
-> % cat /tmp/openclaw/openclaw-stdout.log
2026-06-02 15:59:47.173 OpenClaw[2256:19247] Using your own bundle identifier as an NSUserDefaults suite name does not make sense and will not work. Break on _NSUserDefaults_Log_Nonsensical_Suites to find this
Activity
onlinejourno commentedon Jun 1, 2026
Environment where I hit this:
ai.openclaw.macReproduced on every launch, both via
open -a OpenClawand running the binary directly.onlinejourno commentedon Jun 1, 2026
Workaround (until a fix ships): none needed for normal use — the warning is cosmetic, defaults fall back to standard and preferences still persist.
If the log noise is annoying when launching from a terminal, suppress the system framework logging:
This only quiets the stderr line; it does not change app behavior. The real fix still belongs in code (
UserDefaults.standardor a distinctgroup.*suite).clawsweeper commentedon Jun 1, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed August 1, 2026, 6:49 AM ET / 10:49 UTC.
Summary
Current main still opens a defaults suite named
ai.openclaw.macon the macOS Nix-mode launch path, and that name is also the reported app identifier. This remains a narrow, source-reproducible cosmetic defect; a focused repair should preserve the existing Nix stable-suite contract rather than replacing all reads with standard defaults.Reproducibility: yes. from source: every evaluation of
isNixModeconstructs the self-named suite, and two users reported the warning on released macOS app launches. This read-only Linux checkout cannot perform the native runtime launch confirmation.Next step
Current source proves a small existing-behavior defect, the affected files and tests are clear, and no confirmed open PR currently owns the repair.
Review details
Best possible solution:
Use standard defaults when the stable Nix domain equals the running app’s bundle identifier, while retaining the stable-suite lookup for renamed app bundles, with regression coverage for both paths.
Do we have a high-confidence way to reproduce the issue?
Yes, from source: every evaluation of
isNixModeconstructs the self-named suite, and two users reported the warning on released macOS app launches. This read-only Linux checkout cannot perform the native runtime launch confirmation.Is this the best way to solve the issue?
Yes: a conditional stable-suite lookup preserves the existing Nix contract while avoiding the self-suite construction; an unconditional
UserDefaults.standardreplacement would not be the best fix.AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against a88f3ffc9609.
Label changes
Label changes:
issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.clawsweeper:source-repro: Current issue advisory state selects this label.clawsweeper:queueable-fix: Current issue advisory state selects this label.clawsweeper:fix-shape-clear: Current issue advisory state selects this label.clawsweeper:needs-live-repro: Current issue advisory state no longer selects this label.issue-rating: 🐚 platinum hermit: Current issue advisory state no longer selects this label.Label justifications:
P3: The observed effect is cosmetic stderr noise; reporters state that preferences still persist and normal operation continues.impact:other: This is a concrete native macOS launch-diagnostics issue that does not fit the specialized message, session, provider, security, or crash labels.Evidence reviewed
Acceptance criteria:
ai.openclaw.macand verify that the NSUserDefaults self-suite warning is absent.ai.openclaw.macdomain still enables Nix mode.What I checked:
UserDefaults(suiteName: launchdLabel)duringisNixMode; the shared constant defines that label asai.openclaw.mac, matching the reported app identifier. (apps/macos/Sources/OpenClaw/ProcessInfo+OpenClaw.swift:36, a88f3ffc9609)ai.openclaw.macto survive bundle-identifier churn, and focused tests require that domain to affect Nix mode for app bundles. (apps/macos/Sources/OpenClaw/Constants.swift:3, a88f3ffc9609)ConfigSettingsreadsProcessInfo.processInfo.isNixModeto disable configuration editing, making the defaults lookup a real launch/UI behavior rather than dead code. (apps/macos/Sources/OpenClaw/ConfigSettings.swift:6, a88f3ffc9609)git blameattributes the present suite construction and Nix-mode path to commit02419ed1998feeaeaca21a92de7d23e805742f13; the cited older merge object could not be inspected locally because this partial clone could not retrieve it. (apps/macos/Sources/OpenClaw/ProcessInfo+OpenClaw.swift:36, 02419ed1998f)maturity:stable. (qa/maturity-scores.yaml, a88f3ffc9609)Likely related people:
02419ed1998feeaeaca21a92de7d23e805742f13. (role: recent contributor on the current path; confidence: medium; commits: 02419ed1998f; files:apps/macos/Sources/OpenClaw/ProcessInfo+OpenClaw.swift)apps/macos/Sources/OpenClaw/ProcessInfo+OpenClaw.swift,apps/macos/Tests/OpenClawIPCTests/NixModeStableSuiteTests.swift)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.mingtsay commentedon Jun 3, 2026
I can confirm the issue on my Mac with latest (v2026.5.28) OpenClaw app.