Skip to content

plugins: npm/git subprocesses pop console windows on Windows during plugin install/reload #52299

Closed as not planned

Description

@rafaelsnv

Summary

When OpenCode loads or reloads plugins referenced as github:... packages, the
spawned npm install / git subprocesses each open a visible console window on
Windows. When a plugin fails to install, the server retries on a loop (~every 15s),
popping a new console window on every retry.

Environment

  • opencode version: 2.0.20
  • OS: Windows 11 (Windows_NT 10.0.26200, win32 x64)
  • Terminal: VS Code terminal (TERM_PROGRAM=vscode)
  • Shell: Git Bash (C:\Program Files\Git\usr\bin\bash.exe)
  • Install/channel: latest
  • Active plugins: @tarquinen/opencode-dcp, @wakatime/opencode-wakatime, github:rafaelsnv/opencode-handoff, github:rafaelsnv/opencode-md-table-formatter

Reproduction

  1. On Windows, configure a plugin as a github: reference, e.g. "plugins": ["github:owner/some-plugin"].
  2. Start opencode or reload the service (opencode service restart).
  3. Observe console windows flashing/popping while the plugin is installed into ~/.cache/opencode/npm/....
  4. If the plugin install fails (e.g. git dep preparation failed), a new console window pops roughly every 15 seconds as the server retries the install indefinitely.

Expected Behavior

Plugin installation subprocesses (npm, git) should not open visible console
windows on Windows — child processes should be spawned with windowsHide: true
(or equivalent), and a permanently failing plugin install should back off instead
of retrying in a tight loop.

Actual Behavior

Every install/retry spawns a subprocess that opens a console window. Observed in
the log (repeated every ~15s while a failing plugin was configured):

timestamp=... level=INFO message="cli starting" version=2.0.20 args="[\"B:\\~BUN\\bin\\npm-cli.js\",\"install\",\"--force\",\"--cache=C:\\Users\\...\\npm-cache\",...]" role=cli
timestamp=... level=ERROR message="cli process failed" cause="Cause([Fail(~effect/cli/CliError/ShowHelp: Help requested)])" role=cli
timestamp=... level=WARN message="failed to load plugin" target=github:.../opencode-supabase cause="Cause([Fail(NpmInstallFailedError (cause: Error: git dep preparation failed))])" role=server

Additional Context

  • Secondary issue visible in the same logs: the npm invocation runs through a Bun
    shim (B:\~BUN\bin\npm-cli.js) and fails immediately with ShowHelp: Help requested,
    so plugin installs appear to never actually succeed through that path (working
    loads came from an already-populated cache).
  • Workaround: reference plugins by local directory path instead of github: refs —
    local plugin loading performs no subprocess spawn and does not pop windows.

Activity

  1. github-actions commented on Sep 30, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • Please use the Bug Report template's required Description field for the bug description; the current report uses a Summary section instead.

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.


    This issue might be a duplicate of existing issues. Please check:

    • #50868: plugin-related Git subprocess opens a visible console window on Windows during update checks.

    If you believe this was flagged incorrectly, please let a maintainer know.

  2. github-actions commented on Sep 30, 2026

    @github-actions
    Contributor

    This issue has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

    Feel free to open a new issue that follows our issue templates.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions