GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(core): read stdout and stderr in PackageRegistry.info before waiting for the process to exit by ghost91- · Pull Request #16998 · anomalyco/opencode

Conversation

@ghost91-

@ghost91- ghost91- commented Mar 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Issue for this PR

Fixes #16608
Fixes #10546
Fixes #15673

Type of change

  • Bug fix

What does this PR do?

The previous implementation waited for the process to exit first, which resulted in empty stdout and stderr. Subsequently, this caused the PackageRegistry.isOutdated check to always return false and log

Failed to resolve latest version, using cached

Therefore, plugins that were configured to use latest as version were never actually updated.

To fix this, this change ensures stdout and stderr are read while still available. It uses the exact same approach as Process.run.

How did you verify your code works?

I manually tested it with a plugin. I first intentionally installed an older version of the plugin. Then changed it to @latest in the opencode config. Then we can observe in the logs that the new plugin version is automatically installed when running OpenCode:

INFO 2026-03-11T08:35:16 +8ms service=plugin path=opencode-handoff@latest loading plugin
INFO 2026-03-11T08:35:17 +524ms service=bun pkg=opencode-handoff cachedVersion=0.4.0 Cached version is outdated, proceeding with install
INFO 2026-03-11T08:35:17 +0ms service=bun pkg=opencode-handoff version=latest installing package using Bun's default registry resolution
INFO 2026-03-11T08:35:17 +0ms service=bun cmd=["/usr/bin/bun","add","--force","--exact","--no-cache","--cwd","/home/loherj/.cache/opencode","opencode-handoff@latest"] cwd=/home/loherj/.cache/opencode running
INFO 2026-03-11T08:35:17 +293ms service=bun code=0 stdout= stderr= done

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@github-actions

github-actions Bot commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Based on the search results, I found one potentially related PR:

fix(bun): use direct npm registry fetch for plugin @latest update checks (#16609)

This PR appears related because it addresses similar issues around plugin version checking and @latest updates (PR #16998 fixes issue #16608, which this PR addresses). Both PRs are working on the plugin version update mechanism and the isOutdated check functionality.

However, the current PR (#16998) is the main fix for the root cause (reading stdout/stderr before process exit), while #16609 may be an alternative or related approach. You may want to review these together to ensure they don't conflict.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ghost91-
ghost91- force-pushed the fix-automatic-plugin-updates branch from 1fc55bd to 59d7896 Compare March 11, 2026 08:45
@unfrgivn

unfrgivn commented Mar 11, 2026

Copy link
Copy Markdown

Confirmed working for me. My plugins that are not pinned are now updating ~/.cache/opencode/package.json to the latest version in the bun registry when restarting Opencode.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ghost91-
ghost91- force-pushed the fix-automatic-plugin-updates branch 3 times, most recently from edd2885 to 7c839e2 Compare March 11, 2026 17:16
@ghost91-
fix(core): read stdout and stderr in PackageRegistry.info before wait…
ed4213e
…ing for the process to exit

The previous implementation waited for the process to exit first, which resulted in empty stdout and stderr.
Subsequently, this caused the PackageRegistry.isOutdated check to always return false and log
"Failed to resolve latest version, using cached".

Fixes anomalyco#16608
Fixes anomalyco#10546
Fixes anomalyco#15673
@ghost91-
ghost91- force-pushed the fix-automatic-plugin-updates branch from 7c839e2 to ed4213e Compare March 11, 2026 17:48
@rekram1-node

rekram1-node commented Mar 11, 2026

Copy link
Copy Markdown
Member

same test failures are occuring in dev currently, don't appear to be related.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rekram1-node
rekram1-node merged commit 2aae0d3 into anomalyco:dev Mar 11, 2026
6 of 8 checks passed

Uh oh!

There was an error while loading. Please reload this page.

demostanis pushed a commit to demostanis/opencode that referenced this pull request Mar 20, 2026
@ghost91- @demostanis
fix(core): read stdout and stderr in PackageRegistry.info before wait…
d827626
…ing for the process to exit (anomalyco#16998)
@OpenCodeEngineer OpenCodeEngineer mentioned this pull request Mar 31, 2026
[BUG/PERF] Severe Memory Leak and Disk Swell leading to System Kernel Panic (macOS) #12687
Closed
@mikij mikij mentioned this pull request Apr 1, 2026
[Discussion]: CLI upgrade full support for Opencode/Kilocode mksglu/context-mode#208
Closed
@coleleavitt coleleavitt mentioned this pull request Apr 21, 2026
fix/memory 20695 coleleavitt/opencode#5
Merged
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request May 5, 2026
@ghost91-
fix(core): read stdout and stderr in PackageRegistry.info before wait…
0533725
…ing for the process to exit (anomalyco#16998)
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
@ghost91-
fix(core): read stdout and stderr in PackageRegistry.info before wait…
2b794f7
…ing for the process to exit (anomalyco#16998)
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request Jun 14, 2026
@ghost91-
fix(core): read stdout and stderr in PackageRegistry.info before wait…
7288e2b
…ing for the process to exit (anomalyco#16998)
MarsQiu007 referenced this pull request in MarsQiu007/openNovel Jul 31, 2026
@ghost91-
fix(core): read stdout and stderr in PackageRegistry.info before wait…
eb2fcd6
…ing for the process to exit (#16998)
algomaster99 added a commit to chains-project/yul that referenced this pull request Sep 22, 2026
@algomaster99 @claude
docs: add opencode-yul update workaround note
5ec7312
OpenCode's own auto-update-on-@latest doesn't reliably work as of
[email protected] (anomalyco/opencode#16998), confirmed by direct
testing. Documents the manual cache-clear workaround until that lands.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
algomaster99 added a commit to chains-project/yul that referenced this pull request Sep 22, 2026
@algomaster99 @claude
docs: add opencode-yul update workaround note
8117b02
OpenCode's own auto-update-on-@latest doesn't reliably work as of
[email protected] (anomalyco/opencode#16998), confirmed by direct
testing. Documents the manual cache-clear workaround until that lands.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Plugins configured with @latest never auto-update: bun registry cache + stale isOutdated check [bug] Plugin 'oh-my-opencode' fails to auto-update via bun, causing persistent '[config-context]' warnings Plugin updates: No way to get latest version after initial install

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@ghost91- @unfrgivn @rekram1-node
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.