Permission request failure in cursor terminal

I am writing some swift codes with composer agent.
These codes would request access to calendar, reminders.
so, after running in iterm2 terminal

swift run

I was prompted to allow access request, which was correct.

However, in cursor terminal(both zsh and powershell), and in composer agent mode, I didn’t see any prompt for “allowing access”, which result in running failure.

Is there anyway to make this work? So the composer agent could continue auto run/debug?