opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Screen becomes completely blank

Open jgordijn-ah opened this issue 2 months ago • 15 comments

Description

Not sure when it happens, but I'm in a session and many times the screen becomes completely blank:

Image

When I trigger a switch theme, I get the contents back.

I noticed it while working inside VS Code. Switching to Ghostty to see if that was the cause, but I have the same issue there.

OpenCode version

1.0.12

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

Mac

Terminal

Ghostty, VS Code terminal

jgordijn-ah avatar Nov 02 '25 20:11 jgordijn-ah

This issue might be a duplicate of existing issues. Please check:

  • #3719: navigating away from an active session causes it to flicker/be blank when returning to it
  • #3697: OpenTUI: Missing main view text when resizing
  • #3541: The screen is bugging out with the new "Screen"? - reports screen display bugs and blank areas
  • #3671: 1.0+ is unusable in non-truecolor terminal - display issues causing blank/unusable interface

Feel free to ignore if none of these address your specific case.

github-actions[bot] avatar Nov 02 '25 20:11 github-actions[bot]

sometimes scrolling up and down brings it back.

jgordijn-ah avatar Nov 02 '25 20:11 jgordijn-ah

It looks similar to https://github.com/sst/opencode/issues/3697, but I don't need to resize my screen to trigger it.

jgordijn-ah avatar Nov 02 '25 20:11 jgordijn-ah

I've seen this once or twice too yeah

rekram1-node avatar Nov 02 '25 22:11 rekram1-node

I was seeing this today as well.

mrcoleman avatar Nov 03 '25 06:11 mrcoleman

I see this often as well. Any time I start start opencode and select a previous session, the TUI is blank. Any time there's a long running process, the TUI also becomes blank, but eventually fixes itself.

duhduhdan avatar Nov 03 '25 16:11 duhduhdan

Ive fast fixed this in linked PR, half of my sessions are blank :-) cc @rekram1-node

istarkov avatar Nov 04 '25 07:11 istarkov

I see this constantly when working with multiple concurrent opencode instances in Zellij tabs. Makes it kinda hard to work :)

Image

pbjorklund avatar Nov 04 '25 11:11 pbjorklund

can you try on latest again?

thdxr avatar Nov 04 '25 19:11 thdxr

Still happens to me on 1.0.23. :( I found a workaround: Ctrl+P then Jump to message, or just Ctrl+X G.

kamilchm avatar Nov 04 '25 22:11 kamilchm

Image

This happened when I resized the window.

Yes, to me to. Selecting switch theme also brings it back.

jgordijn avatar Nov 05 '25 07:11 jgordijn

After working a bit more, I see that switching to subagents also causes the screen to go blank in many cases.

jgordijn avatar Nov 05 '25 09:11 jgordijn

Yeah, for me it always go blank after large output produced by a subagent.

kamilchm avatar Nov 05 '25 10:11 kamilchm

If I have like 50% screen it goes blank all. the. time.

pbjorklund avatar Nov 05 '25 12:11 pbjorklund

Two things I've noticed:

  • If you switch to the subagent while it is still working, when you are back the screen is blank. However if you wait long enough, any updates on the subagent operations will become visible, yet the old information is not.
  • If you keep going up in the message history eventually you reach a point that it starts showing you messages. Then you can scroll all the way back and everything is back to normal again

arsham avatar Nov 05 '25 13:11 arsham

Besides what's observed here, I've noticed that the UI sometimes freezes.

What I noticed then was that the fetch tool failed in the subagent, and then it froze. When I closed that instance and restarted the session from another Opencode instance, I could see the subagent's errors, which were not visible in the original instance.

pigmej avatar Nov 05 '25 16:11 pigmej

Not extensively tested yet, but it either doesn't happen anymore or occurs less frequently. I will provide an update after using it more.

jgordijn avatar Nov 06 '25 13:11 jgordijn

Gave up and downgraded to 0.15 today. it still happened so much it was unusable at .35 today (along with ctrl u not working and /commands not working correctly just to much to keep trying)

pbjorklund avatar Nov 06 '25 13:11 pbjorklund

Havent seen screen issues, but it hangs now for like half a minute on session switch.

istarkov avatar Nov 06 '25 15:11 istarkov

and ur on latest? @istarkov

rekram1-node avatar Nov 06 '25 16:11 rekram1-node

Happens for me still every time when I maximize the window on maocs (full screen) and then make it window again in yabai. (Also happens when I resize from bigger to smaller). Sometimes scrolling helps but sometimes not.

I have it on 1.0.35

pigmej avatar Nov 06 '25 16:11 pigmej

@istarkov after it hangs and loads can you do control+p and toggle the console and send a screenshot of it

thdxr avatar Nov 06 '25 16:11 thdxr

im looking for these lines

CleanShot 2025-11-06 at 11.48.44@2x.png

thdxr avatar Nov 06 '25 16:11 thdxr

Image

I know I'm not Ivan but still.

Do I have to enable something more?

Image that's how it looks like when I enable debug window.

pigmej avatar Nov 06 '25 16:11 pigmej

On small 5s freezes I see fetched, synced 5k+.

But on huge freeze like 2 minutes, here is what I see.

Image

Keyboard is not working at all, I can't switch to log or do anything.

All number is the log are ok, message updates etc like every fews second.

Image

Rendering - code parts, can be rendered much more later vs everything else.

Sometimes I see something like this in the terminal after ctrl-c exit

M65;43;7M65;43;7M65;43;7M65;43;7M65;43;7M65;43;7M65;43;7M65;43;7M65;43;7M65;

istarkov avatar Nov 06 '25 17:11 istarkov

Rendering during freeze

Before freeze: Image

2 minutes later

Image

istarkov avatar Nov 06 '25 17:11 istarkov

I have 672 session files at /Users/ice/.local/share/opencode/storage/session/f143c64c3403d3d44a56c2c5a6c1ffa3b70d2f06 Gonna delete all to see if it works.

PPS: It freezes with 11 session files too

PPPPS: When I see this in log, it's ok it's slow but not freezed Image

istarkov avatar Nov 06 '25 17:11 istarkov

edit: whoops wrong issue

rekram1-node avatar Nov 06 '25 18:11 rekram1-node

Even after removing code blocks in dev, it still freezes (so it’s not the highlighter). I’ve tried the Bun debugger, but it doesn’t pause when the freeze happens (pausing in debug usually helps find the hot path).

istarkov avatar Nov 06 '25 18:11 istarkov

For me it certainly happens less often, and it seems to recover better than before, but still, I sometimes see blank screens.

jgordijn avatar Nov 07 '25 17:11 jgordijn