cline icon indicating copy to clipboard operation
cline copied to clipboard

Terminal: always open a new one

Open Ranteck opened this issue 11 months ago • 4 comments

What happened?

As the title says, in vs code always open a new terminal. When start a new task this one start to reproduce and the moment when have to enter a command and then continue the flow this one open a new terminal when have to enter another command.

Steps to reproduce

  1. start a new task with several steps
  2. wait for the 1° step using the terminal
  3. continue with the task to another use in the terminal
  4. should open a new terminal if you were in another instead of root folder, reset the place

Relevant API REQUEST output

No response

Operating System

windows 11

Cline Version

3.0.12

Additional context

No response

Ranteck avatar Jan 03 '25 14:01 Ranteck

I did not have this problem on Mac, but when I switched to Windows I started having the same problem.

To fix it:

  • Press CTRL + SHIFT + P on VS Code.
  • Type & select "Terminal: Select default profile"
  • Choose "Powershell" instead of "Git bash"

Now each command Cline runs is continuous within the same terminal session.

utaysi avatar Jan 10 '25 22:01 utaysi

I have this problem on Mac now.

Assume I have 5 repositories/directories in my workspace. Assume the all have been through the 'uv venv' process and when I open (manually) any new terminal in one of the directories... it's automatically correct. The venv and the working directory are correct regardless.

If I use Cline, however, it opens a new terminal for every command. You can imagine the nightmare this causes. It's trying to install packages that don't exist; it's trying to run commands that don't exist. It will switch the directory - noticing the issue - but assume the virtual environment is correct and it's not.

Ideas?

loadingalias avatar Jan 13 '25 00:01 loadingalias

I have this problem on Mac now.

Assume I have 5 repositories/directories in my workspace. Assume the all have been through the 'uv venv' process and when I open (manually) any new terminal in one of the directories... it's automatically correct. The venv and the working directory are correct regardless.

If I use Cline, however, it opens a new terminal for every command. You can imagine the nightmare this causes. It's trying to install packages that don't exist; it's trying to run commands that don't exist. It will switch the directory - noticing the issue - but assume the virtual environment is correct and it's not.

Ideas?

I recently set the default to open Powershell instead of the Terminal, maybe do something similar but with a different terminal?

Ranteck avatar Jan 13 '25 00:01 Ranteck

@Ranteck Can you verify that this behavior still occurs in the latest version of Cline? I'm not able to reproduce the issue.

brianspierce avatar Apr 21 '25 23:04 brianspierce

Thanks for reporting! This has been consolidated into the master terminal issue #4356 which comprehensively addresses terminal management problems including opening new terminals for each command.

celestial-vault avatar Jun 22 '25 20:06 celestial-vault