Skip to content

Desktop: session stops responding when its workspace folder is deleted (prompt_async failed: FileSystem.realPath ENOENT) #55129

Closed as not planned

Description

@fahimsiddiqui462-stack

Environment

  • OS: Windows (win32), opencode Desktop (AppData\Local\Programs\@opencode-aidesktop)
  • Provider/model: opencode / big-pickle (ai-sdk runtime)
  • Shell: Windows PowerShell
  • Repo folder is not a git repo (global storage path used)

Symptom
A tab/session stops responding entirely. Subsequent messages are sent but never processed; the tab just sits there. Refreshing the UI and restarting the app do not help.

Log evidence (~/.local/share/opencode/log/opencode.log)

Repeated for the stuck session on every prompt:

level=ERROR message="prompt_async failed" sessionID=<stuck> cause="Cause([Die(PlatformError: NotFound: FileSystem.realPath (C:\\Users\\Muhammad Siddiqui\\Documents\\agent) (cause: Error: ENOENT: no such file or directory, lstat 'C:\\Users\\Muhammad Siddiqui\\Documents\\agent'))])"

And during startup/path-watching:

level=ERROR message=failed ref=err_... error="PlatformError: NotFound: FileSystem.realPath (C:/Users/Muhammad Siddiqui/Documents/agent) (cause: Error: ENOENT: no such file or directory, lstat 'C:\\Users\\Muhammad Siddiqui\\Documents\\agent')" cause="PlatformError: NotFound: FileSystem.realPath ... at Server.listen ..."

Root cause observed
The session's workspace directory C:\Users\Muhammad Siddiqui\Documents\agent no longer exists (it was deleted/moved). Every prompt in that session fails during path resolution (FileSystem.realPath), so the session never streams a reply and looks frozen.

Expected behavior
Sessions pointing at a missing directory should recover, clear the stale workspace reference, or surface a clear error — not silently stop responding while still accepting input.

Steps to reproduce

  1. Open a project folder in the Desktop app.
  2. Delete or rename that folder.
  3. Go back to that tab and send a message.
  4. No reply; the request fails internally with FileSystem.realPath ... ENOENT.

Workaround found
Close the stale tab and reopen the correct folder (or remove the session data for the deleted path).

Activity

  1. opencode-agent commented on Oct 13, 2026

    @opencode-agent
    Contributor

    Thanks for the clear report and the log lines, they made this easy to trace.

    This looks like OpenCode v1 Desktop: the @opencode-aidesktop install path and the prompt_async failed log message both come from v1. v1 now only gets fixes for critical bugs (data loss, security problems, or breakage with no workaround). Since closing the tab and reopening the right folder works, this is unlikely to be fixed in v1.

    v2 handles this case differently. A session whose folder no longer exists is reported as "Session location unavailable", and you're offered to move it to another directory instead of the session silently hanging. We'd encourage upgrading to v2 (@opencode/cli / the current Desktop app).

    Related issues:

    If you think this is critical, or you see the same behaviour on v2, please reply here with your opencode --version and we'll take another look.

  2. opencode-agent commented on Oct 14, 2026

    @opencode-agent
    Contributor

    Closing this as not planned. It's a v1 Desktop issue (the prompt_async failed / FileSystem.realPath ENOENT after a session's folder is deleted), and v1 only gets fixes for critical bugs. Closing the tab and reopening the right folder works around it. In v2, a missing session folder shows "Session location unavailable" instead of the session hanging silently (see #55035, and #50951 / #50548 for the v2 Desktop follow-ups).

    If you see this on v2, please open a new issue with your opencode --version and the steps. Thanks again for the detailed report.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions