Skip to content

TUI crash: PluginProvider is missing #50415

Closed

Description

@cauezinho2008

Description

The OpenCode TUI crashed with an unexpected error.

Error: PluginProvider is missing

Stack trace:

Error: PluginProvider is missing
    at sa (/$bunfs/root/chunk-6txf3e31.js:2593:2804)
    at Uc (/$bunfs/root/chunk-ts4c6vn7.js:4:248)
    at Jr (/$bunfs/root/chunk-676c10m3.js:2:8343)
    at children (/$bunfs/root/chunk-6txf3e31.js:2590:119831)
    at <anonymous> (/$bunfs/root/chunk-676c10m3.js:2:16042)
    at rA (/$bunfs/root/chunk-676c10m3.js:2:11375)
    at Ye (/$bunfs/root/chunk-676c10m3.js:2:11151)
    at c (/$bunfs/root/chunk-676c10m3.js:2:5460)
    at Pe (/$bunfs/root/chunk-676c10m3.js:2:9648)
    at Jr (/$bunfs/root/chunk-676c10m3.js:2:8343)

Plugins

No response

OpenCode version

2.0.8

Steps to reproduce

Reported automatically from the OpenCode crash screen. If you can, describe what you were doing when it crashed.

Screenshot and/or share link

No response

Operating System

Linux 7.2.6-1-cachyos (x64)

Terminal

xterm-kitty

Activity

  1. cauezinho2008 commented on Sep 21, 2026

    @cauezinho2008
    Author

    happened when i tried to ask using /btw

  2. 1994rstefan commented on Sep 23, 2026

    @1994rstefan

    Seems to be a duplicate of #49777.

    Fixed in 2.0.9 thx

  3. brettanthonysjoberg179-lab commented on Sep 27, 2026

    @brettanthonysjoberg179-lab

    This is a duplicate of #49777 (tui: /btw crashes when rendering answer dialog), which was closed as fixed in 2.0.9. Suggest closing this one as a duplicate.

    Adding root-cause details and a new environment data point (Linux, and notably zero plugins configured), which isn't yet covered by the existing confirmations in #49777 (those are macOS x2 and Windows).

    Environment

    • opencode version: 2.0.8
    • OS: Linux 6.6.141-09476-g954adab60416 (linux x64)
    • Terminal: TERM=xterm-256color, no COLORTERM / TERM_PROGRAM set
    • Shell: /bin/bash
    • Install/channel: latest release
    • Active plugins: none

    Reproduction

    1. Open an existing session in the TUI.
    2. Run /btw <question> (or /btw and answer the prompt).
    3. When the answer is rendered, the TUI crashes.

    Not currently able to confirm consistency across repeated runs, since I'm on 2.0.8 and expect to upgrade first.

    Actual Behavior

    Error: PluginProvider is missing
        at sa (/$bunfs/root/chunk-vbstx86m.js:2593:2804)
        at Uc (/$bunfs/root/chunk-x0cbprj9.js:4:248)
        at Jr (/$bunfs/root/chunk-zr6pz3ag.js:2:7348)
        at children (/$bunfs/root/chunk-vbstx86m.js:2590:118420)
        ...
    

    Same offsets as #49790 and #50415's other reports — only the chunk hash differs per build.

    Root cause, from the shipped bundle

    I extracted the relevant code from the 2.0.8 binary. The throw site is the PluginProvider context accessor:

    function sa(){let t=Xn(ZW);if(!t)throw Error("PluginProvider is missing");return t}

    The frame directly beneath it, Uc, is the /btw answer dialog. Note that it calls the accessor unconditionally at the top of the component body, before any plugin-conditional logic:

    function Uc(t){let r=Je(),o=Vt(),i=QH(),u=sa(),l=He("elevated"),m=He("overlay"),h=Zn().currentSyntax,
      p=Ct().data,D=et(),b=c(()=>Math.max(3,Math.floor(D().height/2))),[x,w]=v(!1),...

    Because the read happens during component setup rather than inside a lazy computation, the dialog throws on render whether or not any plugin is installed. This is consistent with the diagnosis in #49777 that PluginProvider is mounted beneath DialogProvider while dialogs render outside that subtree.

    There are 11 call sites of this accessor in the TUI bundle; any of them mounted outside the provider would fail the same way, so this may affect more surfaces than /btw alone.

    Note on the "Active plugins" field

    Worth calling out for triage: the crash screen / auto-report doesn't capture plugin state, which makes this look like a plugin bug. It isn't. I reproduced it with no plugins configured at all — no plugin key in opencode.jsonc, and no .opencode/plugin/ or .opencode/plugins/ directory. PluginProvider here is internal to opencode, not something a user installs.

  4. neriousy commented on Oct 20, 2026

    @neriousy
    Member

    Thanks for the report. The /btw answer dialog now receives its markdown renderer without accessing the missing plugin context, fixing this crash. I'm closing this; if it comes back on the latest v2, please open a new issue with your version and steps.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions