Skip to content

Random restart of the sessions and failure in response #52959

Closed as not planned
Closed as not planned

Description

@Savadimihir2003

Description

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.

Plugins

nil

OpenCode version

v2.0.22

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

Windows terminal

Activity

  1. github-actions commented on Oct 3, 2026

    @github-actions
    Contributor

    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.
  2. opencodejr commented on Oct 27, 2026

    @opencodejr
    Contributor

    Thanks for the report! To work out what is happening, could you share a few more details?

    1. Where you see it: the opencode TUI in Windows Terminal, opencode run, or the desktop app?
    2. Steps: for example, cd into a new empty folder, run opencode, send a prompt, and then what happens.
    3. 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".
    4. Provider and model you are using.
    5. 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.
    6. 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):

  3. opencodejr commented on Oct 30, 2026

    @opencodejr
    Contributor

    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!

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions