| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Yo guys please please i am begging |
Sorry, something went wrong.
|
Please |
Sorry, something went wrong.
|
add! |
Sorry, something went wrong.
Guard the plugin HTTP client so requests issued from a plugin's server() hook while the instance's plugins are still loading return a 409 instead of re-entering the still-initializing instance and deadlocking. The guard is cleared once plugin loading and config-notify hooks complete. Ported from anomalyco#31859 (adapted onto this fork's createPluginClient transport). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Guard the plugin HTTP client so requests issued from a plugin's server() hook while the instance's plugins are still loading return a 409 instead of re-entering the still-initializing instance and deadlocking. The guard is cleared once plugin loading and config-notify hooks complete. Ported from anomalyco#31859 (adapted onto this fork's createPluginClient transport). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Guard the plugin HTTP client so requests issued from a plugin's server() hook while the instance's plugins are still loading return a 409 instead of re-entering the still-initializing instance and deadlocking. The guard is cleared once plugin loading and config-notify hooks complete. Ported from anomalyco#31859 (adapted onto this fork's createPluginClient transport). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
# Conflicts: # packages/opencode/src/plugin/index.ts
# Conflicts: # packages/opencode/src/plugin/index.ts
Guard the plugin HTTP client so requests issued from a plugin's server() hook while the instance's plugins are still loading return a 409 instead of re-entering the still-initializing instance and deadlocking. The guard is cleared once plugin loading and config-notify hooks complete. Ported from anomalyco#31859 (adapted onto this fork's createPluginClient transport). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Guard the plugin HTTP client so requests issued from a plugin's server() hook while the instance's plugins are still loading return a 409 instead of re-entering the still-initializing instance and deadlocking. The guard is cleared once plugin loading and config-notify hooks complete. Ported from anomalyco#31859 (adapted onto this fork's createPluginClient transport). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Guard the plugin HTTP client so requests issued from a plugin's server() hook while the instance's plugins are still loading return a 409 instead of re-entering the still-initializing instance and deadlocking. The guard is cleared once plugin loading and config-notify hooks complete. Ported from anomalyco#31859 (adapted onto this fork's createPluginClient transport). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Upstream PR anomalyco#31859 by @ualtinok. Authored by @ualtinok; original authorship is preserved in this commit.
Carries five third-party upstream PRs, one commit each, with original authorship and Co-authored-by trailers preserved: anomalyco#32203 @ualtinok stabilize duplicate skill discovery anomalyco#31859 @ualtinok reject bootstrap client reentry anomalyco#19961 @ualtinok fire system transform before messages transform anomalyco#39930 @brauliobo bound compacted history hydration anomalyco#31867 @ChangedenCZD improve deepseek prompt cache reuse Reconciles anomalyco#19961's hook reordering with the fork's sparse-context and instruction-audience handling: sparse still branches before skills/MCP are built, and modelMsgs is computed after messages.transform so plugin mutations are picked up.
| Back | FazBrowse Home | New Git URL |
Issue for this PR
Closes #31858
Type of change
What does this PR do?
This PR has been narrowed after upstream landed 87c33b3d85a6c874e7b5af6af8fd6784e0e1bfbd (fix(plugin): reuse active server for client requests).
That upstream commit fixes the main runtime split for normal post-init plugin SDK calls: when opencode serve or Desktop has an active listener, plugin input.client now targets the active listener instead of the default in-process Server.Default() runtime. That prevents the duplicate plugin load / duplicate promptAsync runner split for the common live-server path.
I verified that narrower upstream fix against the Docker repro: bare opencode-ai@1.17.7 no longer reproduces the main issue (plugin_init count: 1, and the promptAsync marker has one assistant child with one stop).
What remains unsolved is bootstrap re-entry. If a plugin calls input.client.* while its server(input) / config hooks are still loading, the active listener can route the request back into the same instance load. The instance is already booting and its deferred is not resolved yet, so the request can wait on the plugin load that is itself waiting on the request.
This PR now focuses only on that remaining path:
How did you verify your code works?
Screenshots / recordings
N/A
Checklist