-
Notifications
You must be signed in to change notification settings - Fork 66
Troubleshooting terminal issues
- What is Shell Integration?
- How to Fix "Shell Integration Unavailable"
- Additional Troubleshooting for Windows PowerShell Users
- Still Having Trouble?
- Unusual Terminal Output
- Support
Shell integration is a new feature in VSCode 1.93 that allows extensions like Claude Coder to run commands in your terminal and read their output. Command output allows Claude to react to the result of the command on his own, without you having to handhold by copy-pasting the output in yourself. It's also quite powerful when running development servers as it allows Claude to fix errors as the server logs them.
First, make sure you're using the latest version of VSCode or Cursor:
- Open VSCode or Cursor
- Press
Cmd + Shift + P
(Mac) orCtrl + Shift + P
(Windows/Linux) - Type "Check for Updates" (VSCode) or "Attempt Update" (Cursor) and select it
- Restart VSCode/Cursor after the update
- Open VSCode
- Press
Cmd + Shift + P
(Mac) orCtrl + Shift + P
(Windows/Linux) - Type "Terminal: Select Default Profile" and choose it
- Select one of the supported shells: zsh, bash, fish, or PowerShell.
After making these changes:
- Quit VSCode completely
- Reopen VSCode
- Start a new Claude Coder session (you can resume your previous task and try to run the command again, this time with Claude being able to see the output)
If you're using Windows and still experiencing issues with shell integration after trying the previous steps, make sure you're using an updated version of PowerShell (at least v7+).
- Check your current PowerShell version by running:
$PSVersionTable.PSVersion
- If your version is below 7, update PowerShell.
You may also need to adjust your PowerShell execution policy. By default, PowerShell restricts script execution for security reasons.
PowerShell uses execution policies to determine which scripts can run on your system. Here are the most common policies:
-
Restricted
: No PowerShell scripts can run. This is the default setting. -
AllSigned
: All scripts, including local ones, must be signed by a trusted publisher. -
RemoteSigned
: Scripts created locally can run, but scripts downloaded from the internet must be signed. -
Unrestricted
: No restrictions. Any script can run, though you will be warned before running internet-downloaded scripts.
For development work in VSCode, the RemoteSigned
policy is generally recommended. It allows locally created scripts to run without restrictions while maintaining security for downloaded scripts. To learn more about PowerShell execution policies and understand the security implications of changing them, visit Microsoft's documentation: About Execution Policies.
-
Open PowerShell as an Administrator: Press
Win + X
and select "Windows PowerShell (Administrator)" or "Windows Terminal (Administrator)". -
Check Current Execution Policy by running this command:
Get-ExecutionPolicy
- If the output is already
RemoteSigned
,Unrestricted
, orBypass
, you likely don't need to change your execution policy. These policies should allow shell integration to work. - If the output is
Restricted
orAllSigned
, you may need to change your policy to enable shell integration.
- If the output is already
-
Change the Execution Policy by running the following command:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
- This sets the policy to
RemoteSigned
for the current user only, which is safer than changing it system-wide.
- This sets the policy to
-
Confirm the Change by typing
Y
and pressing Enter when prompted. -
Verify the Policy Change by running
Get-ExecutionPolicy
again to confirm the new setting. -
Restart VSCode and try the shell integration again.
If you're still experiencing issues after trying the basic troubleshooting steps, you can try manually installing shell integration.
For example, if you use zsh:
- Run
code ~/.zshrc
in the terminal to open your zsh configuration file. - Add the following line to your
~/.zshrc
:
[[ "$TERM_PROGRAM" == "vscode" ]] && . "$(code --locate-shell-integration-path zsh)"
- Save the file.
- Quit VSCode completely.
- Reopen VSCode and start a new Claude Coder session.
If you use PowerShell you would do:
- Run
code $Profile
in the terminal to open your PowerShell profile. - Add the following line to the file:
if ($env:TERM_PROGRAM -eq "vscode") { . "$(code --locate-shell-integration-path pwsh)" }
If you're seeing unusual output with rectangles, lines, escape sequences, or control characters, it may be related to terminal customization tools. Common culprits include:
- Powerlevel10k: A zsh theme that adds visual elements to the prompt
- Oh My Zsh: A framework for managing zsh configurations
- Fish shell themes
To troubleshoot:
- Temporarily disable these tools in your shell configuration file (e.g.,
~/.zshrc
for Zsh) - If the issue resolves, gradually re-enable features to identify the conflicting component
For example, if you're using Powerlevel10k with Zsh, you can disable it by commenting out the relevant line in your ~/.zshrc
file:
# Comment out the Powerlevel10k source line
# source /path/to/powerlevel10k/powerlevel10k.zsh-theme
If disabling these customizations resolves the issue, you may need to find alternative configurations that are compatible with VSCode's shell integration feature.
If you've followed these steps and are still experiencing problems, please:
- Reach out on the discord server
- If not, create a new issue with details about your operating system, VSCode/Cursor version, and the steps you've tried