copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

Screen flickers with cursor blink when selecting `No, and tell Copilot what to do differently` option

Open MCrank opened this issue 10 months ago • 37 comments

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

  1. Open Windows Terminal in a PowerShell v7.5.4 (Might be happening on other versions this is what I have installed)
  2. Change to a test directory, Open Copilot and accept the access request
  3. At the prompt type Create me a generic readme.md file for a dotnet c# rest api or anything that would cause copilot to save a file
  4. 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.
  5. 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

MCrank avatar Jan 30 '26 08:01 MCrank

Came here to file the same issue. I currently have version 398 installed and that has the flickering. I don't believe this was an issue with version 384 that I was using a week or so back.

jessey-git avatar Jan 31 '26 01:01 jessey-git

I have a similar issue on Linux. Also, when I type text in "No, and tell Copilot what to do differently", some characters I type won't be received in the input. Downgrading to 384 fixes those issues.

Edit: actualy in version 384, there's some flickering when typing in "No, and tell Copilot what to do differently", but the experience is still overall much better.

antoyo avatar Jan 31 '26 23:01 antoyo

Jumpstart your project with Copilot (optional)

Tell Copilot coding agent what you want to build in this repository. After creation, Copilot will open a pull request with generated files - such as a basic app, starter code, or other features you describe - then request your review when it's ready.

jarlungoodoo73 avatar Jan 31 '26 23:01 jarlungoodoo73

Please fix.

csheaff avatar Feb 04 '26 19:02 csheaff

Me too, this makes the CLI quite cumbersome to work with.

Phil-T1 avatar Feb 04 '26 22:02 Phil-T1

Build 404:

Typing while this behavior occurs will very frequently lose characters, making entering commands almost completely unusable.

signe avatar Feb 05 '26 21:02 signe

Came here to file the same issue. I'm in version 405 and when it does the flickering it sometimes likes to drop keystrokes, making adding the additional prompt slow and frustrating at times.

msquibb avatar Feb 06 '26 22:02 msquibb

And another. Working with version 405. Flickering can get very bad while working with CLI in Windows Terminal with PowerShell. Occasional characters are lost while typing while the screen flickers.

royshea avatar Feb 07 '26 04:02 royshea

Having the same issue here, it's incredibly frustrating- I can't type anything in this prompt almost because once I type more than one line or so, it starts making the terminal jump scrolling from start to end with every single key press, which just hurts my eyes while typing...

liraz747 avatar Feb 07 '26 09:02 liraz747

.406 still an issue. macos and zsh

W4SD avatar Feb 09 '26 12:02 W4SD

Me too. Really annoying. As additional information, i am using tmux. Not sure if that makes a difference. Never does for any other cli tool. But it does seems to be something with the cli tool trying to resize the screen/text and getting stuck in a loop.

dolfandringa avatar Feb 11 '26 20:02 dolfandringa

https://github.com/user-attachments/assets/52abc364-66f8-445e-adcd-b05122673201

dolfandringa avatar Feb 11 '26 20:02 dolfandringa

Hate to comment just to say me too but this is quite frustrating. If I write at normal speed it eats up about 2/3 of what I type on any tool "No" prompt. I have to wait maybe a second between each key press and sometimes neither that works. I'd like to to do a presentation to teammates about how CLI can be superior to vscode plugin but this severily limits the user experience.

fargiolas avatar Feb 12 '26 03:02 fargiolas

The blinking cursor will also prevent selecting text from the terminal, as it will erase any selection every time it blinks.

voneiden avatar Feb 13 '26 15:02 voneiden

Writing the answer elsewhere and pasting it in the tool prompt can be used as a workaround.

Seems the problem is caused by a full buffer refresh after each key press. It's only the tool prompt, ask user works fine.

fargiolas avatar Feb 15 '26 02:02 fargiolas

Seems the problem is caused by a full buffer refresh after each key press.

I was under the impression that the problem was that the cursor moved (even when not typing), e.g. the moving of the cursor would overwrite some text.

antoyo avatar Feb 15 '26 12:02 antoyo

If not mistaken this is a bug on react ink. Copilot copycat decided to copy Claude Code. Ppl in claude code have been trying to go around this though... What I don't understand is the deal with using React ink... just do as Codex has done on their Cli. Clean and sound. Not flickering at all.

allpepper avatar Feb 22 '26 23:02 allpepper

If not mistaken this is a bug on react ink. Copilot copycat decided to copy Claude Code. Ppl in claude code have been trying to go around this though... What I don't understand is the deal with using React ink... just do as Codex has done on their Cli. Clean and sound. Not flickering at all.

If it's that they said they fixed it on the react ink side, let's hope we'll get the fix soon

fargiolas avatar Feb 23 '26 00:02 fargiolas

If not mistaken this is a bug on react ink. Copilot copycat decided to copy Claude Code. Ppl in claude code have been trying to go around this though... What I don't understand is the deal with using React ink... just do as Codex has done on their Cli. Clean and sound. Not flickering at all.

caswayne0606-cyber avatar Feb 23 '26 00:02 caswayne0606-cyber

If not mistaken this is a bug on react ink. Copilot copycat decided to copy Claude Code. Ppl in claude code have been trying to go around this though... What I don't understand is the deal with using React ink... just do as Codex has done on their Cli. Clean and sound. Not flickering at all.

If it's that they said they fixed it on the react ink side, let's hope we'll get the fix soon

ddblascheck-design avatar Feb 23 '26 05:02 ddblascheck-design