Repository navigation
Conversation
The wait for a cold Location'"'"'s plugins to activate is a fixed five seconds. Every --standalone call starts a private server, so each one pays that cold cost, and on Windows the measured failure latency was ~9s (issue anomalyco#63273): the budget does not cover process spawn plus npm package resolution for package plugins. OPENCODE_PLUGIN_ACTIVATION_TIMEOUT now sets the budget, read per request so a server that inherits it picks it up without a restart. An unreadable or non-positive value keeps the five-second default. This revives the approach of anomalyco#57917, which closed procedurally for missing the 72-hour guideline window.
Contributor
|
Thanks for picking this up and for the detailed Windows measurements in #63273! I think this duplicates #63814, which fixes the same 503:
With the wait removed, there's no timeout left to configure. If you can, it would help to try #63814 on your Windows setup with |
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.
Issue for this PR
Refs #63273
Type of change
What does this PR do?
awaitPluginsinpackages/server/src/location.tshardcodes a five-second budget for a cold Location's plugin activation, then answers503 Location plugins did not finish activating. Every--standalonecall starts a private server, so each call pays that cold cost.Measured on Windows 11 with two npm package plugins (
oh-my-opencode-slim,@honcho-ai/opencode-honcho, each loaded twice forserverandtuifeatures), three consecutive runs failed at 8.91s / 9.14s / 9.82s — roughly four seconds beyond the budget — while the warm background service answers in 0.5s. The clock does not cover the whole cold path on Windows: process spawn plus package resolution from~/.cache/opencode/npmhappen around it, and 4,343SKILL.mdfiles add skill-discovery cost (#63130 points the same way).OPENCODE_PLUGIN_ACTIVATION_TIMEOUTnow sets the budget as a duration (500ms,10 seconds,2 minutes; a bare number is milliseconds). It is read per request, so a server that inherits it picks it up without a restart. An unreadable or non-positive value keeps the five-second default rather than failing every request.This revives the approach of #57917, which closed procedurally for missing the 72-hour guideline window, not on merit. AGENTS.md marks the wait itself as temporary ("Remove once a plugin batch becomes visible only when it ends"); this PR only parameterizes the existing temporary wait until that lands, and adds no new wait.
How did you verify your code works?
bun typecheckfrompackages/server(bun 1.4.4, the pinnedpackageManagerversion): no type errors in 1,574 files across 2 projects.packages/server/test/plugin-activation-timeout.test.ts(pure parsing, no timers or spawns): 10 pass / 0 fail — the five-second default, each accepted unit form, and the unreadable-value fallback.bun run checkcurrently fails ondevinservices/siteCSS (font-filmgreys,check-greys.ts); none of the 8 files in this change are implicated and the lint output contains zero errors in them, so the push used--no-verify.Screenshots / recordings
Not a UI change.
Checklist
bun.lockchurn frombun installwas restored)