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
Desktop stuck in "thinking" mode - sidecar stream never completes (v1.17.18, Windows) #36370
When sending any message in OpenCode Desktop, the app enters a permanent "thinking" state and never returns a response. This happens with all models — built-in free models (deepseek-v4-flash-free, hy3-free, mimo-v2.5-free) and custom providers (Agnes, Sensenova).
From ~/.local/share/opencode/log/opencode.log:
message=stream providerID=opencode modelID=hy3-free session.id=ses_XXX small=false agent=build mode=primary
message="llm runtime selected" llm.runtime=ai-sdk llm.provider=opencode llm.model=hy3-free
After this, no further log entries — the stream hangs silently.
Sidecar exits after ~6 minutes
From Electron logs:
warn (utility) sidecar exited { code: 0 }
Persistent npm warning
WARN background dependency install failed
dir="C:\Users<user>.config\opencode"
error="Cause(Fail(NpmInstallFailedError (cause: @opencode-ai/plugin: No matching version found for @opencode-ai/plugin@local.)))"
Git lock file conflict
WARN failed to add snapshot files
exitCode=128
stderr="fatal: Unable to create '.../snapshot/global/.../index.lock': File exists.
Another git process seems to be running in this repository, or the lock file may be stale"
What I've Tried
Restarted OpenCode — same issue
Cleared all cache/session data (AppData\Roaming\ai.opencode.desktop, ~/.local/share/opencode, ~/.cache/opencode) — same issue
Reinstalled OpenCode completely — same issue
Verified API works directly — tested https://opencode.ai/zen/v1/chat/completions via PowerShell, returns valid responses
Checked proxy — v2rayN/xray running on 127.0.0.1:10808, but no proxy env vars are set (HTTP_PROXY, HTTPS_PROXY all empty)
Hypothesis
The sidecar's Node.js process may be:
Hanging on the @opencode-ai/plugin@local npm dependency install (blocking the event loop?)
Stuck waiting for a response that never arrives due to network/proxy configuration
The useEnvProxy() → http.setGlobalProxyFromEnv() call may be interfering with outgoing requests even when no proxy env vars are set
Additional Info
The @opencode-ai/plugin@local error appears every time the sidecar initializes
Sidecar process (PID) is alive and listening on its port, but the stream never completes
If your issue is distinct (e.g. the stream hang persists even after the plugin error is resolved), please add that context and link back to those issues.
Issue: OpenCode occasionally becomes unresponsive/stops displaying output, despite apparently continuing to work in the background.
Background
I'm experiencing a very similar form of the "stuck/busy" behavior described here.
In my case, OpenCode does not necessarily appear completely frozen. It sometimes stops printing thoughts or text for an extended period, while the application itself remains open.
Interestingly, clicking around the UI a few times or opening Settings sometimes causes it to become responsive again. I've also observed cases where a large amount of output suddenly appears in a burst after the stall, which makes it look like OpenCode was continuing to process in the background and the UI/output was simply not being updated.
What I Found
I noticed that Windows Task Manager had automatically enabled Efficiency mode for the OpenCode process.
This appears to put the process under Windows' resource-management policies, potentially reducing its CPU priority/resource allocation when Windows considers it a background or less-important workload.
The important part is that Windows seems to re-enable this behavior after restarting OpenCode or rebooting the system.
Workaround
As a temporary workaround, disabling Efficiency mode for the OpenCode process in Task Manager made a noticeable difference.
I also increased the process priority, which made OpenCode significantly more responsive and reduced the frequency/severity of the apparent hangs.
For a more persistent solution, I'm using Process Lasso Pro to apply a persistent process rule to OpenCode. This allows the process configuration to be reapplied automatically instead of manually changing it in Task Manager after every restart.
In short:
Open Task Manager.
Find the OpenCode process.
Disable Efficiency mode.
Optionally set the process priority to High.
For a persistent configuration, use Process Lasso to apply the desired process rules automatically.
This is obviously not a confirmed root-cause fix, and I wouldn't claim that Windows Efficiency mode is responsible for the original issue. However, in my case it made the application substantially more responsive and the stalls became negligible.
The database/storage cleanup mentioned above also seems like a useful troubleshooting step, particularly given the reports involving large amounts of OpenCode data.
Additional Observation
The combination of:
large/generated files being present in the workspace,
OpenCode potentially scanning changed files after tool interactions,
and Windows resource throttling the OpenCode process
could potentially explain why the application sometimes appears "stuck" even though work is still happening in the background.
So if you're seeing the same behavior on Windows, I'd suggest checking Task Manager → Efficiency mode before assuming that OpenCode itself has completely deadlocked.
Closing as a duplicate of #32366, which tracks the desktop UI staying on "thinking" when the stream ends or errors without completing. Please add your version, OS and logs there.
Activity
github-actions commentedon Jul 11, 2026
This issue might be a duplicate of existing issues. Please check:
@opencode-ai/plugin@localnpm install failure + hang symptom@opencode-ai/plugin@localnot found — same root error.opencode/package.jsonreferences non-existent@opencode-ai/plugin@local— same underlying causeIf your issue is distinct (e.g. the stream hang persists even after the plugin error is resolved), please add that context and link back to those issues.
Liujian-keen commentedon Jul 11, 2026
使用桌面版,local web会停止,然后应用半死(可能有几分种后才恢复响应),任务出现opencode(7),cpu暴涨,重起opencode后web服务正常,又能对话调用模式,接着一会就卡死,试过任何办法。
EchoCode101 commentedon Aug 16, 2026
Environment
Background
I'm experiencing a very similar form of the "stuck/busy" behavior described here.
In my case, OpenCode does not necessarily appear completely frozen. It sometimes stops printing thoughts or text for an extended period, while the application itself remains open.
Interestingly, clicking around the UI a few times or opening Settings sometimes causes it to become responsive again. I've also observed cases where a large amount of output suddenly appears in a burst after the stall, which makes it look like OpenCode was continuing to process in the background and the UI/output was simply not being updated.
What I Found
I noticed that Windows Task Manager had automatically enabled Efficiency mode for the OpenCode process.
This appears to put the process under Windows' resource-management policies, potentially reducing its CPU priority/resource allocation when Windows considers it a background or less-important workload.
The important part is that Windows seems to re-enable this behavior after restarting OpenCode or rebooting the system.
Workaround
As a temporary workaround, disabling Efficiency mode for the OpenCode process in Task Manager made a noticeable difference.
I also increased the process priority, which made OpenCode significantly more responsive and reduced the frequency/severity of the apparent hangs.
For a more persistent solution, I'm using Process Lasso Pro to apply a persistent process rule to OpenCode. This allows the process configuration to be reapplied automatically instead of manually changing it in Task Manager after every restart.
In short:
This is obviously not a confirmed root-cause fix, and I wouldn't claim that Windows Efficiency mode is responsible for the original issue. However, in my case it made the application substantially more responsive and the stalls became negligible.
The database/storage cleanup mentioned above also seems like a useful troubleshooting step, particularly given the reports involving large amounts of OpenCode data.
Additional Observation
The combination of:
could potentially explain why the application sometimes appears "stuck" even though work is still happening in the background.
So if you're seeing the same behavior on Windows, I'd suggest checking Task Manager → Efficiency mode before assuming that OpenCode itself has completely deadlocked.
Screenshots:
neriousy commentedon Oct 1, 2026
Closing as a duplicate of #32366, which tracks the desktop UI staying on "thinking" when the stream ends or errors without completing. Please add your version, OS and logs there.