This repository provides a minimal reproducible environment to help report issues with VSCode 1.93's new Terminal Shell Integration API. It aims to assist the VSCode team in improving the API, and was created for users of the Claude Dev extension experiencing shell integration problems ("Shell Integration Unavailable" error, no output streamed back to extension, etc.).
- Prerequisite: Basic Shell Integration Troubleshooting
- Reproducing Shell Integration Problems with This Extension
- Observing Results and Submitting a Report
Before using this extension to report an issue, ensure that you have properly tried to set up shell integration:
- Update VSCode to the latest version:
- Open the Command Palette (
Cmd+Shift+P
on Mac,Ctrl+Shift+P
on Windows/Linux) - Type "Check for Updates" and install any available updates
- Open the Command Palette (
- Configure VSCode to use a supported shell (zsh, bash, fish, or PowerShell):
- Open the Command Palette
- Type "Terminal: Select Default Profile" and select one of the supported shells
- Remove any shell customization frameworks like
Powerlevel10k
orOh My Zsh
(not to be confused withzsh
,Oh My Zsh
is an add-on tozsh
)- For example, if you're using
Powerlevel10k
withzsh
, 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
- For example, if you're using
- Restart VSCode and try the shell integration again.
If you're still experiencing issues, try the following additional steps:
-
For Windows PowerShell users:
- Ensure you're using PowerShell v7+:
- Check your current PowerShell version by running:
$PSVersionTable.PSVersion
- If your version is below 7, update PowerShell.
- Check your current PowerShell version by running:
- Check and update your execution policy if necessary:
- 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
. - 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.
- Open PowerShell as an Administrator: Press
- Ensure you're using PowerShell v7+:
-
If you're still experiencing issues with shell integration not being available, 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, and add the following line:[[ "$TERM_PROGRAM" == "vscode" ]] && . "$(code --locate-shell-integration-path zsh)"
- Save the file, restart VSCode, and try the shell integration again.
If you use PowerShell:
- Run
code $Profile
in the terminal to open your PowerShell profile, and add the following line:if ($env:TERM_PROGRAM -eq "vscode") { . "$(code --locate-shell-integration-path pwsh)" }
- Save the file, restart VSCode, and try the shell integration again.
- Run
- Clone this repository:
git clone https://github.com/saoudrizwan/shell-integration-problems.git
- Install the necessary dependencies:
cd shell-integration-problems npm install
- Open the cloned repository in VSCode.
- Press F5 to run the extension in a new debugger window.
The extension provides a command you can access through the Command Palette (Cmd+Shift+P
on Mac, Ctrl+Shift+P
on Windows/Linux):
shell-integration-problems: Run in Terminal
Selecting this command will prompt you to enter a shell command. The extension will attempt to execute the command in a terminal using shell integration, and the output will be logged in the primary window's Debug Console.
If your command is specific to your original project where you used Claude Dev:
- In the debugger window, open the Command Palette.
- Select "File: Open Folder" and choose your original project folder.
- Use
shell-integration-problems: Run in Terminal
for project-specific commands.
-
Open the Debug Console in the primary window to see console logs.
-
Run the commands in the debugger window and observe the output in the Debug Console. Note that the "Read chunk" data will contain raw terminal output. For example, you might see:
- Escape characters:
\x1B
or\033
- ANSI color codes:
\x1B[31m
(red text) - Command sequences:
\x1B]633;C\x07
(shell integration markers)
These raw outputs are typically parsed and stripped out by extensions like Claude Dev, which is why you wouldn't see them in the processed output. In this debugging context, however, seeing the raw output is useful for diagnosing shell integration issues.
- Escape characters:
-
After reproducing the issue, right-click in the Debug Console and select "Copy All" to copy all logs.
- Go to the Report Shell Integration Problem page.
- Fill out the issue form with the following information:
- Problem: Provide a clear description of the problem you're experiencing.
- Debug Console Logs: Paste the console logs from the Debug Console.
Your report will help improve the Shell Integration API and the Claude Dev extension. Thank you for your help!