Skip to content

Commit 2ac4178

Browse files
author
Eric Wheeler
committed
docs: add known shell integration issues
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]>
1 parent 0c76b89 commit 2ac4178

File tree

1 file changed

+66
-2
lines changed

1 file changed

+66
-2
lines changed

docs/troubleshooting/shell-integration.md

Lines changed: 66 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,72 @@ This often resolves temporary shell integration issues. However, if you experien
290290

291291
This will help us investigate and fix the underlying issue.
292292

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+
```
294359

295360
### Incomplete Terminal Output
296361

@@ -303,7 +368,6 @@ If you experience this issue, try:
303368
1. Closing and reopening the terminal
304369
2. Running the command again
305370
3. If the problem persists, you may need to manually copy-paste relevant output to Roo Code
306-
307371
## Troubleshooting Resources
308372

309373
- [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

Comments
 (0)