opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Long prompt history stalls the app, long load time

Open bcardarella opened this issue 1 month ago • 5 comments

Description

https://github.com/user-attachments/assets/7f3d8dd2-a182-4ebe-bf35-e73bdc063ed8

This is only from a single day of use.

OpenCode version

1.0.11

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

bcardarella avatar Nov 02 '25 11:11 bcardarella

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

  • #3526: Performance degradation with many sessions causing 10+ second delays in session operations
  • #3182: Very slow session performance (though specifically related to git snapshots, it shows similar performance patterns)
  • #3669: Issues loading old sessions/history which could be related to history performance problems

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

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

is it also slow when you scroll?

thdxr avatar Nov 02 '25 18:11 thdxr

when it eventually loads, yes. The working animation (i.e. Build claude-sonnet-4.5) animation also stalls. And typing blocks. Eventually it will settle down but it was taking maybe 2 - 3 minutes.

bcardarella avatar Nov 02 '25 18:11 bcardarella

Noticing the same

Using GLM-4.6, but any model is the same. It isn't model output being slow, typing gets noticeable lag to the point you mistype, or press RightArrow only for nothing to happen for 1s, and then having the cursor shoot way past a while later when you've already released the key.

Seems that some combination of scrollback, or files modified/wathers opened, or something stalls the app. Running into this frequently.

(Don't get me wrong though, opencode is great to use)

Scrolling with mousewhell sortof works normally, but when the app slows down like this, it is almost impossible. Ctrl+Alt+d/u is the only feasable ones to press to scroll up

Edit: running opencode directly in Kitty term, Linux. Not inside nvim, which is in another tab (closing it does not make a difference, so it is not some filesystem interference)

ten3roberts avatar Nov 05 '25 00:11 ten3roberts

Looking into it.

kommander avatar Nov 05 '25 00:11 kommander

Experiencing the same - long sessions become unusable after a while. CPU usage of the opencode process hovers at 100%, even when seemingly idle. Sometimes even /exit won't work and I need to force quit the application.

sanderbollen-clockworks avatar Nov 07 '25 09:11 sanderbollen-clockworks

This should be somewhat better in the latest version?

kommander avatar Nov 12 '25 14:11 kommander

This should be somewhat better in the latest version?

It is, thank you

Still experiencing the issue with cpu driven spikes interfering with typing, but it is a lot better

Had to update manually (curl | bash) to get it a while ago, but it seems to lessen it a lot, and also scroll the window again 🙌

Note: the update introducing the sidebar with the todolist was not automatic, and I had to manually curl bash install it, but otherwise autoupdates have worked, which is great.

ten3roberts avatar Nov 12 '25 17:11 ten3roberts