# Disable cursor cli opening new terminal

**URL:** <https://forum.cursor.com/t/disable-cursor-cli-opening-new-terminal/161246>\
**Category:** Help\
**Tags:** terminal, cli\
**Created:** [May 21, 2026, 4:14pm UTC](https://forum.cursor.com/t/disable-cursor-cli-opening-new-terminal/161246 "2026-05-21T16:14:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sedghi](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/sedghi/32/16782_2.png) [@sedghi](https://forum.cursor.com/u/sedghi)\
**Post date:** [May 21, 2026, 4:14pm UTC](https://forum.cursor.com/t/disable-cursor-cli-opening-new-terminal/161246/1 "2026-05-21T16:14:25Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [May 23, 2026, 5:40pm UTC](https://forum.cursor.com/t/disable-cursor-cli-opening-new-terminal/161246/5 "2026-05-23T17:40:48Z")

</div>

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)](https://forum.cursor.com/t/multiple-cmd-exe-windows-popping-up-on-every-ai-request-windows/156575). Check if your symptoms match.

---

<div class="post-metadata">

**Author:** ![sedghi](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/sedghi/32/16782_2.png) [@sedghi](https://forum.cursor.com/u/sedghi)\
**Post date:** [May 26, 2026, 2:28am UTC](https://forum.cursor.com/t/disable-cursor-cli-opening-new-terminal/161246/6 "2026-05-26T02:28:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [May 26, 2026, 5:51am UTC](https://forum.cursor.com/t/disable-cursor-cli-opening-new-terminal/161246/8 "2026-05-26T05:51:46Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [May 28, 2026, 5:52am UTC](https://forum.cursor.com/t/disable-cursor-cli-opening-new-terminal/161246/9 "2026-05-28T05:52:41Z")

</div>

Closed on May 28, 2026, 5:52am UTC

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
