You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/features/shell-integration.md
+99-1Lines changed: 99 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,17 @@ Maximum time to wait for shell integration to initialize before executing comman
43
43
#### Terminal Command Delay
44
44
<imgsrc="/img/shell-integration/shell-integration-2.png"alt="Terminal command delay slider set to 0ms"width="600" />
45
45
46
-
Adds a small pause after running commands to help Roo capture all output correctly. This is helpful if Roo seems to miss parts of command output or reacts before commands finish. Default: 0ms (disabled).
46
+
Adds a small pause after running commands to help Roo capture all output correctly. This setting can significantly impact shell integration reliability due to VSCode's implementation of terminal integration across different operating systems and shell configurations:
47
+
48
+
-**Default**: 0ms (as of Roo v3.11.13)
49
+
-**Common Values**:
50
+
* 0ms: Works best for some users with newer VSCode versions
51
+
* 50ms: Historical default, still effective for many users
52
+
* 150ms: Recommended for PowerShell users
53
+
-**Note**: Different values may work better depending on your:
@@ -187,6 +197,59 @@ Visual indicators of active shell integration:
187
197
3. Working directory updates in terminal title
188
198
4. Command duration and exit code reporting
189
199
200
+
## WSL Terminal Integration Methods
201
+
202
+
When using Windows Subsystem for Linux (WSL), there are two distinct ways to use VSCode with WSL, each with different implications for shell integration:
203
+
204
+
### Method 1: VSCode Windows with WSL Terminal
205
+
206
+
In this setup:
207
+
- VSCode runs natively in Windows
208
+
- You use the WSL terminal integration feature in VSCode
209
+
- Shell commands are executed through the WSL bridge
210
+
- May experience additional latency due to Windows-WSL communication
211
+
- Shell integration markers may be affected by the WSL-Windows boundary: you must make sure that `source "$(code --locate-shell-integration-path <shell>)"` is loaded for your shell within the WSL environment because it may not get automatically loaded; see above.
212
+
213
+
### Method 2: VSCode Running Within WSL
214
+
215
+
In this setup:
216
+
- You launch VSCode directly from within WSL using `code .`
217
+
- VSCode server runs natively in the Linux environment
218
+
- Direct access to Linux filesystem and tools
219
+
- Better performance and reliability for shell integration
220
+
- Shell integration is loaded automatically since VSCode runs natively in the Linux environment
221
+
- Recommended approach for WSL development
222
+
223
+
For optimal shell integration with WSL, we recommend:
224
+
1. Open your WSL distribution
225
+
2. Navigate to your project directory
226
+
3. Launch VSCode using `code .`
227
+
4. Use the integrated terminal within VSCode
228
+
229
+
## Known Issues and Workarounds
230
+
231
+
### Shell Integration Failures After VSCode 1.98
232
+
233
+
**Issue**: After VSCode updates beyond version 1.98, shell integration may fail with the error "VSCE output start escape sequence (]633;C or ]133;C) not received".
234
+
235
+
**Solutions**:
236
+
1.**Set Terminal Command Delay**:
237
+
- Set the Terminal Command Delay to 50ms in Roo Code settings
238
+
- Restart all terminals after changing this setting
239
+
- This matches older default behavior and may resolve the issue, however some users have reported that a value of 0ms works better. This is a workaround for upstream VSCode problems.
240
+
241
+
2.**Roll Back VSCode Version**:
242
+
- Download VSCode v1.98 from [VSCode Updates](https://code.visualstudio.com/updates/v1_98)
243
+
- Replace your current VSCode installation
244
+
- No backup of Roo settings needed
245
+
246
+
3.**WSL-Specific Workaround**:
247
+
- If using WSL, ensure you launch VSCode from within WSL using `code .`
248
+
249
+
4.**ZSH Users**:
250
+
- Try enabling some or all ZSH-related workarounds in Roo settings
251
+
- These settings can help regardless of your operating system
252
+
190
253
## Known Issues and Workarounds
191
254
192
255
### Ctrl+C Behavior
@@ -216,6 +279,41 @@ Visual indicators of active shell integration:
216
279
217
280
## Troubleshooting Resources
218
281
282
+
### Checking Debug Logs
283
+
When shell integration issues occur, check the debug logs:
284
+
1. Open Help → Toggle Developer Tools → Console
285
+
2. Set "Show All Levels" to see all log messages
286
+
3. Look for messages containing `[Terminal Process]`
287
+
4. Check `preOutput` content in error messages:
288
+
- Empty preOutput (`''`) means VSCode sent no data
289
+
- This indicates a potential VSCode shell integration issue, or an upstream bug that is out of our control
290
+
- The absence of shell integration markers may require adjusting settings to work around possible upstream bugs or local workstation configuration issues related to shell initialization and VSCode's loading of special shell integration hooks
291
+
292
+
### Using the VSCode Terminal Integration Test Extension
293
+
The [VSCode Terminal Integration Test Extension](https://github.com/KJ7LNW/vsce-test-terminal-integration) helps diagnose shell integration issues by testing different settings combinations:
294
+
295
+
296
+
1.**When Commands Stall**:
297
+
- If you see "command already running" warnings, click "Reset Stats" to reset the terminal state
298
+
- These warnings indicate shell integration is not working
299
+
- Try different settings combinations until you find one that works
300
+
- If it really gets stuck, restart the extension by closing the window and pressing F5
301
+
302
+
2.**Testing Settings**:
303
+
- Systematically try different combinations of:
304
+
* Terminal Command Delay
305
+
* Shell Integration settings
306
+
- Document which combinations succeed or fail
307
+
- This helps identify patterns in shell integration issues
308
+
309
+
3.**Reporting Issues**:
310
+
- Once you find a problematic configuration
311
+
- Document the exact settings combination
312
+
- Note your environment (OS, VSCode version, shell, and any shell prompt customization)
313
+
- Open an issue with these details to help improve shell integration
0 commit comments