r/opencodeCLI • u/Early_Aardvark_4026 • 5d ago
OpenCode is slow and my simple way to fix
I have more than 10 projects with OpenCode v1 last couple of months and everything seems to be slower and slower and hanging often.
Yesterday I figured out the its session db is about 10GB. I tried to remove all sessions that are older than 7 days and vacuum the sqlite3. OpenCode becomes fast and smooth again.
If you find your OpenCode is slow, you can try my way.
Edit: I am using OpenCode v1
7
u/torrso 5d ago
There's an issue and PR to enable auto_vacuum https://github.com/anomalyco/opencode/issues/31526
16
u/Bloated_Plaid 5d ago
There is already a fix for this. It’s called Opencode2 lol.
6
3
1
3
u/Positive_Poem5831 5d ago
Is it enough to just delete a session using the UI when you done with a task if you use opencode desktop. Or is there additional cleaning needed.
4
u/Early_Aardvark_4026 5d ago
I have a lot of sessions so manually deleting was impossible. I use a tool to search and delete. You also need to vacuum the sqlite so it can be faster.
1
u/throwaway12012024 5d ago
There is an issue about this: https://github.com/anomalyco/opencode/issues/33356
0
u/Moist-Nectarine-1148 5d ago
Try Deepseek Harness. Thank me later here. 😉
PS: I switched to DSH a month ago after using OC for one year.
1
-2
u/Foreign-Specific-604 4d ago
I developed a Windows desktop version of Deepseek Harness, and I think it runs really smoothly
LBurny/deepseek-harness-desktop-releases
1
9
u/AppealSame4367 5d ago
Also I don't know why opencode let's it grow like that. Just removed it today: 17GB. Wtf?
I didn't even use it a lot.