Screen flickers with cursor blink when selecting `No, and tell Copilot what to do differently` option
Describe the bug
While working with Copilot CLI in Windows Terminal from a PowerShell v7.5.4 session I experienced a screen flashing effect (Just the terminal window) with some copilot artifacts appearing on the screen with each flash. It is also filling up my terminal buffer with a complete copy of the Copilot session with each flash.
The flashing coincided with the cursor blink but was only happening when I was being asked to accept a tool use or other question and I selected the No, and tell Copilot what to do differently option because that is when the cursor appeared for me to supply input. If I used the arrow keys to move up to either Yes option, the flashing stopped.
The console input became very sluggish and non-responsive to actions such as typing or backspace to delete characters of my response input
Affected version
GitHub Copilot CLI 0.0.399.
Steps to reproduce the behavior
- Open Windows Terminal in a PowerShell v7.5.4 (Might be happening on other versions this is what I have installed)
- Change to a test directory, Open Copilot and accept the access request
- At the prompt type
Create me a generic readme.md file for a dotnet c# rest apior anything that would cause copilot to save a file - When prompted to Edit the file, use the arrow keys to move down to the 3rd option
No, and tell Copilot what to do differently (Esc to stop)option and the screen should start to flicker with the cursor blink. - Use the arrow keys to move up to Option 2 or Option 1 and the screen flashing stops as the cursor is not blinking for user input.
Expected behavior
When selecting the No option I expect the screen to not flash with the cursor blink and the user input to be responsive
Additional context
Terminal Emulator - Windows Terminal Version: 1.23.13503.0 Shell - PSVersion 7.5.4
Here are two videos showing the flashing issue and the terminal buffer being filled with each flash. This video doesn't really capture the flashing/flickering properly, but it gets the point across, I think. https://1drv.ms/v/c/40ecf7a473fbe994/IQCWF9xiaOV7RKKn1fUB7NU9AQsvhO6DX3OUxaA8nLWp_2s?e=XeD1U0
Here is a video showing that with each flash/flicker the terminal buffer gets filled with what is currently displayed in the terminal https://1drv.ms/v/c/40ecf7a473fbe994/IQBUbwI_6MUSSpREqUfiivFxAZdVUDwUriZdT4toHGg-2oo?e=haxUpv
I noticed that the input prompt in plan mode doesn't seem to have this issue: the text I typed is properly recorded and rendered on the screen. The cursor is not blinking in plan mode, so it really seems like the blinking cursor is the issue.
cc @devm33: Is this something you could take a look at please? We would really appreciate. Thanks.
I was using the CLI this morning and noticed that this no longer seems to be an issue for me.
Windows Terminal Version: 1.23.20211.0 Copilot CLI Version: 0.0.418
This is still an issue for me on Linux with version 0.0.418.
Yea this screen flashing is extremely unpleasant. I'm experiencing this in tmux + linux. The flashing doesn't occur on the session host though (macos).
For now, you can get around it by typing elsewhere (VS Code or Chrome) and then pasting the text in the terminal with Ctrl-Shift-V. For copying text on the screen, simply move your cursor back to Option 1 to stop the screen flickering.
Yea this screen flashing is extremely unpleasant. I'm experiencing this in tmux + linux. The flashing doesn't occur on the session host though (macos).
It happens to me in macOS with tmux + wezterm. Unusable.
I did a few tests and version 0.0.419 seems to not drop characters anymore.
And I don't have flickering with "alt_screen": true.
I'll confirm in a few days that it is indeed fixed for me on this version.
I have the exact same issue. I am using VSCode via Coder remote workspaces. It's very unpleasant. Claude Code used to have this issue and they fixed it recently. Now I am back to experiencing it with Copilot CLI. Only way to fix it is Ctrl+C Ctrl+C, then restart it, /resume, and keep going. It's quite painful.
Hey folks, just wanted to mention that we have shipped a new renderer available under the --alt-screen flag. We are workign through bugs and edge cases before making it the default.
https://github.com/github/copilot-cli/issues/239#issuecomment-3995155743
Since I posted my update comment last week, I started seeing flickering issues.
The input issue seems fixed, though.
any progress on this bug, screen is flikering like crazy, ups and downs constantly.
Yes, it's crazy bad and I'm actually quite surprised this isn't remedied yet? What's the timeline on this?
To anyone still having this issue, try using the --alt-screen flag, it solved the issue for me
Yes, I just saw that and that flag works but I guess I'm wondering why this isn't fixed without having to use that flag?
I tried use the flag, but
- it significantly slows down page scrolls
- it is now flickering side ways when prompting with language other than English.
I do not want to use --alt-screen for other reasons. Please fix this and the possibly related #1811
This should be resolved in current releases. In v1.0.12, alt-screen mode became always on, which removed the rendering path that caused flickering during cursor blink. In v1.0.13, a related issue with dropped keystrokes in elicitation dialogs, including the "tell Copilot what to do differently" prompt, was also fixed. If you still see this on the latest version, please comment here with your version and repro details.