Skip to content

OpenCode Desktop shows oh-my-openagent as loaded, but only native build/plan modes are available #5025

Closed

Description

@zhangfeili321

Summary

On Windows OpenCode Desktop, [email protected] appears as loaded/registered in the plugin UI, but its features are not actually available. The desktop app only shows the native OpenCode modes:

  • build
  • plan

The plugin is therefore visible at the registration/UI level, but its internal initialization fails before oh-my-openagent can register its agents, modes, commands, and tools.

Environment

  • OS: Windows
  • Client: OpenCode Desktop
  • Plugin: [email protected]
  • Config root: C:\Users\Administrator\.config\opencode
  • Data root: C:\Users\Administrator\.local\share\opencode
  • Plugin config: C:\Users\Administrator\.config\opencode\oh-my-openagent.json
  • Main config: C:\Users\Administrator\.config\opencode\opencode.json
  • MCP: local wiki-kb MCP server

Expected Behavior

After starting OpenCode Desktop, oh-my-openagent should not only appear as loaded in the plugin UI, but should also expose its expected runtime functionality, including additional agents, modes, commands, and oh-my-openagent-specific capabilities.

Actual Behavior

OpenCode Desktop shows oh-my-openagent as loaded/registered, but only the native OpenCode modes are available:

build
plan

No oh-my-openagent functionality appears in the UI.

Key Logs

The decisive error was found in:

C:\Users\Administrator\.local\share\opencode\log

Relevant log:

ERROR service=plugin [email protected] error=Runtime skill source server requires Bun.serve failed to load plugin

Earlier during investigation, there were also cache integrity errors such as:

ENOENT ... packages\shared-skills\skills\frontend-ui-ux\SKILL.md
ENOENT ... packages\shared-skills\skills\debugging\SKILL.md

Those were fixed separately, but the final root cause of the “loaded but only build/plan” behavior was the Bun.serve runtime failure.

Root Cause

[email protected] enables the following runtime skills by default:

security-research
security-review

These runtime skills start a runtime skill source server. That server requires:

Bun.serve

However, OpenCode Desktop loads the plugin in an environment where globalThis.Bun is not available. As a result, the runtime skill source server throws:

Runtime skill source server requires Bun.serve

This causes the plugin’s internal initialization to fail.

The result is a confusing partial-load state:

Plugin entry is registered
Desktop UI shows oh-my-openagent as loaded
Plugin initialization fails internally
oh-my-openagent capabilities are not registered
Only native build/plan modes remain available

Confirmed Non-Root Causes

MCP was not the root cause

The local wiki-kb MCP server was temporarily disabled in opencode.json, but the problem still reproduced. MCP was later re-enabled successfully after the plugin issue was fixed.

Plugin registration was not the root cause

opencode.json correctly contained:

"plugin": [
  "[email protected]"
]

The desktop UI also showed the plugin as loaded/registered.

Installing Bun alone was not sufficient

Bun was installed and BUN_BINARY was configured, but OpenCode Desktop’s plugin load path still did not provide globalThis.Bun, so the runtime skill source server still failed.

Workaround / Fix

Disable the two runtime skills that trigger the Bun.serve dependency.

In:

C:\Users\Administrator\.config\opencode\oh-my-openagent.json

add:

"disabled_skills": [
  "security-research",
  "security-review"
]

Example:

{
  "$schema": "https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/dev/assets/oh-my-opencode.schema.json",
  "disabled_skills": [
    "security-research",
    "security-review"
  ]
}

If the file already contains agents, categories, backgroundTask, or other settings, keep them and only add the disabled_skills field.

Additional Issues Fixed During Investigation

Broken data directory junction

C:\Users\Administrator\.local\share\opencode was a Windows Junction pointing to:

E:\program\opencode-data\home\.local\share\opencode

The target directory did not exist, causing:

ENOENT: no such file or directory, mkdir 'C:\Users\Administrator\.local\share\opencode'

Creating the target directory fixed the startup path error.

Incomplete plugin cache

The cached [email protected] package was missing some files under packages/shared-skills/skills.

The missing files were restored by syncing shared-skills from the complete [email protected] cache package.

These were secondary blockers. The final functional failure was still caused by the Bun.serve runtime skill source server.

Verification

After adding:

"disabled_skills": [
  "security-research",
  "security-review"
]

and fully restarting OpenCode Desktop:

  • oh-my-openagent still appears as loaded
  • oh-my-openagent functionality becomes available
  • the UI no longer remains limited to only build / plan
  • MCP can be re-enabled
  • npx oh-my-opencode doctor only reports:
GitHub CLI missing

This remaining warning only affects GitHub automation and does not block plugin loading.

Final Working Configuration

opencode.json:

"plugin": [
  "[email protected]"
]

oh-my-openagent.json:

"disabled_skills": [
  "security-research",
  "security-review"
]

MCP can remain enabled:

"mcp": {
  "wiki-kb": {
    "enabled": true
  }
}

Suggested Upstream Fix

oh-my-openagent should avoid hard-failing the entire plugin when Bun.serve is unavailable.

Possible fixes:

  • Detect missing globalThis.Bun and skip runtime skill source server startup
  • Degrade security-research / security-review to a warning in non-Bun runtimes
  • Provide a Node-compatible HTTP server fallback
  • Disable these runtime skills by default in OpenCode Desktop environments
  • Ensure plugin UI does not report a misleading “loaded” state when internal initialization fails

Activity

  1. code-yeongyu commented on Jun 16, 2026

    @code-yeongyu
    Owner

    [sisyphus-dev] 현재 dev 기준으로 이 이슈의 최종 원인인 Runtime skill source server requires Bun.serve fatal load 실패는 수정된 것으로 확인했습니다.

    플러그인 초기화는 runtime skill source server 생성 실패를 잡고 경고만 남긴 뒤 계속 진행하며, 테스트도 이 경우 createTools/plugin interface 생성이 계속되는 것을 고정하고 있습니다. 추가로 runtime skill source server 자체도 Bun이 없을 때 Node HTTP server fallback을 사용합니다.

    증거:

    • graceful degrade 경로:
      const runtimeSecuritySkills = selectRuntimeSecuritySkills(pluginConfig)
      let runtimeSkillSource: Awaited<ReturnType<PluginModuleDeps["createRuntimeSkillSourceServer"]>> | undefined
      if (runtimeSecuritySkills.length > 0) {
      try {
      runtimeSkillSource = await deps.createRuntimeSkillSourceServer({ skills: runtimeSecuritySkills })
      } catch (error) {
      const detail = error instanceof Error ? error.message : String(error)
      console.warn(`[runtime-skills] bundled security skill source unavailable; continuing without config.skills.urls: ${detail}`)
      }
      }
    • 회귀 테스트:
      it("#given the runtime skill source server is unavailable #then startup continues without a source URL", async () => {
      // given
      const pluginModule = createTestPluginModule()
      const consoleWarn = mock(() => {})
      const originalWarn = console.warn
      console.warn = consoleWarn
      mockLoadPluginConfig.mockReturnValue({})
      mockCreateRuntimeSkillSourceServer.mockImplementationOnce(() => {
      throw new Error("Runtime skill source server requires Bun.serve")
      })
      try {
      // when
      await pluginModule.server({
      directory: "/tmp/project",
      client: {},
      } as Parameters<typeof pluginModule.server>[0])
      // then
      expect(mockCreateManagers.mock.calls.at(0)?.[0]?.runtimeSkillSourceUrl).toBeUndefined()
      expect(mockCreateTools).toHaveBeenCalledTimes(1)
      expect(mockCreatePluginInterface).toHaveBeenCalledTimes(1)
      expect(consoleWarn).toHaveBeenCalledWith(
      "[runtime-skills] bundled security skill source unavailable; continuing without config.skills.urls: Runtime skill source server requires Bun.serve",
      )
    • Node fallback:
      const bun = runtimeEnv.Bun
      if (!bun) {
      const server = createServer(async (request, response) => {
      try {
      const sourceUrl = new URL(request.url ?? "/", "http://127.0.0.1")
      await writeResponse(await handleRequest(new Request(sourceUrl.toString())), response)
      } catch (error) {
      response.writeHead(500, { "content-type": "text/plain; charset=utf-8" })
      response.end(error instanceof Error ? error.message : String(error))
      }
      })
    • fixing commits: d8fd5a0, 976be43

    동일 증상 재현이 있다면 새 로그로 별도 이슈를 여는 편이 좋고, 이 건은 fixed로 닫습니다.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions