Introduction
Dvelopment environment and configuration might influence command execution in the terminal. VS Code and JetBrains IDEs have certain limitations and compatibility issues with terminals on different operating systems. This might cause issues like not being able to invoke terminal commands or get results when you using the Lingma Agent mode.
VS Code
Common troubleshooting methods
The Lingma plugin in VS Code relies on the VS Code Shell integration API to xecute terminal commands and read their outputs. This API is a new feature in VS Code version 1.93 and currently only supports the following types of shells.
Ensure your VS Code version is greater than 1.93 and that your default terminal is one of the following:
-
Linux/macOS: bash, fish, pwsh, zsh
-
Windows: Git Bash, pwsh
If you encounter terminal execution exceptions, try the following methods:
Method 1: Upgrade VS Code
Check your VS Code version and ensure it's 1.93 or above:
-
Open VS Code.
-
Press
Cmd + Shift + P(Mac) orCtrl + Shift + P(Windows/Linux). -
Type
Code: Check for Updates, and then select it. -
Restart VS Code after the update is complete.
Method 2: Configure a supported VS Code shell
-
Open VS Code.
-
Press
Cmd + Shift + P(Mac) orCtrl + Shift + P(Windows/Linux). -
Type
Terminal: Select Default Profile, and then select it. -
Choose a supported shell:
-
Linux/macOS: bash, fish, pwsh, zsh
-
Windows: Git Bash, pwsh
-
-
Exit VS Code, and reopen it.
Method 3: Manually install shell integration
If you still encounter issues with the steps above, manually install shell integration.
For example,
-
zsh:
-
Add the following line to your
~/.zshrcfile:[[ "$TERM_PROGRAM" == "vscode" ]] && . "$(code --locate-shell-integration-path zsh)" -
Save the file.
-
Exit VS Code, and reopen it.
-
-
Bash (
~/.bashrc):
[[ "$TERM_PROGRAM" == "vscode" ]] && . "$(code --locate-shell-integration-path bash)"
-
PowerShell (
$Profile):
if ($env:TERM_PROGRAM -eq "vscode") { . "$(code --locate-shell-integration-path pwsh)" }
-
Fish (
~/.config/fish/config.fish):
string match -q "$TERM_PROGRAM" "vscode"; and . (code --locate-shell-integration-path fish)
-
If you use other shells, see Manual installation of Shell integration.
Still having issues?
If you still can't get terminal output after trying the methods above, click Stop Terminal to close the terminal window. Then, run the command again. This will reset the terminal connection and should fix the problem.
Windows
Git Bash
Git Bash provides a Unix-like command line experience on Windows. To use Git Bash, you need to:
-
Download and run the Git for Windows installer from https://git-scm.com/downloads/win.
-
Exit and reopen VS Code.
-
Press
Ctrl + Shift + Pto open the command palette. -
Type
Terminal: Select Default Profile, then select it. -
Choose Git Bash.
PowerShell
Make sure your powershell version is updated to versions later than 7.
-
Check your current PowerShell version by running the command:
$PSVersionTable.PSVersion -
If your version is lower than 7, update PowerShell.
By default, PowerShell restricts script execution for security reasons. To change the setting:
-
Open PowerShell as an administrator: Press
Win + Xand select Windows PowerShell (Administrator) or Windows Terminal (Administrator). -
Check the current execution policy by running the command:
Get-ExecutionPolicy-
If the output is already
RemoteSigned,Unrestricted, orBypass, you might not need to change the execution policy. These policies should allow shell integration to work properly. -
If the output is
RestrictedorAllSigned, change the policy to enable shell integration.
-
-
Change the execution policy by running the command:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUserThis will set the
RemoteSignedpolicy only for the current user, which is safer than a system-wide change. -
Confirm the change: Type
Yat the prompt and press Enter. -
Verify the policy change: Run
Get-ExecutionPolicyagain to confirm the new setting. -
Restart VS Code and try shell integration again.
WSL
If you use WSL, try adding . "$(code --locate-shell-integration-path bash)" to your ~/.bashrc file, then restart and try again.
Other exceptions
Terminal output exceptions
If you see abnormal output with rectangles, lines, escape sequences, or control characters, it might be related to terminal customization tools. Common causes include zsh themes like: Powerlevel10k, Oh My Zsh, fish shell, etc.
How to troubleshoot:
-
Temporarily disable these tools in your shell configuration file (for example, the
~/.zshrcfile for zsh). -
If the problem is resolved, gradually re-enable features to identify the conflicting tool.
For example, if you use Powerlevel10k in zsh, disable it by commenting out the relevant lines in your ~/.zshrc file:
# Comment out the source line for Powerlevel10k
# source /path/to/powerlevel10k/powerlevel10k.zsh-theme
If the problem can be fixed by disabling these themes, you might need to find other VS Code shell integration configuration.
JetBrains IDEs
The Lingma plugin does not currently support the new terminal (Beta) available in the new UI starting from the 2024.1 version of the IDEs.

To disable the new terminal:
-
Method 1: In Settings or Preferences, open Tools - Terminal - Enable New Terminal and uncheck the new terminal option.
-
Method 2: In the Terminal window title, click the
icon and uncheck Enable New Terminal.
Contact us
Contact us if you still can't solve your problem after checking the solutions in this document.