fix(plugins): reuse active registry during tool resolution#52262
fix(plugins): reuse active registry during tool resolution#52262gumadeiras merged 3 commits intoopenclaw:mainfrom
Conversation
Greptile SummaryThis PR fixes a process-global plugin registry corruption that could occur in subagent flows (issue #52250). By passing
Confidence Score: 5/5
Reviews (1): Last reviewed commit: "fix(plugins): avoid activating registry ..." | Re-trigger Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 88d865b6e4
ℹ️ 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".
88d865b to
b889fe1
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: efd04ea6ad
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e67aa95aed
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4c90e200eb
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: be43591634
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4dd264f2b6
ℹ️ 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".
704d27b to
476ea0d
Compare
a1e6efb to
eea3f1a
Compare
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
eea3f1a to
55982a6
Compare
|
Merged via squash.
Thanks @PerfectPan! |
…52262) Merged via squash. Prepared head SHA: 55982a6 Co-authored-by: PerfectPan <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
Summary
resolveEffectivePluginRegistry()as the single place that decides whether to reuse the active registry or perform a fallback plugin loadWhy
This fixes #52250.
In the broken path, a later tool-resolution step could reload plugins under a different state/workspace context and replace the process-global active plugin registry. After that, plugin-backed channels such as
feishucould become unknown in subagent flows.The earlier
activate: false, cache: falseapproach avoided the overwrite, but it also rebuilt a second registry and could split stateful plugin runtime/service instances. This version fixes the same bug by converging all hot paths on a single effective-registry resolver instead.Verification
pnpm exec vitest run src/plugins/runtime.test.ts src/plugins/tools.optional.test.ts src/image-generation/provider-registry.test.ts src/tts/provider-registry.test.ts src/media-understanding/providers/index.loader.test.ts src/gateway/server-methods/tools-catalog.test.ts src/agents/openclaw-tools.plugin-context.test.tsbefore=true,after=true)