[PR #4411] feat(plugin commands): allows for code execution on plugin registered slash commands #10963

Closed
opened 2026-02-16 18:15:44 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/4411

State: closed
Merged: No


This PR adds a powerful new plugin hook to opencode making it possible to run plugins through custom /commands registered by the plugin itself allowing for code execution

needs sdk rebuild to test

cd packages/sdk/js
bun run script/build.ts

As a proof of concept, this PR allowed me to create a plugin with a "/prune" command that prunes all tool outputs from the session

This could also allow to turn a plugin on/off, create composable workflows and many more things i'm sure

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/4411 **State:** closed **Merged:** No --- This PR adds a powerful new plugin hook to opencode making it possible to run plugins through custom /commands registered by the plugin itself allowing for code execution needs sdk rebuild to test ```bash cd packages/sdk/js bun run script/build.ts ``` As a proof of concept, this PR allowed me to create a plugin with a "/prune" command that prunes all tool outputs from the session This could also allow to turn a plugin on/off, create composable workflows and many more things i'm sure
yindo added the pull-request label 2026-02-16 18:15:44 -05:00
yindo closed this issue 2026-02-16 18:15:44 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10963