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
Random restart of the sessions and failure in response #52959
whenever i start a new session in a new folder and ask a question the session restarts and sometimes fails to respond giving the error:failed to create session <session_id> and then again i have to ask the same question to get the answer.
This issue might be a duplicate of an existing issue. Please check:
#49561: New Desktop sessions fail to respond after prompt_async fails because a worktree directory is missing, which may be related to the reported new-session failure.
Thanks for the report! To work out what is happening, could you share a few more details?
Where you see it: the opencode TUI in Windows Terminal, opencode run, or the desktop app?
Steps: for example, cd into a new empty folder, run opencode, send a prompt, and then what happens.
The exact error text, copied as it appears, or a screenshot. Please also say whether you see a notice like "The server restarted while you were working".
Provider and model you are using.
Logs: the relevant lines from %USERPROFILE%\.local\share\opencode\log\opencode.log from around the time it happens. Lines mentioning Event stream stalled, Background service is unresponsive or background service starting are especially useful.
Is the new folder inside a folder that contains a .git directory, for example a stray .git in your user folder?
You can reply here with the details, or edit the issue. If you edit it, please also leave a comment saying you've updated it, so we know when you're done.
These existing issues may already cover your problem (ordered by likelihood):
We haven't heard back, so I'm closing this for now. Without the exact error text, the steps to reproduce and the log lines from %USERPROFILE%\.local\share\opencode\log\opencode.log, we can't tell what is restarting your sessions on 2.0.22.
If it's the Windows background-service restart problem (no reply, then you have to ask again), these issues may already cover it. You can follow them for updates:
Activity
github-actions commentedon Oct 3, 2026
This issue might be a duplicate of an existing issue. Please check:
prompt_asyncfails because a worktree directory is missing, which may be related to the reported new-session failure.opencodejr commentedon Oct 27, 2026
Thanks for the report! To work out what is happening, could you share a few more details?
opencodeTUI in Windows Terminal,opencode run, or the desktop app?cdinto a new empty folder, runopencode, send a prompt, and then what happens.%USERPROFILE%\.local\share\opencode\log\opencode.logfrom around the time it happens. Lines mentioningEvent stream stalled,Background service is unresponsiveorbackground service startingare especially useful..gitdirectory, for example a stray.gitin your user folder?You can reply here with the details, or edit the issue. If you edit it, please also leave a comment saying you've updated it, so we know when you're done.
These existing issues may already cover your problem (ordered by likelihood):
.gitfolder in their home directory.opencodejr commentedon Oct 30, 2026
We haven't heard back, so I'm closing this for now. Without the exact error text, the steps to reproduce and the log lines from
%USERPROFILE%\.local\share\opencode\log\opencode.log, we can't tell what is restarting your sessions on 2.0.22.If it's the Windows background-service restart problem (no reply, then you have to ask again), these issues may already cover it. You can follow them for updates:
If it still happens, reply here with those details and we can reopen this. Thanks!