GeezerVison is showing github.com — Hooks for commands (Plugin Commands) · Issue #2185 · anomalyco/opencode
Hooks for commands (Plugin Commands) #2185
Description
There should be hooks for commands. Hooks to capture the command before it's given to the LLM and after.
This way, plugin developers can utilize commands for controlling their plugin.
It would also be nice if a plugin can define commands instead of requiring commands to be always in the commands directory as a markdown file.
Reacted by Vladyslav Gudzenko, Jesse Taavola and existedinnettw
Activity
github-actions commented on Aug 22, 2025
This issue might be a duplicate of existing issues. Please check:
- Hooks support? #1473: Hooks support? - discusses adding hooks for automation, specifically wanting hooks after task completion for CI/CD workflows
- [feat] lifecycle hooks #573: [feat] lifecycle hooks - proposes comprehensive lifecycle hooks including PreToolUse, PostToolUse, and other events similar to Claude Code's hook system
- Hooks #1219: Hooks - detailed discussion about bringing Claude Code's hook functionality to opencode, with specific examples of hook types and use cases
- [feat] custom slash commands #299: [feat] custom slash commands - requests ability to create custom commands as markdown files, which overlaps with your request for plugins to define commands
- feature request: "agent.finished" plugin event #2021: feature request: "agent.finished" plugin event - specifically requests a plugin event when the agent finishes, complementing your command hook request
Feel free to ignore if none of these address your specific case.
changed the title
[-]Hooks for commands[/-] [+]Hooks for commands (Plugin Commands)[/+] on Aug 22, 2025thdxr commented on Aug 22, 2025
yep will look into this btw plugins can now hook the config function and override it. so you can insert your own custom commands
cavanaug commented on Sep 13, 2025
Fwiw. I think an interop plugin that supports the exact same Claude code hooks would go a long way in bringing folks to opencode. Many folks write automations/agents for Claude and this would give them an opportunity to leverage those within opencode. Interop/compatibility is the bridge to migration.
Reacted by Luke Ramsden, williamjvest, Agustin Rivera, Mark Van de Vyver, Bracken Spencer and Jensen
rekram1-node commented on Dec 28, 2025
[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!
Metadata
Metadata
Development
No branches or pull requestsIssue actions