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(cli): wait for plugins before `opencode api` sends its request by ssskay · Pull Request #63222 · anomalyco/opencode

Conversation

@ssskay

@ssskay ssskay commented Nov 11, 2026 •
edited by opencodejr Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #63221

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

  • Wait for plugins in opencode api before sending the request, the same way models and debug agents already do with waitForPlugins.
  • Fixes opencode --standalone api get /api/skill returning an empty or partial list.

How did you verify your code works?

  • One skill in ~/.config/opencode/skills, opencode --standalone api get /api/skill run 20 times on each checkout: dev gave 5 empty lists and 15 with only the built-in opencode skill; with this change all 20 include the user skill.
  • bun typecheck (packages/cli): passed
  • Pre-push bun run check: passed

Screenshots / recordings

CLI only, no UI change.

Checklist

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

Related: #57524, #62569, #62796

I used Claude to find and test this.


Added by the opencode bot (AI-generated).

Related: #63145, #54654, #57524

Sorry, something went wrong.

Uh oh!

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

All reactions
@ssskay @claude
fix(cli): wait for plugins before opencode api sends its request
3cf0f70
A fresh or cold location lists no skills, agents or other plugin-provided
entries until its plugins activate. Since the server stopped waiting for
plugins in request handlers, one-shot clients wait on their side, but
`opencode api` did not, so `opencode --standalone api get /api/skill`
returned an empty or partial list. Wait the same way `models` and
`debug agents` do.

Fixes anomalyco#63221

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WnrhXFVMR94rBauXDQxjrY
opencodejr[bot]
opencodejr Bot reviewed Nov 11, 2026
View reviewed changes

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix works and is a minimal, sound change. I ran the reproduction script from #63221 from source on each checkout, 6 runs each. On the base, the user skill never appeared: 2 runs returned an empty list and 4 listed only the built-in skills. With this change, all 6 runs listed it. tsc -b in packages/cli passes. Of the nearby CLI tests, the only failure (the standalone owner-kill test timing out) also fails on the base.

The change uses the same waitForPlugins call as models.ts. If plugin startup is slow it waits at most 5s. If the plugin check itself errors, the error is ignored and the request still goes out right away, so an unreachable server isn't held up.

Public API: unchanged.

One small limitation, which doesn't block this fix: the wait always uses process.cwd(). A request that targets a different directory through location[directory] can still read that location before its plugins load, as in #63145.

Related: #63145, #54654, #57524

Sorry, something went wrong.

Uh oh!

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

All reactions
@opencodejr opencodejr Bot mentioned this pull request Nov 27, 2026
cli: --standalone returns empty model and provider lists since 2.4.0 #66777
Open

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@opencodejr opencodejr[bot] opencodejr[bot] left review comments

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.

cli: opencode api reads before plugins load, so --standalone api get /api/skill returns empty or partial lists

Uh oh!

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

1 participant

@ssskay
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.