fix(plugin): prevent compiled binary hang by removing lazy dynamic import#1794
Merged
thdxr merged 1 commit intoanomalyco:devfrom Aug 11, 2025
Merged
Conversation
… binary hang Lazy import in plugin client fetch caused startup deadlock in compiled builds (Bun compile) while dev mode worked. Revert to direct import and direct Server.app() fetch to restore v0.4.2 behavior. Refs: v0.4.2→v0.4.3 regression observed when running compiled binary. 🤖 Generated with [opencode](https://opencode.ai) Co-Authored-By: opencode <noreply@opencode.ai>
Contributor
Author
|
@thdxr a quick patch to at least get opencode running until we figure out a better way to do prevent the circular import here |
sahilchouksey
pushed a commit
to sahilchouksey/opencode
that referenced
this pull request
Aug 11, 2025
…port (anomalyco#1794) Co-authored-by: opencode <noreply@opencode.ai>
xywsxp
pushed a commit
to xywsxp/opencode
that referenced
this pull request
Apr 24, 2026
…port (anomalyco#1794) Co-authored-by: opencode <noreply@opencode.ai>
Rwanbt
pushed a commit
to Rwanbt/opencode
that referenced
this pull request
May 5, 2026
…port (anomalyco#1794) Co-authored-by: opencode <noreply@opencode.ai>
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.
Summary
opencodev0.4.3 #1792.Context
packages/opencode/src/plugin/index.tsswitched toawait import('../server/server')inside fetch callback.bun devworked.Changes
import { Server } from '../server/server'andServer.app().fetch.Test plan
OPENCODE_VERSION=0.0.0-dev OPENCODE_SNAPSHOT=true OPENCODE_DRY=true ./packages/opencode/script/publish.ts./packages/opencode/dist/opencode-<os>-<arch>/bin/opencode run -p "ping" --print-logs --log-level DEBUG🤖 Generated with opencode