Try this first: background execution mode
The simplest fix for most terminal issues is switching to background execution mode.
Background execution mode runs commands in a separate process instead of VS Code’s integrated terminal, bypassing most shell integration issues.
VS Code integrated terminal fixes
If you need to use VS Code’s integrated terminal, try the following fixes.Shell integration not working
Shell integration not working
Shell integration allows Cline to capture command output from the terminal. If it isn’t working, verify that it is enabled in VS Code.
- Open VS Code Settings (
Cmd/Ctrl + ,). - Search for
terminal.integrated.shellIntegration.enabled. - Make sure the setting is enabled.
- Close and reopen the terminal.
- In Cline, click Settings > Terminal Settings.
- Set Shell integration timeout (seconds) to
10.
Commands not being captured
Commands not being captured
If Cline runs commands but doesn’t capture their output, try switching the default shell to bash:
- In Cline, click Settings > Terminal Settings.
- Under Default Terminal Profile, select bash from the dropdown.
Terminal reuse causing stale state
Terminal reuse causing stale state
Aggressive terminal reuse can cause commands to run in shells with stale environment state.
- In Cline, click Settings > Terminal Settings.
- Find Enable aggressive terminal reuse and uncheck it.
PATH issues — commands not found
PATH issues — commands not found
If Cline can’t find commands that work in a regular terminal, your shell’s
PATH may not be set correctly in the VS Code environment.- On macOS, VS Code may not source your full shell profile. Add the necessary paths to your
~/.zshrcor~/.bashrc, then restart VS Code. - On Windows, confirm that the directory containing your tool is included in the system
PATHenvironment variable. - On Linux, check that your shell profile (
.bashrc,.profile,.zshrc) exports the correctPATH.
Platform-specific fixes
macOS with Oh My Zsh
macOS with Oh My Zsh
Oh My Zsh can slow down or break shell integration in VS Code. Create a minimal config file for VS Code terminals:If issues persist, consider switching the Default Terminal Profile in Cline settings to bash.
Windows PowerShell
Windows PowerShell
PowerShell’s default execution policy may block shell integration scripts. Run the following command as Administrator:After applying, restart VS Code and open a new terminal.
Windows Subsystem for Linux (WSL)
Windows Subsystem for Linux (WSL)
When using WSL, follow these steps for reliable shell integration:
- Open your project folder from within WSL by running
code .in the WSL terminal. - In Cline Settings > Terminal Settings, set Default Terminal Profile to WSL Bash.
- Set Shell integration timeout (seconds) to
15to account for WSL startup time.
Fish shell
Fish shell
Fish shell uses a different syntax than bash or zsh, which can cause compatibility issues with shell integration scripts.
- Switch the Default Terminal Profile in Cline settings to bash or zsh.
- Alternatively, switch to background execution mode, which does not rely on shell integration.