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
{{ message }}
Repository navigation
Screen flickering/vibrating on diff views in v1.0.120, causes PTY host crash #4905
Screen flickering/vibrating when viewing file diffs in v1.0.120. The display constantly repaints causing a "vibrating" visual effect on diff views (Edit tool output).
This occurs after prolonged use of a session, not immediately. After the flickering starts, it leads to:
All OpenCode terminal windows in VSCode becoming unresponsive
Yellow PTY host error: "Restarting the terminal because the connection to the shell process was lost"
Regression: Issue does not occur in v1.0.119. Rolling back to v1.0.119 resolves the problem.
While these issues may have different root causes, they all involve rendering performance degradation and CPU spikes after recent version updates. The flickering/vibrating behavior you're experiencing might be a visual manifestation of the same underlying rendering performance problem.
Feel free to ignore if your specific case with diff views and PTY crashes is distinctly different from these general performance issues.
started and resumed the session with OTUI_DEBUG_FFI=true and then scrolled up and it triggered on a side by side diff and got stuck - 218 MB - 3,355,681 lines - in a few seconds. Wow 😅
Hi,
I also noticed this issue. In my case, it occurs when the terminal window is wide enough for the chat to display a side-by-side “+ / –” comparison between two files. If the window isn’t wide enough, the two columns don’t appear — only a single modification view is shown — and in that situation, the flickering does not happen.
I was able to reproduce the problem every time a before/after file comparison was displayed.
Hi,
I also noticed this issue. In my case, it occurs when the terminal window is wide enough for the chat to display a side-by-side “+ / –” comparison between two files. If the window isn’t wide enough, the two columns don’t appear — only a single modification view is shown — and in that situation, the flickering does not happen.
I was able to reproduce the problem every time a before/after file comparison was displayed.
In my case it doesn't happen with every diff. It seems to happen to me with every markdown diff (side-by-side), but the same agent called a subagent using many Typescript diffs, and there I didn't experience the issue. I also use zsh, in case this helps. I had the issue on two different machines (with Ubuntu and Debian Sid)...
Cool! Was the bug introduced by this change? anomalyco/opentui#358
Can you explain what this does? (The PR contains no information and I found no issue.) What is Claude Code's flicker feature? And why does this only affect markdown files? (And why only sometimes, and why does it not always crash when this happens?) Thanks!
Well, yes the bug was introduced with the diffs, the diff view just didn't exist before that. That PR introduces the diff view.
The "cc flicker feature" is just a pun on the Claude Code flickering memes.
It did not only affect markdown files, it would affect all code with conceal highlights, where it removes for example markdown like **/__ etc. which changes the line width and therefor the wrapping, which in turn changes the height of the element, which triggers a layout pass, which makes the diff view rebuild, which sets the text again and causes another highlight pass... repeat indefinitely.
It only happened sometimes, because the width of the diff + text + highlights have to meet the conditions causing the concealed text to change height and trigger the layout pass + highlighting has to be slow enough to trigger another layout pass just after the last one.
The loop caused thousands of frame redraws per second, which overwhelmed the CPU and caused memory pressure - crash.
It did not always crash, because when the renderer is in live mode, running at a target frame rate, which opencode does when the loading indicator in the bottom left is running for example, frame requests that would be triggered by the endless loop would just be deferred to the next scheduled frame, mitigating the crash. Then when the diff goes out of view it is not rendered anymore, breaking the endless loop.
Thanks for the explanation! Regarding "infinite loop", I have sessions where it could proceed without issues. When I scroll up, it flickers. When I stay there, it crashes. I liked the diff, and from time to time I also liked the party flickering mode. 🪩🕺📀
Edit: While I can confirm that this has been fixed (at least for me), I never experienced the exact same behavior as @wthrbtn.
Yellow PTY host error: "Restarting the terminal because the connection to the shell process was lost"
In my case the agent just froze or became unresponsive, but I always had to manually kill it then - which resulted in a bunch of numbers in the terminal at every hover or mouse-over (so I had to close the terminal window to totally kill the PTY process...).
Activity
github-actions commentedon Nov 29, 2025
This issue might be a duplicate of existing issues. Please check:
While these issues may have different root causes, they all involve rendering performance degradation and CPU spikes after recent version updates. The flickering/vibrating behavior you're experiencing might be a visual manifestation of the same underlying rendering performance problem.
Feel free to ignore if your specific case with diff views and PTY crashes is distinctly different from these general performance issues.
kommander commentedon Nov 29, 2025
I have a vague idea where that could come from, but a screen recording of the kind of flickering would be really helpful.
Can you reproduce it when loading a large session and continuing maybe?
If you get it reproduced it would be really helpful if you could run it with
OTUI_DEBUG_FFI=true, which creates a log in the cwd.wthrbtn commentedon Nov 30, 2025
https://github.com/user-attachments/assets/a5266f61-81d2-445b-9008-28609dc97079
@kommander
I have a screen recording of a few seconds now on 1.0.121
The sessions is locked up flicker and after about 10 minutes it stopped and the Pty Host error came
Sorry, forgot the OTUI_DEBUG_FFI on this. Will try again.
redtux commentedon Nov 30, 2025
Haha, I was also recording this now, and after the record it looked even worse. 🤣 (Fresh session; no
-chere...)wthrbtn commentedon Nov 30, 2025
started and resumed the session with OTUI_DEBUG_FFI=true and then scrolled up and it triggered on a side by side diff and got stuck - 218 MB - 3,355,681 lines - in a few seconds. Wow 😅
ffi_otui_debug_2025-11-30_00-31-20-773.log.gz
wthrbtn commentedon Nov 30, 2025
I converted the captured video (1.0.121) to a gif also.
tancou commentedon Nov 30, 2025
Hi,
I also noticed this issue. In my case, it occurs when the terminal window is wide enough for the chat to display a side-by-side “+ / –” comparison between two files. If the window isn’t wide enough, the two columns don’t appear — only a single modification view is shown — and in that situation, the flickering does not happen.
I was able to reproduce the problem every time a before/after file comparison was displayed.
redtux commentedon Nov 30, 2025
In my case it doesn't happen with every diff. It seems to happen to me with every markdown diff (side-by-side), but the same agent called a subagent using many Typescript diffs, and there I didn't experience the issue. I also use zsh, in case this helps. I had the issue on two different machines (with Ubuntu and Debian Sid)...
rwese commentedon Nov 30, 2025
Can it be the sidebar messing with the width calculation, causing wrapping when the rendering is done, it's starting to flip/flop.
Screen Recording 2025-11-30 at 20.01.11.zip
redtux commentedon Dec 1, 2025
I also have it with subagents where there is no sidebar on the right side. But I don't see this all the time, only with certain text. 🤷
kommander commentedon Dec 1, 2025
Should be better in 1.0.123
redtux commentedon Dec 1, 2025
Cool! Was the bug introduced by this change? anomalyco/opentui#358
Can you explain what this does? (The PR contains no information and I found no issue.) What is Claude Code's flicker feature? And why does this only affect markdown files? (And why only sometimes, and why does it not always crash when this happens?) Thanks!
kommander commentedon Dec 1, 2025
Well, yes the bug was introduced with the diffs, the diff view just didn't exist before that. That PR introduces the diff view.
The "cc flicker feature" is just a pun on the Claude Code flickering memes.
It did not only affect markdown files, it would affect all code with conceal highlights, where it removes for example markdown like
**/__etc. which changes the line width and therefor the wrapping, which in turn changes the height of the element, which triggers a layout pass, which makes the diff view rebuild, which sets the text again and causes another highlight pass... repeat indefinitely.It only happened sometimes, because the width of the diff + text + highlights have to meet the conditions causing the concealed text to change height and trigger the layout pass + highlighting has to be slow enough to trigger another layout pass just after the last one.
The loop caused thousands of frame redraws per second, which overwhelmed the CPU and caused memory pressure - crash.
It did not always crash, because when the renderer is in live mode, running at a target frame rate, which opencode does when the loading indicator in the bottom left is running for example, frame requests that would be triggered by the endless loop would just be deferred to the next scheduled frame, mitigating the crash. Then when the diff goes out of view it is not rendered anymore, breaking the endless loop.
redtux commentedon Dec 1, 2025
Thanks for the explanation! Regarding "infinite loop", I have sessions where it could proceed without issues. When I scroll up, it flickers. When I stay there, it crashes. I liked the diff, and from time to time I also liked the party flickering mode. 🪩🕺📀
Edit: While I can confirm that this has been fixed (at least for me), I never experienced the exact same behavior as @wthrbtn.
In my case the agent just froze or became unresponsive, but I always had to manually kill it then - which resulted in a bunch of numbers in the terminal at every hover or mouse-over (so I had to close the terminal window to totally kill the PTY process...).
redtux commentedon Dec 4, 2025
Hi, shouldn't this be closed as solved?
rekram1-node commentedon Dec 4, 2025
closing