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
Document two major shell integration issues:
- Ctrl+C behavior breaking command capture with example and workaround
- Multi-line command output issues with phantom text examples
Include clear reproduction steps and workarounds for both issues.
Signed-off-by: Eric Wheeler <[email protected]>
Copy file name to clipboardExpand all lines: docs/troubleshooting/shell-integration.md
+66-2Lines changed: 66 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -290,7 +290,72 @@ This often resolves temporary shell integration issues. However, if you experien
290
290
291
291
This will help us investigate and fix the underlying issue.
292
292
293
-
## Known Issues
293
+
## Known Upstream VSCode Shell Integration Issues
294
+
295
+
See also: https://github.com/microsoft/vscode/issues/237208
296
+
297
+
### Ctrl+C Behavior Breaking Command Capture
298
+
299
+
When shell integration believes there is a command that should be cancelled before running the requested command, the `^C` behavior breaks capture of the subsequent command output. Only `\x1B]633;C\x07` is received, with no actual command output.
300
+
301
+
To reproduce:
302
+
1. Run any command
303
+
2. Type text in terminal (making shell integration think `^C` is needed)
304
+
3. Run another command - output will not be captured
305
+
306
+
Example:
307
+
```
308
+
~]$ echo a # first command works
309
+
a
310
+
~]$ <type anything here but do not press enter; VSCE will send control-c> ^C
311
+
~]$ echo a
312
+
a
313
+
```
314
+
315
+
The second `echo a` command produces no output in shell integration (only `\x1B]633;C\x07` is received) even though the terminal shows the output.
316
+
317
+
**Work-around to avoid this issue:** Always ensure your terminal prompt is clean (no partial commands or text) before letting Roo run commands. This prevents shell integration from thinking it needs to send a Ctrl+C.
318
+
319
+
To avoid this issue, always ensure your terminal prompt is clean (no partial commands or text) before letting Roo run commands. This prevents shell integration from thinking it needs to send a Ctrl+C.
320
+
321
+
### Multi-line Command Output Issues
322
+
323
+
Multi-line commands can produce unexpected behavior with shell integration escape codes:
324
+
325
+
1. First command execution works correctly
326
+
2. Second execution produces phantom/partial output from previous command
327
+
3. Terminal displays spurious text unrelated to actual command output
328
+
329
+
This occurs with:
330
+
- Commands preceded by comments
331
+
- Invalid commands followed by valid ones
332
+
- Multiple valid commands in sequence
333
+
334
+
The issue appears when two non-empty lines are passed to shell integration.
335
+
336
+
If your AI model attempt to execute following two-line command:
337
+
338
+
```sh
339
+
# Get information about the commit
340
+
echo"Commit where version change was detected:"
341
+
```
342
+
343
+
it will produce phantom output:
344
+
345
+
```
346
+
]$ # Get information about the commit
347
+
hange was detected:"
348
+
]$ echo "Commit where version change was detected:"
349
+
Commit where version change was detected:
350
+
```
351
+
352
+
The second invocation shows phantom text `hange was detected:"` that was not part of the actual command output.
353
+
354
+
**Work-around:** If your model attempts this make sure you provide system instructions to ensure that it will not multiple commands across multiple lines, command should be chained like `echo a && echo b` and not as:
355
+
```sh
356
+
echo a
357
+
echo b # because this one will not provide output.
358
+
```
294
359
295
360
### Incomplete Terminal Output
296
361
@@ -303,7 +368,6 @@ If you experience this issue, try:
303
368
1. Closing and reopening the terminal
304
369
2. Running the command again
305
370
3. If the problem persists, you may need to manually copy-paste relevant output to Roo Code
306
-
307
371
## Troubleshooting Resources
308
372
309
373
-[VSCode Terminal Output Issue #237208](https://github.com/microsoft/vscode/issues/237208): Tracking the incomplete terminal output capture issue (ongoing as of March 8, 2025)
0 commit comments