Long prompt history stalls the app, long load time #2480

Open
opened 2026-02-16 17:35:51 -05:00 by yindo · 11 comments
Owner

Originally created by @bcardarella on GitHub (Nov 2, 2025).

Originally assigned to: @kommander on GitHub.

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

Originally created by @bcardarella on GitHub (Nov 2, 2025). Originally assigned to: @kommander on GitHub. ### 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_
yindo added the opentuibug labels 2026-02-16 17:35:51 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 2, 2025):

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] commented on GitHub (Nov 2, 2025): 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.
Author
Owner

@thdxr commented on GitHub (Nov 2, 2025):

is it also slow when you scroll?

@thdxr commented on GitHub (Nov 2, 2025): is it also slow when you scroll?
Author
Owner

@bcardarella commented on GitHub (Nov 2, 2025):

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 commented on GitHub (Nov 2, 2025): 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.
Author
Owner

@ten3roberts commented on GitHub (Nov 4, 2025):

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 commented on GitHub (Nov 4, 2025): 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)
Author
Owner

@kommander commented on GitHub (Nov 4, 2025):

Looking into it.

@kommander commented on GitHub (Nov 4, 2025): Looking into it.
Author
Owner

@sanderbollen-clockworks commented on GitHub (Nov 7, 2025):

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 commented on GitHub (Nov 7, 2025): 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.
Author
Owner

@kommander commented on GitHub (Nov 12, 2025):

This should be somewhat better in the latest version?

@kommander commented on GitHub (Nov 12, 2025): This should be somewhat better in the latest version?
Author
Owner

@ten3roberts commented on GitHub (Nov 12, 2025):

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 commented on GitHub (Nov 12, 2025): > 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.
Author
Owner

@eastmancr commented on GitHub (Nov 29, 2025):

Since this has some activity, I'm still getting this on 1.0.119 and 1.0.120 (and probably earlier but I didn't know this was the issue). I see the git add . process slamming 1 core and opencode will pause between messages from the agent as it presumably takes a snapshot even after just reading files. I found 668GB of snapshots in ~/.local/share/opencode/snapshots but even after pruning it to 5GB still takes multiple minutes for the git process to finish in the background. When using opencode outside of that directory it goes back to being responsive. For example, ~/dev/ is the git dir opencode is taking snapshots of, projects are laid out as ~/dev/<lang>/<proj> and invoking opencode anywhere in ~/dev/ will cause it to buffer between messages as it runs git add . for 2 or 3 minutes. Disabling snapshots speeds it up, but of course I would not like to keep them off.

ETA: I only access opencode through the TUI, as the issue I came from #3182 mentions the web interface

@eastmancr commented on GitHub (Nov 29, 2025): Since this has some activity, I'm still getting this on 1.0.119 and 1.0.120 (and probably earlier but I didn't know this was the issue). I see the `git add .` process slamming 1 core and opencode will pause between messages from the agent as it presumably takes a snapshot even after just reading files. I found 668GB of snapshots in ~/.local/share/opencode/snapshots but even after pruning it to 5GB still takes multiple minutes for the git process to finish in the background. When using opencode outside of that directory it goes back to being responsive. For example, ~/dev/ is the git dir opencode is taking snapshots of, projects are laid out as ~/dev/\<lang>/\<proj> and invoking opencode anywhere in ~/dev/ will cause it to buffer between messages as it runs `git add .` for 2 or 3 minutes. Disabling snapshots speeds it up, but of course I would not like to keep them off. ETA: I only access opencode through the TUI, as the issue I came from [#3182](https://github.com/sst/opencode/issues/3182) mentions the web interface
Author
Owner

@bcardarella commented on GitHub (Nov 29, 2025):

I'm seeing it less but things like the prompt input will hang randomly. It's gotten better though. I have seen the agent crash out from time to time but it doesn't give a stack trace so I haven't reported it. I figure it just hits some memory upperbound

@bcardarella commented on GitHub (Nov 29, 2025): I'm seeing it less but things like the prompt input will hang randomly. It's gotten better though. I have seen the agent crash out from time to time but it doesn't give a stack trace so I haven't reported it. I figure it just hits some memory upperbound
Author
Owner

@kommander commented on GitHub (Dec 20, 2025):

This should be greatly improved in newer versions?

@kommander commented on GitHub (Dec 20, 2025): This should be greatly improved in newer versions?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2480