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
Opencode hangs indefinitely if exited during waiting for subagents to finish #24391
So I tried to use the subagents tool with local multiple parallel request execution.
I did 2x execution and it was very good.
After that I tried 4x but it was very bad, probably because of my weak hardware, and while 2/4 agents were not finished yet, I disabled the local inference engine (vllm) (it got stuck on waiting for requests to finish). Then I pressed many times on the stop. Probably requests finished, but I'm not sure, and I closed the app.
After that I tried to revert to use feature "revert" to a previous message, but it didn't finish, and also after that every message I type visually gets added to the "returned queue" and nothiong is executing, the other parallel sessions are not executing too, I can't even delete the session because the delete button does nothing, nor compress.
I found everything about opencode taht I customized and deleted it, but to no avail, the new requests just don't go off. Reinstallation from newly downloaded installer doesn't change anything either.
After that I found that actually it has main files at .local\share\opencode location with db and wal and stuff, gonna try to delete one by one everything I find and figure out if something is gonna help at all, will updated later. UPDATE: it DID NOT, in fact, help.
There were "paused": state sessions somewhere in inner json, I deleted all the workspaces containing them but it only changed something visually unimportant and then got stuck again.
UPDATE: uninstalling with deleting all user data works, nothing else does.
It would be preferrable to at least know what part of user data is causing the freezing, because I had to delete all active workspace sessions and configuration to make sure it finally unstucked.
UPDATE2: apparently it's fixed only for 1 session and if I delete it the next may hang again. PROBABLY fixable by replacing the backuped config dir from clear installation (the requests to remote models start working). Will update later if I will see any real reason or constant fix.
Plugins
No
OpenCode version
1.14.25 but happened on the previous, I updated later (the update worked)
Steps to reproduce
using "reset to previous state" feature during failed/interrupted subagent execution or something
Screenshot and/or share link
I see the db is here gonna delete it to check if it helps.
For me closing OpenCode, reopening, archiving zombie sessions, switching asap to another workspace, and deleting the one with the zombie session helped. I could recreate a new workspace or even add back the old workspace and it was working, although creating new sessions in the old workspace led to memory leaks again, whereas in other workspaces it's working fine as expected.
So there is something that causes memory leaks under some circumstances. Indeed, as I wrote in #24342, in my case the app explicitly crashed with an out of memory error when left hanging long enough.
Activity
github-actions commentedon Apr 25, 2026
This issue might be a duplicate of existing issues. Please check:
If your issue is distinct, please add details that differentiate it from the above.
lrq3000 commentedon Apr 25, 2026
For me closing OpenCode, reopening, archiving zombie sessions, switching asap to another workspace, and deleting the one with the zombie session helped. I could recreate a new workspace or even add back the old workspace and it was working, although creating new sessions in the old workspace led to memory leaks again, whereas in other workspaces it's working fine as expected.
So there is something that causes memory leaks under some circumstances. Indeed, as I wrote in #24342, in my case the app explicitly crashed with an out of memory error when left hanging long enough.
github-actions commentedon Jul 4, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.