Skip to content

[Bug] 2026.5.6 → 2026.5.19 upgrade left macOS LaunchAgent Gateway unrecoverable; Time Machine restore required #85027

Closed as not planned

Description

@tess020126-cmyk

Summary

A macOS LaunchAgent install upgraded from OpenClaw 2026.5.6 to 2026.5.19 and left the Gateway unusable. The Gateway would not recover through openclaw doctor --fix; the only successful recovery path was a Time Machine restore of ~/.openclaw, followed by generating a new Gateway token.

This may be related to #84809, but this report is from a separate Intel macOS host and the observed symptom was Gateway startup/recovery failure after the 5.6 → 5.19 upgrade, not just workspace deletion.

Environment

  • Host: macOS 15.7.3 / Darwin 24.6.0 / Intel x64
  • Node/npm before restore: Node v25.5.0, npm 11.8.0
  • OpenClaw before upgrade: 2026.5.6 (c97b9f7)
  • Update target shown by Gateway: v2026.5.19
  • Gateway: macOS LaunchAgent, port 18789
  • Workspace/config root: /Users/tess/.openclaw
  • Recovery: Time Machine restore back to OpenClaw 2026.5.6, then new Gateway token generated

What happened

  1. System was running normally on OpenClaw 2026.5.6.
  2. Gateway log showed update available:
2026-05-20T16:32:13.080-05:00 [gateway] update available (latest): v2026.5.19 (current v2026.5.6). Run: openclaw update
  1. User attempted the upgrade from 2026.5.6 to 2026.5.19.
  2. The pre-upgrade Gateway shut down cleanly:
2026-05-21T09:03:10.595-05:00 [gateway] signal SIGTERM received
2026-05-21T09:03:10.611-05:00 [gateway] received SIGTERM; shutting down
2026-05-21T09:03:10.647-05:00 [shutdown] started: gateway stopping
2026-05-21T09:03:11.005-05:00 [gmail-watcher] gmail watcher stopped
2026-05-21T09:03:11.273-05:00 [shutdown] completed cleanly in 631ms
  1. The failed .openclaw tree, preserved as /Users/tess/.openclaw_5.19, shows managed npm packages were advanced to 5.19:
{
  "dependencies": {
    "@openclaw/brave-plugin": "2026.5.19",
    "@openclaw/codex": "2026.5.19",
    "openclaw-workspace-sync": "2.4.0",
    "ws": "8.20.0",
    "zod": "4.4.3"
  }
}
  1. The LaunchAgent was rewritten for v2026.5.19:
/Users/tess/Library/LaunchAgents/ai.openclaw.gateway.plist
Comment => OpenClaw Gateway (v2026.5.19)
ProgramArguments => /Users/tess/.openclaw/service-env/ai.openclaw.gateway-env-wrapper.sh ... /usr/local/lib/node_modules/openclaw/dist/index.js gateway --port 18789
WorkingDirectory => /Users/tess/.openclaw
  1. Post-upgrade logs show the Gateway appearing to start, then entering a repeated Bonjour/probing failure loop until it was terminated:
2026-05-21T09:16:03.593-05:00 [gateway] loading configuration…
2026-05-21T09:16:05.173-05:00 [gateway] resolving authentication…
2026-05-21T09:16:05.208-05:00 [gateway] starting...
2026-05-21T09:16:08.133-05:00 [gateway] starting HTTP server...
2026-05-21T09:16:13.508-05:00 [gateway] http server listening (12 plugins: bonjour, browser, canvas, device-pair, elevenlabs, file-transfer, memory-core, memory-wiki, openai, phone-control, talk-voice, telegram; 8.3s)
2026-05-21T09:16:14.334-05:00 [gateway] ready
2026-05-21T09:17:41.998-05:00 [Miller’s Mac mini (OpenClaw)._openclaw-gw._tcp.local.] failed probing with reason: Error: Can't probe for a service which is announced already. Received announcing for service Miller’s Mac mini (OpenClaw)._openclaw-gw._tcp.local.. Trying again in 2 seconds!
... repeated continuously ...
2026-05-21T09:21:01.382-05:00 [gateway] signal SIGTERM received
2026-05-21T09:21:01.397-05:00 [gateway] received SIGTERM; shutting down
2026-05-21T09:21:01.433-05:00 [shutdown] started: gateway stopping
  1. User reports the Gateway would not start/recover in practice, and openclaw doctor / openclaw doctor --fix did not fix it.
  2. User renamed the failed .openclaw tree to .openclaw_5.19, restored ~/.openclaw from Time Machine, generated a new Gateway token, and recovered on 2026.5.6.

Expected behavior

  • Upgrade from 2026.5.6 to 2026.5.19 should either complete cleanly or fail atomically and preserve a working Gateway.
  • openclaw doctor --fix should be able to repair the post-upgrade state or clearly explain why it cannot.
  • LaunchAgent/service state, managed npm plugin state, Gateway token/auth state, and Bonjour advertisement state should remain consistent after upgrade/rollback.

Actual behavior

  • Upgrade left the system unusable from the user's perspective: Gateway would not start/recover and doctor could not fix it.
  • Manual Time Machine restore was required.
  • A new Gateway token had to be generated after restore.
  • The preserved failed state shows a mix of 5.19 LaunchAgent / managed npm plugin state and a Gateway log loop around Bonjour service probing/announcement.

Notes / possibly related evidence

  • Existing related issue: [Data loss] 2026.5.19 update/backup flow removed ~/.openclaw/workspace and left plugin/npm state inconsistent #84809 (2026.5.19 update/backup flow removed ~/.openclaw/workspace and left plugin/npm state inconsistent).
  • This report is distinct because the preserved local evidence points to a 5.6 → 5.19 upgrade leaving Gateway startup/recovery broken on macOS Intel, with repeated Bonjour probe errors after gateway ready.
  • There is also an older stray /Users/tess/Library/LaunchAgents/openclaw.plist that is malformed XML-escaped text, but the active service appears to be ai.openclaw.gateway.plist. If the updater/doctor scans all *openclaw* LaunchAgents, this malformed legacy plist could be a contributing factor and should be handled defensively.

Recovery performed

  • Renamed failed ~/.openclaw to /Users/tess/.openclaw_5.19
  • Restored ~/.openclaw from Time Machine
  • Generated new Gateway token
  • Confirmed recovered version: OpenClaw 2026.5.6 (c97b9f7)

Activity

  1. clawsweeper commented on May 21, 2026

    @clawsweeper
    Contributor

    Codex review: this still needs some work.

    Summary
    Keep this issue open: the assigned maintainer requires native macOS upgrade-survival evidence, and the inspected fixes and smoke coverage do not establish recovery of the combined incident.

    Reproducibility: no. high-confidence current reproduction is established: the historical artifacts show a failed upgrade aftermath, but the Gateway reaches ready, the active failed config is missing, and native LaunchAgent upgrade survival was not exercised in this read-only review.

    Maintainer decision needed

    • Question: What native macOS upgrade-survival evidence will satisfy the assigned maintainer's closure requirement for this incident?
    • Recommendation: Validate the combined incident: Use an isolated native macOS installation with representative May-era state, follow the documented bridge route to the candidate, and verify managed restart, authenticated health, retained sessions, plugins, and Bonjour discovery.
    • Why: Individual fixes and the inspected foreground/Docker scenarios do not demonstrate recovery across all boundaries implicated by the retained incident.

    Next step
    The assigned incident owner should assess native LaunchAgent upgrade-survival evidence and identify any remaining repair, including a visible Doctor or Fix recovery path.

    Review details

    Best possible solution:

    Establish native LaunchAgent upgrade survival and provide a visible Doctor or Fix recovery action for any confirmed remaining failure.

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

    No high-confidence current reproduction is established: the historical artifacts show a failed upgrade aftermath, but the Gateway reaches ready, the active failed config is missing, and native LaunchAgent upgrade survival was not exercised in this read-only review.

    Is this the best way to solve the issue?

    Targeted native validation is the best next step because the Bonjour and launchd repairs address plausible components without proving the combined incident or identifying a remaining focused patch.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • No inspected evidence demonstrates service registration, token/session continuity, managed-plugin consistency, and Bonjour discovery together through the affected macOS upgrade route.
    • The missing active failed configuration and exact failing recovery output prevent identification of a bounded current-source defect.

    Codex review notes: model internal, reasoning medium; reviewed against 5295454c4a74.

    Label changes

    Label changes:

    • remove impact:crash-loop: Current review impact labels are impact:ux-release-blocker.

    Label justifications:

    • P0: The reported ordinary upgrade left the user without a working Gateway or successful Doctor recovery and required a machine-level restore; this meets the required recovery UX override, without establishing a current-main outage.
    • impact:ux-release-blocker: Recovery required manual state-directory replacement and token regeneration, with no successful in-product recovery path reported.
    • maturity:stable: The primary owner is CLI Updates and Upgrades on the M4 CLI surface, supported by the scorecard, taxonomy, and documented update/service-preservation contract.
    Evidence reviewed

    What I checked:

    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; those execution lanes are retired.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

    Reviewed October 15, 2026, 9:28 PM ET / October 16, 2026, 01:28 UTC.

  2. added
    P1High-priority user-facing bug, regression, or broken workflow.
    impact:crash-loopCrash, hang, restart loop, or process-level availability failure.
    on May 21, 2026
  3. tess020126-cmyk commented on May 21, 2026

    @tess020126-cmyk
    Author

    Additional config follow-up from the preserved failed tree:

    • The failed tree no longer has an active /Users/tess/.openclaw_5.19/openclaw.json; it has backups only.
    • /Users/tess/.openclaw_5.19/openclaw.json.bak.1 is byte-for-byte identical to the restored/current working config:
      • size: 91576
      • sha256: bf24f338e47206087257779817f61ed3af978be92fcc3d9412a8fe2018dbd5c5
    • Semantic JSON diff between restored current config and failed openclaw.json.bak.1: 0 added, 0 removed, 0 changed paths.
    • Comparing older failed backup .bak.2 from 2026-05-17 to .bak.1 shows normal pre-existing config changes only:
      • a Telegram group id changed from -5262665348 to -1003990871210
      • openclaw-workspace-sync plugin config was added/enabled, with backup disabled and mailbox sync settings
      • meta.lastTouchedAt changed
    • Because the exact same .bak.1 config is now running successfully again on 2026.5.6, I do not see evidence that a persistent user JSON config change itself caused the 5.19 Gateway failure.
    • The audit log does show doctor --fix wrote config during the failed recovery window:
      • 2026-05-21T14:06:09Z: doctor --non-interactive --fix, hash bf24... → cbbf..., bytes 91576 → 92225
      • 2026-05-21T14:16:01Z: doctor --fix, hash cbbf... → 2a70..., bytes 92225 → 91563
    • Those post-doctor versions are not present as standalone config files in the preserved failed tree, so I cannot diff their exact contents from the retained artifacts.

    This shifts suspicion away from a stable user config change and toward upgrade/runtime/service state: managed npm packages, LaunchAgent/service state, token/auth state, Bonjour advertisement state, or doctor-generated transient config mutations during attempted recovery.

  4. added
    impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.
    impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.
    issue-rating: 🦐 gold shrimpDecent issue quality, but reproduction details are still incomplete.
    clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    on May 21, 2026
  5. tess020126-cmyk commented on May 21, 2026

    @tess020126-cmyk
    Author

    Correction / additional evidence on model IDs:

    The retained active openclaw.json itself is not available in the preserved failed tree; only backups are present. I previously compared openclaw.json.bak.1 to the restored current config, and those are identical. However, searching the rest of the preserved failed tree found model-ID drift in cron job state:

    • /Users/tess/.openclaw_5.19/cron/jobs.json contains openai/gpt-5.5 in 14 job payloads and openai-codex/gpt-5.5 in 0 job payloads.
    • Current restored /Users/tess/.openclaw/cron/jobs.json contains only 1 job and no gpt-5.5 model strings, so the failed cron job state is materially different from the restored state.
    • The preserved openclaw.json.bak.1 contains mostly openai-codex/gpt-5.5, with one pre-existing agents.list[1].model = openai/gpt-5.5 entry. That same backup is byte-identical to the working restored config, so the persistent config backup still does not explain the failure by itself.

    The failed cron jobs using openai/gpt-5.5 were:

    daily-security-audit
    api-key-rotation-reminder
    daily-update-check
    daily-email-cleanup
    north-star-review
    nightly-config-backup
    clo-monday-compliance-check
    morning-brief-7am (disabled)
    midday-brief-1pm (disabled)
    monday-self-improvement-report
    spacex-ipo-watch
    daily-lunch-reminder
    cvs-prescription-refill
    monday-strategist-brief
    

    This matches the user’s observation that during the broken state they saw openai/gpt-5.5 in many places where they expected openai-codex/gpt-5.5.

    So the likely bad JSON was not retained as /Users/tess/.openclaw_5.19/openclaw.json, but the preserved failed cron state does show widespread openai/gpt-5.5 model IDs. This may be relevant if 5.19 changed model alias/provider resolution, cron model migration, or doctor/update rewriting behavior.

  6. self-assigned this
    on May 22, 2026
  7. vincentkoc commented on May 22, 2026

    @vincentkoc
    Member

    Update: #83875 and #84890 landed as the first macOS update hardening pair.

    This issue stays open because the Time Machine recovery incident spans more than the deleted-cwd and lifecycle lazy-import bugs; remaining work should validate service state, auth/session survival, and launchd recovery on a real macOS upgrade path.

  8. vincentkoc commented on May 22, 2026

    @vincentkoc
    Member

    Update after the macOS update canonicalization pass:

    This stack removes several plausible update/LaunchAgent failure modes, but this issue should stay open. The Time Machine recovery incident spans service state, auth/session survival, managed npm/plugin state, and Bonjour/runtime recovery; it is broader than the now-closed narrow cwd/PATH/launchd race issues.

    Recommended next work: run or build an upgrade-survivor scenario from the affected release range through current main on macOS LaunchAgent, then verify service registration, gateway health, auth token continuity, managed npm/plugin consistency, and Bonjour state. Close only after that proof passes or after a narrower root-cause issue is split out and linked.

  9. 26 remaining items

  10. added
    clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.
    issue-rating: 🦐 gold shrimpDecent issue quality, but reproduction details are still incomplete.
    and removed
    issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.
    on Aug 29, 2026
  11. added
    P0Emergency: data loss, security bypass, crash loop, or unusable core runtime.
    impact:ux-release-blockerA non-technical user is blocked without terminal, logs, config, or support.
    issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.
    and removed
    P1High-priority user-facing bug, regression, or broken workflow.
    impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.
    issue-rating: 🦐 gold shrimpDecent issue quality, but reproduction details are still incomplete.
    on Sep 6, 2026
  12. removed
    clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.
    impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.
    on Sep 26, 2026
  13. removed
    impact:crash-loopCrash, hang, restart loop, or process-level availability failure.
    on Oct 16, 2026
  14. steipete commented on Oct 24, 2026

    @steipete
    Contributor

    Thanks for filing this. We're closing older issues that no longer look actionable on current main.

    This was a 2026.5.6 to 2026.5.19 upgrade incident, and the macOS update and LaunchAgent paths have been reworked many times since. If an upgrade from a recent stable release leaves the Gateway unrecoverable, please open a fresh issue with doctor output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P0Emergency: data loss, security bypass, crash loop, or unusable core runtime.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:ux-release-blockerA non-technical user is blocked without terminal, logs, config, or support.issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.maturity:stableBroken existing behavior primarily owned by an M4/M5 scorecard surface.

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions