anomalyco / anomalyco/opencode

fix(tui): persist plugin activation choices

Open
#42,417 0 comments 0 reactions 1 assignee View on GitHub

@kitlangton is already working on this.

Since Aug 13, 2026.

tui
Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Problem

In the V2 TUI, /plugins currently mutates only the running registration. Editing any plugin source triggers reconciliation from config, which can re-enable unrelated plugins that the user manually disabled. The choice also does not survive a TUI restart.

Desired Behavior

A plugin disabled through /plugins remains disabled when:

  • another plugin source reloads;
  • its own source reloads;
  • the TUI restarts.

Enabling it again should remove or replace that durable preference without disturbing its package declaration or options.

Design Question

Choose a durable config representation. The simplest candidate for declared external plugins is:

{
  "package": "/path/to/plugin.ts",
  "enabled": false,
  "options": {}
}

Built-ins and auto-discovered plugins still require an ID-based override or another explicit representation because they have no package declaration.

PR #42410 demonstrates the bug, regression coverage, and an initial ordered-directive implementation. Finalize the config model before merging.

Acceptance Criteria

  • Activation choice is durable and config-backed.
  • Unrelated hot reload does not reactivate disabled plugins.
  • Package paths and options remain intact.
  • Built-in and discovered plugin behavior is explicit.
  • Reload and restart behavior have regression coverage.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.