How can I get the Agent to restart the type server?

Hi Everyone,

Loving the cursor agent capabilities, and am able to do increasingly large features in essentially one request.

That said, I’ve run into an issue that I don’t know how to address. I’ve got a Typescript Next.js 15 application that uses Prisma as the ORM. I want to have the agent build a feature that involved creating and running a migration in Prisma, creating an API endpoint, and the front-end UX. We’ve got details rules files, and the code creation works well.

The problem occurs when the Prisma migration has run, and the corresponding Prisma Typescript files have been updated. At this point, the type server (LSP) running in Cursor has cached the pre-migration types, and needs to update. I can do this manually through a command palette command (Typescript: Restart TS Server), but when I tell the agent to restart the type server it doesn’t seem to be able to do it. Is there a recommended way to have the agent restart the type server? Or run palette commands more generally?

Any guidance would be appreciated.

Best,

Peter

I have the exact same tech stack and exact same problem with Prisma types regeneration.

And I solve them the same way manually, but didn’t think about any solution yet.

Just found that Prisma guys know about the issue

And good news is that they will try to solve that in 3 upcoming months (link to their roadmap in the end of that discussion)