Disable cursor cli opening new terminal

Every time I use the Cursor CLI, it opens a new terminal window after the first prompt. I have to close it manually, but then in another second a new one shows up. Why is this happening?

Hey, I’ll need a bit more info to understand what’s going on:

  1. Your OS and Cursor version, plus the CLI version if you know it. Run cursor-agent --version.
  2. What exactly do you mean by Cursor CLI. Are you running cursor-agent in a terminal, or using the cursor command to open the IDE?
  3. What kind of window opens. A new OS terminal window cmd.exe or pwsh or Terminal.app, a new tab or panel inside the IDE, or a new Cursor IDE window? A screenshot or short recording would help a lot.

If you’re on Windows and you see cmd.exe or pwsh.exe windows popping up on every agent request, it sounds like a known issue from this thread: Multiple cmd.exe windows popping up on every AI request (Windows). Check if your symptoms match.

Ok i think i figured it out. i had a cmux hook which was added to auto resume sessions on restart. i deleted those hooks and works fine now

Hey, glad you figured it out, and thanks for sharing the fix. It’ll help other users who run into similar behavior because of cmux hooks.

I’m closing this thread as resolved. If anything else comes up, please open a new one.