Technical Question: Feasibility of Chat Message Interception in Cursor

I’m exploring the feasibility of intercepting chat messages in Cursor before they’re sent to AI models. This is a small validation test before I begin a larger project.

I’ve created a simple extension that attempts to intercept Cursor’s chat messages using several approaches:

  • Command interception

  • Network fetch/XHR interception

  • Webview monitoring

  • Keyboard input monitoring

My initial testing suggests these methods don’t reliably work. Before investing more time, I’d like to know:

  1. Is it technically possible for third-party extensions to intercept chat messages in Cursor?

  2. Are there any plans to provide official APIs for this type of extension integration?

  3. Can you recommend any alternative approaches that might be more effective?

This is an exploratory technical question rather than a feature request. I’m trying to understand the technical boundaries before starting my main project.

Thanks for any insights you can provide.