Cursor Terminal unable to run apps that send Apple events

I use the bbedit editor, which comes with a command line tool to open files in it. Running bbedit {filename} produces the following error:

You must allow the application which is running `bbedit` to send events to the BBEdit application.
Please make appropriate changes in your Security & Privacy system preferences,
or contact your terminal/IDE application's developer for assistance.
bbedit: error: -1743

If I understand correctly, cursor needs to add some metadata to its bundle to allow the com.apple.security.automation.apple-events entitlement. Once you’ve done this, running bbedit will prompt for permission to send these events. Here is the same issue on another terminal app along with the commit that they used to fix it: [macOS] unable to run AppleScript-based command line integrations · Issue #9858 · Eugeny/tabby · GitHub