Skip to content

fix: hot reload plugin management changes#75976

Merged
clawsweeper[bot] merged 4 commits into
mainfrom
codex/plugin-hot-reload-management
May 2, 2026
Merged

fix: hot reload plugin management changes#75976
clawsweeper[bot] merged 4 commits into
mainfrom
codex/plugin-hot-reload-management

Conversation

@steipete

@steipete steipete commented May 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add Gateway plugin hot reload for install/enable/disable/list/search management paths while keeping source-changing installs restart-backed
  • stop affected channel plugins before registry swaps, including wrapper plugins whose package id differs from channel id
  • clear stale plugin HTTP routes and global provider/command registries when plugin reload removes routes or all plugins
  • update plugin docs, slash-command docs, changelog, and regression coverage

Validation

  • pnpm test src/gateway/config-reload.test.ts src/gateway/server-reload-handlers.test.ts src/plugins/loader.runtime-registry.test.ts -- --reporter=verbose
  • pnpm test src/gateway/server.reload.test.ts src/gateway/server-reload-handlers.test.ts -- --reporter=verbose
  • pnpm test src/gateway/plugin-channel-reload-targets.test.ts src/gateway/server.reload.test.ts src/gateway/server-reload-handlers.test.ts -- --reporter=verbose
  • pnpm test src/plugins/runtime.test.ts src/gateway/server/plugins-http.test.ts src/gateway/server-plugins.test.ts src/gateway/server.reload.test.ts -- --reporter=verbose
  • pnpm exec oxfmt --check --threads=1 ...
  • git diff --check
  • Testbox pnpm check:changed

Fixes #72097.

@steipete

steipete commented May 2, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper automerge

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime cli CLI command changes size: L maintainer Maintainer-authored PR labels May 2, 2026
@clawsweeper clawsweeper Bot added the clawsweeper:automerge Maintainer opted this PR into bounded ClawSweeper-reviewed automerge label May 2, 2026
@clawsweeper

clawsweeper Bot commented May 2, 2026

Copy link
Copy Markdown
Contributor

🦞🦞
ClawSweeper merged this PR after the passing review.

Source: clawsweeper[bot]
Feedback: structured ClawSweeper verdict: pass (sha=860594f72286933b6d9e287076440e10487667be)
Merge status: merged by ClawSweeper automerge
Merged at: 2026-05-02T13:19:25Z
Merge commit: d678bcfcc7d0

What merged:

  • The PR changes Gateway reload planning, CLI plugin install-index writes, plugin runtime/cache cleanup, docs, changelog, and tests so plugin enable/disable hot reloads while install/update/uninstall stay restart-backed.
  • Reproducibility: yes. The earlier blocker has a source-level reproduction: run an external plugin install/up ... watches config and only the managed plugin index changes; the PR now tests that path and queues a restart.

Fixups included:

  • Included follow-up commit: fix: hot reload plugin management changes
  • Included follow-up commit: fix(clawsweeper): address review for automerge-openclaw-openclaw-7597…
  • Ran the ClawSweeper repair loop before final review.

The automerge loop is complete.

Automerge progress:

  • 2026-05-02 08:18:42 UTC repair completed [`2ad2627a289c`](https://github.com/openclaw/openclaw/commit/2ad2627a289c35e24bcdc2582a1c8fe774158495) (deterministic rebase) in 1m 35s Run: https://github.com/openclaw/clawsweeper/actions/runs/25247663494 clean deterministic rebase
  • 2026-05-02 08:18:42 UTC review queued [`2ad2627a289c`](https://github.com/openclaw/openclaw/commit/2ad2627a289c35e24bcdc2582a1c8fe774158495) (after repair)
  • 2026-05-02 06:28:33 UTC review queued [`2ad2627a289c`](https://github.com/openclaw/openclaw/commit/2ad2627a289c35e24bcdc2582a1c8fe774158495) (queued)
  • 2026-05-02 08:20:55 UTC repair queued [`2ad2627a289c`](https://github.com/openclaw/openclaw/commit/2ad2627a289c35e24bcdc2582a1c8fe774158495) (autonomous) Run: https://github.com/openclaw/clawsweeper/actions/runs/25247774149
  • 2026-05-02 08:25:15 UTC repair completed [`ea5f8349c06b`](https://github.com/openclaw/openclaw/commit/ea5f8349c06bf0c7ed6a1464546e8f097765d8dd) (deterministic rebase) in 1m 35s Run: https://github.com/openclaw/clawsweeper/actions/runs/25247774149 clean deterministic rebase
  • 2026-05-02 08:25:14 UTC review queued [`ea5f8349c06b`](https://github.com/openclaw/openclaw/commit/ea5f8349c06bf0c7ed6a1464546e8f097765d8dd) (after repair)
  • 2026-05-02 06:28:33 UTC review queued [`ea5f8349c06b`](https://github.com/openclaw/openclaw/commit/ea5f8349c06bf0c7ed6a1464546e8f097765d8dd) (queued)
  • 2026-05-02 10:52:57 UTC repair queued [`ea5f8349c06b`](https://github.com/openclaw/openclaw/commit/ea5f8349c06bf0c7ed6a1464546e8f097765d8dd) (autonomous) Run: https://github.com/openclaw/clawsweeper/actions/runs/25250292123
  • 2026-05-02 12:08:44 UTC repair completed [`ec55a257f06e`](https://github.com/openclaw/openclaw/commit/ec55a257f06ee165bedccc5e1a8021960838c01c) (branch updated) in 19m 43s Run: https://github.com/openclaw/clawsweeper/actions/runs/25251175013 not an adopted automerge branch repair
  • 2026-05-02 12:08:44 UTC review queued [`ec55a257f06e`](https://github.com/openclaw/openclaw/commit/ec55a257f06ee165bedccc5e1a8021960838c01c) (after repair)
  • 2026-05-02 12:12:45 UTC review requested repair [`ec55a257f06e`](https://github.com/openclaw/openclaw/commit/ec55a257f06ee165bedccc5e1a8021960838c01c) (structured ClawSweeper marker: fix-required (finding=review-feedback sha=ec55a2...)
  • 2026-05-02 12:45:50 UTC repair completed (no branch change) in 24m 30s Run: https://github.com/openclaw/clawsweeper/actions/runs/25251469152 Codex /review timed out after 30000ms
  • 2026-05-02 13:15:08 UTC repair completed [`860594f72286`](https://github.com/openclaw/openclaw/commit/860594f72286933b6d9e287076440e10487667be) (branch updated) in 21m 59s Run: https://github.com/openclaw/clawsweeper/actions/runs/25252308958 initial automerge rebase is delegated to Codex repair
  • 2026-05-02 13:15:08 UTC review queued [`860594f72286`](https://github.com/openclaw/openclaw/commit/860594f72286933b6d9e287076440e10487667be) (after repair)
  • 2026-05-02 13:19:14 UTC review passed [`860594f72286`](https://github.com/openclaw/openclaw/commit/860594f72286933b6d9e287076440e10487667be) (structured ClawSweeper verdict: pass (sha=860594f72286933b6d9e287076440e1048766...)
  • 2026-05-02 13:19:27 UTC merged [`860594f72286`](https://github.com/openclaw/openclaw/commit/860594f72286933b6d9e287076440e10487667be) (merged by ClawSweeper automerge)

@clawsweeper

clawsweeper Bot commented May 2, 2026

Copy link
Copy Markdown
Contributor

Codex review: passed.

Summary
The PR changes Gateway reload planning, CLI plugin install-index writes, plugin runtime/cache cleanup, docs, changelog, and tests so plugin enable/disable hot reloads while install/update/uninstall stay restart-backed.

Reproducibility: yes. The earlier blocker has a source-level reproduction: run an external plugin install/update while the Gateway watches config and only the managed plugin index changes; the PR now tests that path and queues a restart.

Next step before merge
No repair task is needed; guarded automerge or maintainer review should wait for exact-head required checks to settle.

Security
Cleared: Cleared: the diff touches plugin code-execution lifecycle paths but adds no dependencies, workflows, permissions, secret handling, downloads, or package-resolution sources, and keeps source-changing plugin code on the restart path.

Review details

Best possible solution:

Land this through the guarded automerge path after exact-head checks finish, preserving the explicit restart boundary for plugin source changes and the new regression coverage.

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

Yes. The earlier blocker has a source-level reproduction: run an external plugin install/update while the Gateway watches config and only the managed plugin index changes; the PR now tests that path and queues a restart.

Is this the best way to solve the issue?

Yes. The current approach is the narrow maintainable fix: use the managed install-index as the durable cross-process signal for source changes, while limiting hot reload to plugin policy/runtime surfaces and clearing stale runtime state.

What I checked:

  • docs_list_ran: Ran the repository docs index first and selected plugin/slash-command docs as relevant changed docs surfaces. (7a100021d3c6)
  • pr_head_confirmed: The current PR head is 860594f, matching the reviewed diff. (860594f72286)
  • source_change_restart_boundary: The PR keeps plugins.load and plugins.installs restart-backed while making the broader plugins prefix hot with plugin reload and MCP disposal actions. (src/gateway/config-reload-plan.ts:102, 860594f72286)
  • managed_index_restart_fix: The Gateway reloader now snapshots and rereads managed plugin install records, folds their diff into changedPaths, and therefore sees source-only install-index changes from an external CLI process. (src/gateway/config-reload.ts:217, 860594f72286)
  • regression_coverage: New config-reloader tests cover the earlier blocker: an external plugin source write that only changes the managed index queues a restart instead of hot reload. (src/gateway/config-reload.test.ts:1235, 860594f72286)
  • runtime_reload_order: Hot reload stops affected channel plugins before replacing plugin runtime, then restarts only channels still active after the new registry is installed. (src/gateway/server-reload-handlers.ts:273, 860594f72286)

Likely related people:

  • steipete: Recent main history repeatedly touches Gateway reload planning, server reload handlers, server startup, and plugin loader/cache behavior central to this PR. (role: recent maintainer and likely follow-up owner; confidence: high; commits: 7abca3379089, ed8f50f240a8, 738cf18a0f17; files: src/gateway/config-reload.ts, src/gateway/server-reload-handlers.ts, src/gateway/server.impl.ts)
  • shakkernerd: Recent merged work introduced and maintained the managed plugin install-index records and pending-install commit path that this PR now uses for cross-process restart detection. (role: adjacent plugin install-index owner; confidence: medium; commits: 194c26bcd2f1, 9e086d6ed833, 921ffad7c7a6; files: src/plugins/installed-plugin-index-records.ts, src/cli/plugins-install-record-commit.ts, src/plugins/loader.ts)
  • vincentkoc: Recent history includes Gateway reload/runtime deferral work and plugin runtime seam extraction that overlap the restart and registry-state surfaces reviewed here. (role: adjacent gateway/plugin runtime maintainer; confidence: medium; commits: 1f41b8b44ba0, 75ba8398f939, 543c14a4edd1; files: src/gateway/server-reload-handlers.ts, src/gateway/server.impl.ts, src/plugins/runtime.ts)

Remaining risk / open question:

  • Exact-head CI was still in progress at review time; merge should wait for required checks to settle on 860594f.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 7a100021d3c6.

@clawsweeper clawsweeper Bot force-pushed the codex/plugin-hot-reload-management branch 9 times, most recently from 1b979ec to 2ad2627 Compare May 2, 2026 08:18
@clawsweeper clawsweeper Bot added the clawsweeper:human-review Needs maintainer review before ClawSweeper can continue label May 2, 2026
@clawsweeper

clawsweeper Bot commented May 2, 2026

Copy link
Copy Markdown
Contributor

🦞🦞
ClawSweeper is pausing this repair loop for human review.

Source: clawsweeper[bot]
Reason: structured ClawSweeper verdict: needs-human (sha=2ad2627a289c35e24bcdc2582a1c8fe774158495)

I added clawsweeper:human-review and left the final call with a maintainer.

@clawsweeper clawsweeper Bot force-pushed the codex/plugin-hot-reload-management branch from 2ad2627 to ea5f834 Compare May 2, 2026 08:25
@clawsweeper clawsweeper Bot removed the clawsweeper:human-review Needs maintainer review before ClawSweeper can continue label May 2, 2026
@clawsweeper clawsweeper Bot force-pushed the codex/plugin-hot-reload-management branch from ea5f834 to ec55a25 Compare May 2, 2026 12:08
@clawsweeper clawsweeper Bot force-pushed the codex/plugin-hot-reload-management branch from ec55a25 to 860594f Compare May 2, 2026 13:15
@clawsweeper clawsweeper Bot merged commit d678bcf into main May 2, 2026
101 of 102 checks passed
@clawsweeper clawsweeper Bot deleted the codex/plugin-hot-reload-management branch May 2, 2026 13:19
lxe pushed a commit to lxe/openclaw that referenced this pull request May 6, 2026
Summary:
- The PR changes Gateway reload planning, CLI plugin install-index writes, plugin runtime/cache cleanup, docs, changelog, and tests so plugin enable/disable hot reloads while install/update/uninstall stay restart-backed.
- Reproducibility: yes. The earlier blocker has a source-level reproduction: run an external plugin install/up ...  watches config and only the managed plugin index changes; the PR now tests that path and queues a restart.

ClawSweeper fixups:
- Included follow-up commit: fix: hot reload plugin management changes
- Included follow-up commit: fix(clawsweeper): address review for automerge-openclaw-openclaw-7597…
- Ran the ClawSweeper repair loop before final review.

Validation:
- ClawSweeper review passed for head 860594f.
- Required merge gates passed before the squash merge.

Prepared head SHA: 860594f
Review: openclaw#75976 (comment)

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
Summary:
- The PR changes Gateway reload planning, CLI plugin install-index writes, plugin runtime/cache cleanup, docs, changelog, and tests so plugin enable/disable hot reloads while install/update/uninstall stay restart-backed.
- Reproducibility: yes. The earlier blocker has a source-level reproduction: run an external plugin install/up ...  watches config and only the managed plugin index changes; the PR now tests that path and queues a restart.

ClawSweeper fixups:
- Included follow-up commit: fix: hot reload plugin management changes
- Included follow-up commit: fix(clawsweeper): address review for automerge-openclaw-openclaw-7597…
- Ran the ClawSweeper repair loop before final review.

Validation:
- ClawSweeper review passed for head 860594f.
- Required merge gates passed before the squash merge.

Prepared head SHA: 860594f
Review: openclaw#75976 (comment)

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
greench-ai pushed a commit to greench-ai/nexisclaw that referenced this pull request May 12, 2026
Summary:
- The PR changes Gateway reload planning, CLI plugin install-index writes, plugin runtime/cache cleanup, docs, changelog, and tests so plugin enable/disable hot reloads while install/update/uninstall stay restart-backed.
- Reproducibility: yes. The earlier blocker has a source-level reproduction: run an external plugin install/up ...  watches config and only the managed plugin index changes; the PR now tests that path and queues a restart.

ClawSweeper fixups:
- Included follow-up commit: fix: hot reload plugin management changes
- Included follow-up commit: fix(clawsweeper): address review for automerge-openclaw-openclaw-7597…
- Ran the ClawSweeper repair loop before final review.

Validation:
- ClawSweeper review passed for head 860594f72286933b6d9e287076440e10487667be.
- Required merge gates passed before the squash merge.

Prepared head SHA: 860594f72286933b6d9e287076440e10487667be
Review: openclaw/openclaw#75976 (comment)

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
markfietje pushed a commit to markfietje/openclaw that referenced this pull request May 20, 2026
Summary:
- The PR changes Gateway reload planning, CLI plugin install-index writes, plugin runtime/cache cleanup, docs, changelog, and tests so plugin enable/disable hot reloads while install/update/uninstall stay restart-backed.
- Reproducibility: yes. The earlier blocker has a source-level reproduction: run an external plugin install/up ...  watches config and only the managed plugin index changes; the PR now tests that path and queues a restart.

ClawSweeper fixups:
- Included follow-up commit: fix: hot reload plugin management changes
- Included follow-up commit: fix(clawsweeper): address review for automerge-openclaw-openclaw-7597…
- Ran the ClawSweeper repair loop before final review.

Validation:
- ClawSweeper review passed for head 860594f72286933b6d9e287076440e10487667be.
- Required merge gates passed before the squash merge.

Prepared head SHA: 860594f72286933b6d9e287076440e10487667be
Review: openclaw/openclaw#75976 (comment)

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
markfietje pushed a commit to markfietje/openclaw that referenced this pull request May 20, 2026
Summary:
- The PR changes Gateway reload planning, CLI plugin install-index writes, plugin runtime/cache cleanup, docs, changelog, and tests so plugin enable/disable hot reloads while install/update/uninstall stay restart-backed.
- Reproducibility: yes. The earlier blocker has a source-level reproduction: run an external plugin install/up ...  watches config and only the managed plugin index changes; the PR now tests that path and queues a restart.

ClawSweeper fixups:
- Included follow-up commit: fix: hot reload plugin management changes
- Included follow-up commit: fix(clawsweeper): address review for automerge-openclaw-openclaw-7597…
- Ran the ClawSweeper repair loop before final review.

Validation:
- ClawSweeper review passed for head 860594f72286933b6d9e287076440e10487667be.
- Required merge gates passed before the squash merge.

Prepared head SHA: 860594f72286933b6d9e287076440e10487667be
Review: openclaw/openclaw#75976 (comment)

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
Summary:
- The PR changes Gateway reload planning, CLI plugin install-index writes, plugin runtime/cache cleanup, docs, changelog, and tests so plugin enable/disable hot reloads while install/update/uninstall stay restart-backed.
- Reproducibility: yes. The earlier blocker has a source-level reproduction: run an external plugin install/up ...  watches config and only the managed plugin index changes; the PR now tests that path and queues a restart.

ClawSweeper fixups:
- Included follow-up commit: fix: hot reload plugin management changes
- Included follow-up commit: fix(clawsweeper): address review for automerge-openclaw-openclaw-7597…
- Ran the ClawSweeper repair loop before final review.

Validation:
- ClawSweeper review passed for head 860594f.
- Required merge gates passed before the squash merge.

Prepared head SHA: 860594f
Review: openclaw#75976 (comment)

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
Summary:
- The PR changes Gateway reload planning, CLI plugin install-index writes, plugin runtime/cache cleanup, docs, changelog, and tests so plugin enable/disable hot reloads while install/update/uninstall stay restart-backed.
- Reproducibility: yes. The earlier blocker has a source-level reproduction: run an external plugin install/up ...  watches config and only the managed plugin index changes; the PR now tests that path and queues a restart.

ClawSweeper fixups:
- Included follow-up commit: fix: hot reload plugin management changes
- Included follow-up commit: fix(clawsweeper): address review for automerge-openclaw-openclaw-7597…
- Ran the ClawSweeper repair loop before final review.

Validation:
- ClawSweeper review passed for head 860594f.
- Required merge gates passed before the squash merge.

Prepared head SHA: 860594f
Review: openclaw#75976 (comment)

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
sablehead pushed a commit to sablehead/openclaw that referenced this pull request Jun 10, 2026
Summary:
- The PR changes Gateway reload planning, CLI plugin install-index writes, plugin runtime/cache cleanup, docs, changelog, and tests so plugin enable/disable hot reloads while install/update/uninstall stay restart-backed.
- Reproducibility: yes. The earlier blocker has a source-level reproduction: run an external plugin install/up ...  watches config and only the managed plugin index changes; the PR now tests that path and queues a restart.

ClawSweeper fixups:
- Included follow-up commit: fix: hot reload plugin management changes
- Included follow-up commit: fix(clawsweeper): address review for automerge-openclaw-openclaw-7597…
- Ran the ClawSweeper repair loop before final review.

Validation:
- ClawSweeper review passed for head 860594f.
- Required merge gates passed before the squash merge.

Prepared head SHA: 860594f
Review: openclaw#75976 (comment)

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clawsweeper:automerge Maintainer opted this PR into bounded ClawSweeper-reviewed automerge cli CLI command changes docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: sync tool-injection into active agent sessions on plugins install

1 participant