Skip to content

[FEATURE:] Add configurable hooks for custom commands on task events (similar to Claude Code) #7640

Closed

Description

@Decade-qiu

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

I would like to request support for configurable hooks, similar to the Hooks feature in Claude Code: https://code.claude.com/docs/en/hooks.

Hooks would allow users to define custom commands/scripts that automatically execute at specific points during a task's lifecycle, such as:

  • On successful task completion (e.g., run a notification script, trigger a deployment, or perform cleanup)
  • On task error/failure (e.g., send an alert, log details to an external service, or attempt automatic recovery)
  • When user confirmation is required (e.g., pause execution and run a custom command to prompt the user via another tool/integration)
  • more ......

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Jan 10, 2026
  2. github-actions commented on Jan 10, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of or closely related to existing issues. Please check:

    While #2185 is more specific to plugin command hooks, #7640 appears to be a broader feature request for task lifecycle hooks (like Claude Code's implementation). These two issues could potentially be consolidated or addressed as part of a comprehensive hooks system.

  3. Decade-qiu commented on Jan 11, 2026

    @Decade-qiu
    Author

    I've implemented this feature using OpenCode's plugin system. My plugin opencode-message-notify (https://github.com/Decade-qiu/opencode-message-notify) provides hooks for:

    • Task completion - Sends detailed Agent messages
    • Permission requests - Notifies when confirmation is required
    • Usage statistics - Tracks cost, tokens, cache usage
    • iOS notifications - Via Bark app

    Moreover, plugin docs lack detailed explanations of event types and input (output) types. I had to log events during development to understand what data was available. It would be helpful to document key events with their input/output types and field meanings more clearly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

discussionUsed for feature requests, proposals, ideas, etc. Open discussion

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions