Copilot sends literal ^U character to Terminal instead of executing "Clear Line" command #195255
Replies: 4 comments
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
|
Work around: Tell the agent to prefix commands with "; ", initial run still has syntax error, but actual command executes. |
Beta Was this translation helpful? Give feedback.
-
|
+1 |
Beta Was this translation helpful? Give feedback.
-
|
I was able to resolve this by configuring PSReadLine to handle Ctrl+U explicitly.
This prevents ^U (0x15) from being inserted as a literal control character and instead makes it behave like "delete to beginning of line" (similar to many Linux shells). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
🏷️ Discussion Type
Bug
💬 Feature/Topic Area
Copilot in GitHub
Body
Description:
When GitHub Copilot (Terminal Chat or Inline Chat) attempts to execute a command in the VS Code Terminal, it frequently prepends a literal ^U character to the command string.
This causes the command to fail because the shell (specifically PowerShell) treats ^U as part of the command rather than a control sequence to clear the current line. This further leads the AI to hallucinate or troubleshoot based on a "command not found" error caused by this prefix.
Steps to Reproduce:
Open VS Code with GitHub Copilot extension installed.
Open a PowerShell terminal.
Use Copilot to run a command in the terminal (e.g., via Terminal Chat or "Run in Terminal" feature).
Observe the terminal input.
Expected Behavior:
Copilot should either clear the line silently using a proper terminal sequence or simply paste the command if the line is already empty.
Actual Behavior:
The terminal shows ^U& 'path/to/command' (as seen in the attached screenshots). The ^U remains as text, causing a syntax error in PowerShell.
Environment:
版本: 1.119.0 (system setup)
提交: 8b640eef5a6c6089c029249d48efa5c99adf7d51
日期: 2026-05-05T11:23:50-07:00
Electron: 39.8.8
ElectronBuildId: 13870025
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26200
Beta Was this translation helpful? Give feedback.
All reactions