Skip to content

Desktop stuck in "thinking" mode - sidecar stream never completes (v1.17.18, Windows) #36370

Closed as duplicate

Description

@eunjinue

Description

Body:

Environment

  • OS: Windows 10/11
  • OpenCode Desktop: v1.17.18 (Electron, packaged)
  • Node.js: (bundled with Electron)

Description

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).

Reproduction Steps

  1. Launch OpenCode Desktop
  2. Select any model (free or custom)
  3. Send a message (e.g., "你好")
  4. App shows "thinking" indicator indefinitely

Log Analysis

Sidecar starts and becomes ready

sidecar connection started { url: 'http://127.0.0.1:XXXXX' }
spawning sidecar { url: 'http://127.0.0.1:XXXXX' }
server ready { url: 'http://127.0.0.1:XXXXX' }

Stream starts but never completes

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

  1. Restarted OpenCode — same issue
  2. Cleared all cache/session data (AppData\Roaming\ai.opencode.desktop, ~/.local/share/opencode, ~/.cache/opencode) — same issue
  3. Reinstalled OpenCode completely — same issue
  4. Verified API works directly — tested https://opencode.ai/zen/v1/chat/completions via PowerShell, returns valid responses
  5. 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:

  1. Hanging on the @opencode-ai/plugin@local npm dependency install (blocking the event loop?)
  2. Stuck waiting for a response that never arrives due to network/proxy configuration
  3. 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
  • No firewall/antivirus blocking detected

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. github-actions commented on Jul 11, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    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.

  2. Liujian-keen commented on Jul 11, 2026

    @Liujian-keen

    使用桌面版,local web会停止,然后应用半死(可能有几分种后才恢复响应),任务出现opencode(7),cpu暴涨,重起opencode后web服务正常,又能对话调用模式,接着一会就卡死,试过任何办法。

  3. EchoCode101 commented on Aug 16, 2026

    @EchoCode101

    Environment

    • OS: Windows 11 Pro 25H2
    • OpenCode: Windows App, v1.18.18
    • 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:

    1. Open Task Manager.
    2. Find the OpenCode process.
    3. Disable Efficiency mode.
    4. Optionally set the process priority to High.
    5. 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.

    Screenshots:

    Task Manager / OpenCode process configuration

    Process priority configuration

    High Priority Mode Check

  4. neriousy commented on Oct 1, 2026

    @neriousy
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions