Request: Hooks support (post-edit, pre-edit, etc...)

Hey all - was wondering if there are any plans to support something like Hooks - Anthropic in Claude Code?

I’ve been building an extension to git blame that lets enterprises track the code in their repositories that was generated by AI vs Humans. It needs to be triggered after your fast apply step runs and a few of the early users have been asking me for Cursor support. I tried building a VSCode extension but none of the Cursor specific events seem accessible.

Hooks would go a long way towards this (and other) use cases.

Here’s an example of what they do with Claude Code

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Write|Edit|MultiEdit",
        "hooks": [
          {
            "type": "command",
            "command": "git-ai checkpoint"
          }
        ]
      }
    ],
    "PostToolUse": [
      {
        "matcher": "Write|Edit|MultiEdit",
        "hooks": [
          {
            "type": "command",
            "command": "git-ai checkpoint --author \"Claude Code\""
          }
        ]
      }
    ]
  }
}
8 Likes

I love this request! We need this in Cursor!

1 Like

+1 love this.

1 Like

+1, would really love to define custom hooks that either run code or send a request to a model with a predefined prompt. I love the way the new Kiro IDE does hooks - Hooks - Docs - Kiro

if you guys could clone this into cursor, that would be fantastic!

1 Like

Fully support this request. Depending on the AI model, it’s common to re-trigger certain actions, especially around code edits or session resets. Having hooks would make it much easier to automatically run tests across the entire codebase or implement custom logic to save tokens and reduce redundant operations. This would unlock a lot of flexibility for more advanced workflows.

+1 there are a ton of uses for this.