fix(controller): batch skillhub sync to prevent OpenClaw restart loop#1074
Merged
fix(controller): batch skillhub sync to prevent OpenClaw restart loop#1074
Conversation
The version was accidentally downgraded to 0.1.10 for local nightly update testing and merged to main. Restore to 0.1.11.
During initial bootstrap, each skill installation triggered an individual config sync → openclaw.json write → OpenClaw full process restart. With 10+ skills installing sequentially, this caused a sustained restart loop where the agent session never stabilized, leaving the UI stuck on "agent starting". Move the onSyncNeeded trigger from InstallQueue's per-item onComplete callback to a new onIdle callback that fires only when the queue fully drains. This batches N skill installs into a single config sync while preserving immediate sync for single-skill installs (queue drains right after the one item completes).
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 59297e3868
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Deploying nexu-docs with
|
| Latest commit: |
54435af
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://3858380b.nexu-docs.pages.dev |
| Branch Preview URL: | https://fix-batch-skillhub-sync.nexu-docs.pages.dev |
…estart langfuse-tracer was conditionally added to plugins.allow based on analyticsEnabled. On first boot or when the preference changed, this mutated plugins.allow, which OpenClaw treats as a full gateway restart (~11s drain + process restart on Windows). Move langfuse-tracer to the unconditional always-allow list and use the entries.enabled flag to toggle it. This way analytics preference changes only flip the enabled flag (hot-reload path) instead of mutating plugins.allow (full restart path).
54435af to
02e7354
Compare
The update banner's "restart & install" button silently did nothing because the renderer-side install() checked applyMode before calling IPC. If the capability was fetched before updateManager initialized, applyMode was "none" and the guard blocked the call permanently. Remove the redundant guard — the main process IPC handler already has its own null check on updateManager. The button is only visible when the update is in "ready" state, so the install action is always valid at that point.
alchemistklk
approved these changes
Apr 13, 2026
Merged
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.
What
Batch skill installation syncs and make langfuse-tracer always-allowed to prevent OpenClaw restart loops during initial bootstrap.
Why
During initial bootstrap on a fresh install, each skill installation individually triggered
onSyncNeeded → syncAll → doSync → openclaw.json write. With 10+ skills installing sequentially, this caused a sustained OpenClaw restart loop (~30-90s per restart), leaving the agent session permanently unavailable and the UI stuck on "agent starting".Additionally,
langfuse-tracerwas conditionally added toplugins.allowbased onanalyticsEnabled. On first boot this value transitions fromundefinedtotrue, mutatingplugins.allowand triggering a full gateway restart (~11s), compounding the restart loop.Diagnosed from a Windows user's diagnostics bundle: OpenClaw crashed and restarted 5+ times in 18 minutes, each time with a different PID, and the desktop created 5 separate webviews for the agent session that all became stale.
How
Commit 1: batch skillhub sync
onIdlecallback toInstallQueuethat fires only when the queue fully drains (no active or pending items) after at least one successful completion.onSyncNeeded()call from the per-itemonCompletetoonIdle.onCompletestill records each install inskillDbimmediately (no data loss).onIdlefires immediately.syncAll()and theConfigWriterskip-if-unchanged guard remain as secondary protections.Commit 2: langfuse-tracer always-allow
langfuse-tracerto the unconditional always-allow list inplugins.allow.entries.enabled(hot-reload path) instead of mutatingplugins.allow(full restart path).Affected areas
Checklist
pnpm typecheckpassespnpm lintpassespnpm testpassespnpm generate-typesrun (if API routes/schemas changed) — N/A