[FEATURE]: Plugin discovery should support subdirectories like agents and commands #4184

Open
opened 2026-02-16 17:42:57 -05:00 by yindo · 0 comments
Owner

Originally created by @jgordijn on GitHub (Jan 4, 2026).

Originally assigned to: @thdxr on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Description

The plugin discovery glob pattern uses {plugin,plugins}/*.{ts,js} which only finds plugins at the top level of the plugin directory. This is inconsistent with agents and commands which use ** for recursive discovery.

Current behavior:
// config.ts line 299
const PLUGIN_GLOB = new Bun.Glob("{plugin,plugins}/*.{ts,js}") // Non-recursive

Agents/Commands behavior:
const COMMAND_GLOB = new Bun.Glob("{command,commands}//*.md") // Recursive
const AGENT_GLOB = new Bun.Glob("{agent,agents}/
/*.md") // Recursive

Originally created by @jgordijn on GitHub (Jan 4, 2026). Originally assigned to: @thdxr on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request ## Description The plugin discovery glob pattern uses `{plugin,plugins}/*.{ts,js}` which only finds plugins at the top level of the plugin directory. This is inconsistent with agents and commands which use `**` for recursive discovery. **Current behavior:** // config.ts line 299 const PLUGIN_GLOB = new Bun.Glob("{plugin,plugins}/*.{ts,js}") // Non-recursive **Agents/Commands behavior:** const COMMAND_GLOB = new Bun.Glob("{command,commands}/**/*.md") // Recursive const AGENT_GLOB = new Bun.Glob("{agent,agents}/**/*.md") // Recursive
yindo added the discussion label 2026-02-16 17:42:57 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4184