Skip to content

fix(desktop): plugin agents missing from agent picker#30532

Draft
deantee wants to merge 1 commit into
anomalyco:devfrom
deantee:fix/desktop-show-custom-agents
Draft

fix(desktop): plugin agents missing from agent picker#30532
deantee wants to merge 1 commit into
anomalyco:devfrom
deantee:fix/desktop-show-custom-agents

Conversation

@deantee
Copy link
Copy Markdown

@deantee deantee commented Jun 3, 2026

Issue for this PR

Closes #30525

Type of change

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

What does this PR do?

Two bugs caused plugin agents to not appear in the Desktop picker:

  1. child-store set agent[] once via ensureQueryData - stale cache returned immediately, refetch result discarded. path/lsp/mcp/provider all use reactive useQuery getters; agent didn't. Fixed with agentsQuery=useQuery(queryOptions.agents(key)).

  2. Desktop sidecar runs the server as Node.js in Electron utilityProcess. Plugins using Bun.serve (oh-my-openagent >=4.7) throw at init, never register agents. When bun and opencode source are found, sidecar now spawns bun serve and waits for "server listening". Packaged builds fall back to Node.js bundle.

How did you verify your code works?

Ran bun run --cwd packages/desktop dev with oh-my-openagent@latest. The four OMO primary agents now appear in the picker. Previously only build and plan appeared.

Screenshots / recordings

Before:

image

After:

image

Checklist

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

child-store agent[] was set once via ensureQueryData, never
reactive. path/lsp/mcp/provider all use useQuery getters; agent
didn't. Fixed.

Desktop sidecar runs server as Node.js in Electron
utilityProcess. Plugins using Bun.serve (oh-my-openagent >=4.7) throw
at load time. When bun and opencode src are found, sidecar spawns bun
serve instead. Production packaged builds fall back to Node.js bundle
(partial fix).

Closes anomalyco#30525
@deantee deantee requested a review from adamdotdevin as a code owner June 3, 2026 08:49
@deantee deantee marked this pull request as draft June 3, 2026 09:23
@deantee
Copy link
Copy Markdown
Author

deantee commented Jun 3, 2026

Bug 2 (sidecar/Bun.serve) only works in dev builds where the opencode source tree is present. Working on extending it to packaged builds before marking ready.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Desktop agent picker doesn't show plugin-registered agents

1 participant