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
Infinite "Restarting service.." for OC v2 (on Windows) #57864
opencode api get /api/info:
{"version":"2.1.2","pid":16492,"urls":["http://127.0.0.1:45278"],"paths":{"tmp":"C:\Users\redacted\AppData\Local\Temp\opencode"},"capabilities":{"persistentPty":true}}
Thanks for reporting this, @gimlichael. The "Restarting service…" screen means the TUI can't reach its background service (opencode serve --service), so we need to know why that service doesn't come back after sleep. Next time it happens, could you send the following before you restart your machine?
Logs: the newest files from %USERPROFILE%\.local\share\opencode\log (press WIN+R and paste that path), covering the time around the resume from sleep. Look for lines like Background service is unresponsive, Event stream stalled or already in use.
Service state: in another PowerShell window, the output of opencode service status. Then tell us whether opencode service restart, or opencode service stop followed by starting opencode again, gets you working without a reboot.
Port state: if it still doesn't recover, the output of Get-Process opencode* and netstat -ano | findstr LISTENING, plus the service port shown by opencode service status. This tells us whether the port is still held after the processes have exited.
Environment: how you installed OpenCode (npm @opencode/cli, installer, etc.), and whether you use a VPN, proxy (HTTP_PROXY/HTTPS_PROXY), or firewall/endpoint security software that might reconnect when the machine wakes.
You can reply here with the details, or edit the issue. If you edit it, please also leave a short comment saying you've updated it so we know you're done.
These existing issues might be related, ordered from most to least likely. Please check whether one of them already describes your problem:
We're closing this for now because we haven't heard back with the details we asked for. Without the logs from %USERPROFILE%\.local\share\opencode\log from around the resume from sleep, and the output of opencode service status, we can't tell why the background service doesn't come back, or whether this is the same as #57038, #54181 or #52054.
If it happens again, please reply here with those details, and say whether opencode service restart or opencode service stop gets you working without a reboot. We can reopen the issue then. Thanks, @gimlichael!
Activity
opencode-agent commentedon Oct 21, 2026
Thanks for reporting this, @gimlichael. The "Restarting service…" screen means the TUI can't reach its background service (
opencode serve --service), so we need to know why that service doesn't come back after sleep. Next time it happens, could you send the following before you restart your machine?%USERPROFILE%\.local\share\opencode\log(pressWIN+Rand paste that path), covering the time around the resume from sleep. Look for lines likeBackground service is unresponsive,Event stream stalledoralready in use.opencode service status. Then tell us whetheropencode service restart, oropencode service stopfollowed by startingopencodeagain, gets you working without a reboot.Get-Process opencode*andnetstat -ano | findstr LISTENING, plus the service port shown byopencode service status. This tells us whether the port is still held after the processes have exited.@opencode/cli, installer, etc.), and whether you use a VPN, proxy (HTTP_PROXY/HTTPS_PROXY), or firewall/endpoint security software that might reconnect when the machine wakes.You can reply here with the details, or edit the issue. If you edit it, please also leave a short comment saying you've updated it so we know you're done.
These existing issues might be related, ordered from most to least likely. Please check whether one of them already describes your problem:
no_proxy(includes a Windows report in the comments)gimlichael commentedon Oct 21, 2026
Just confirmed that
opencode service restartworks as a workaround.opencode-agent commentedon Oct 24, 2026
We're closing this for now because we haven't heard back with the details we asked for. Without the logs from
%USERPROFILE%\.local\share\opencode\logfrom around the resume from sleep, and the output ofopencode service status, we can't tell why the background service doesn't come back, or whether this is the same as #57038, #54181 or #52054.If it happens again, please reply here with those details, and say whether
opencode service restartoropencode service stopgets you working without a reboot. We can reopen the issue then. Thanks, @gimlichael!