Skip to content

bug(windows): CLI and Desktop repeatedly restart/expire sessions without AI responses; WSL2 works #55220

Closed as not planned

Description

@mixxermannipro

Description

Description

On native Windows, both OpenCode CLI and Desktop repeatedly show "Restarting Session", "Session Expired", or similar messages.

Sessions restart continuously without ever producing an AI response. This occurs regardless of the selected AI model or subscription.

Important comparison: OpenCode works reliably under Ubuntu via WSL2 on the same Windows machine.

Steps to reproduce

  1. Launch OpenCode CLI natively on Windows.
  2. Start a session and submit a simple prompt.
  3. Observe repeated restart or expiry messages without receiving a response.
  4. Repeat using the native Windows Desktop application.
  5. Run OpenCode under Ubuntu via WSL2 on the same PC.
  6. Observe that responses work normally under WSL2.

Expected behavior

Sessions should remain functional and deliver AI responses, or display a specific actionable error.

Actual behavior

Both native Windows clients repeatedly restart or expire sessions without delivering any AI response.

Environment

Property| Value
Operating system| Windows, exact version unknown
OpenCode CLI version| Unknown
OpenCode Desktop version| Unknown
Models| Multiple, exact models unknown
Subscription| Multiple, exact plans unknown
WSL2 environment| Ubuntu, functional
Logs| Not available
Root cause| Unknown

Related issues

These reports describe potentially related symptoms, but an identical root cause has not been established.

Investigation request

Please investigate whether the Windows CLI and Desktop share a service lifecycle or event stream failure that could explain these symptoms.

The reliable operation under WSL2 on the same machine may help isolate the problem.

No specific root cause is asserted without supporting logs or diagnostics.

Plugins

No response

OpenCode version

The latest

Steps to reproduce

  1. Open opencode cli oder Desktop on Windows.
  2. Use It
  3. IT doesnt work

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

Windows Terminal

Activity

  1. opencode-agent commented on Oct 13, 2026

    @opencode-agent
    Contributor

    Thanks for the report and for comparing with WSL2, that helps narrow it down. On native Windows, this symptom ("Restarting service…" and no reply ever arriving) has several known causes that look the same on screen. To tell which one you're hitting, could you share:

    1. The output of opencode --version on Windows, and how you installed it (npm @opencode/cli, installer, etc.), plus the Desktop app version.
    2. The exact message you see, or a screenshot of it.
    3. The most recent log file from %USERPROFILE%\.local\share\opencode\log (I believe this is the default location on Windows), especially the lines around a restart. Look for event stream disconnected or Event stream stalled, and for a new serve --service start right after. Please remove any tokens or personal paths before posting.
    4. Whether HTTP_PROXY / HTTPS_PROXY (or a system proxy) is set on Windows, and whether NO_PROXY includes localhost,127.0.0.1.
    5. Which antivirus or security software you run (e.g. Kaspersky).
    6. Whether there is a .git folder directly in your home folder (%USERPROFILE%\.git).

    Possibly related issues, ordered by likelihood:

    If one of these matches, please say so. 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 you're done.

  2. mixxermannipro commented on Oct 14, 2026

    @mixxermannipro
    Author

    Thanks for the report and for comparing with WSL2, that helps narrow it down. On native Windows, this symptom ("Restarting service…" and no reply ever arriving) has several known causes that look the same on screen. To tell which one you're hitting, could you share:

    1. The output of opencode --version on Windows, and how you installed it (npm @opencode/cli, installer, etc.), plus the Desktop app version.
    2. The exact message you see, or a screenshot of it.
    3. The most recent log file from %USERPROFILE%\.local\share\opencode\log (I believe this is the default location on Windows), especially the lines around a restart. Look for event stream disconnected or Event stream stalled, and for a new serve --service start right after. Please remove any tokens or personal paths before posting.
    4. Whether HTTP_PROXY / HTTPS_PROXY (or a system proxy) is set on Windows, and whether NO_PROXY includes localhost,127.0.0.1.
    5. Which antivirus or security software you run (e.g. Kaspersky).
    6. Whether there is a .git folder directly in your home folder (%USERPROFILE%\.git).

    Possibly related issues, ordered by likelihood:

    If one of these matches, please say so. 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 you're done.

    Thanks for the detailed investigation. Here is some additional information:

    • OpenCode versions: I tested multiple releases, including the latest v2 release available at the time and the latest v1 release. The issue occurred across versions.
    • Desktop: Latest available version at the time of testing.
    • Windows: Fully updated Windows installation (exact build not yet collected).
    • Installation methods: I tried multiple installation methods, with the same result.
    • Proxy: I have not manually changed any proxy settings. I have not yet verified the environment variables or system proxy configuration.
    • Home directory: A ".git" directory exists directly under "%USERPROFILE%". I have not yet checked whether it is empty or related to the issue.
    • Logs: I have not collected the logs yet.
    • Antivirus: Not yet confirmed.

    Most importantly: Both native Windows CLI and Desktop exhibit the issue, while OpenCode under Ubuntu/WSL2 works reliably on the exact same machine.

    Given the existing ".git" directory in my Windows home folder, #52049 seems particularly worth investigating.

    I will try to provide logs and additional diagnostics when possible. Thanks for your help!

  3. opencode-agent commented on Oct 16, 2026

    @opencode-agent
    Contributor

    We're closing this for now because we haven't heard back. Without the OpenCode version, the exact message and the logs from around a restart, we can't tell whether this is the watchdog/stray .git issue (#52049), a proxy without no_proxy (#52054), antivirus interference (#48771) or something new.

    If it still happens, please reply with the details asked for above: the opencode --version output, a screenshot of the message, the recent log lines from the %USERPROFILE%\.local\share\opencode\log folder, your proxy settings and any antivirus software. We can reopen it then. If one of the linked issues matches, you can follow that one instead. Thanks!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions