Skip to content

Desktop: prompt silently fails with no response/error when the session's project directory no longer exists #58631

Closed as not planned

Description

@bcow0092-lgtm

Summary

On the desktop app, if a session's project directory is renamed, moved, or deleted, sending a prompt produces no response and no error. The UI just sits there ("没反应"). The server logs show prompt_async failed with PlatformError: NotFound: FileSystem.realPath (...) (ENOENT).

The failure is never surfaced to the user, so it looks like the assistant is stuck / silently ignoring the message.

Environment

  • opencode desktop 1.18.30
  • Windows 11
  • Model: deepseek/deepseek-flash (built-in deepseek provider), agent build
  • The issue is repo/model independent — it happens for any model.

Steps to reproduce

  1. Open a project folder in opencode (e.g. D:\pythonProject\电商演示系统) and create a session.
  2. Close opencode, then rename / move / delete that folder outside opencode (e.g. rename 电商演示系统 → ecommerce-demo).
  3. Reopen opencode, go to the existing session and send a message.

Expected

  • A visible error indicating the project directory no longer exists, and/or
  • A way to relocate/re-point the session to the new directory.

Actual

  • No assistant output, no error toast, no visible failure. The turn just does nothing.

Evidence (server log)

~/.local/share/opencode/log/opencode.log:

timestamp=2026-10-24T05:59:11.701Z level=ERROR run=bb2bf88c message="prompt_async failed" sessionID=ses_e93821e37ffe7Iwk4m4GL4mXEc cause="Cause([Die(PlatformError: NotFound: FileSystem.realPath (D:\pythonProject\电商演示系统) (cause: Error: ENOENT: no such file or directory, lstat 'D:\pythonProject\电商演示系统'))])"

timestamp=2026-10-24T06:08:01.154Z level=ERROR run=3bdb2e3e message="prompt_async failed" sessionID=ses_e93821e37ffe7Iwk4m4GL4mXEc cause="Cause([Die(PlatformError: NotFound: FileSystem.realPath (D:\pythonProject\电商演示系统) (cause: Error: ENOENT: no such file or directory, lstat 'D:\pythonProject\电商演示系统'))])"

timestamp=2026-10-24T06:15:04.684Z level=ERROR run=66f8f37c message="prompt_async failed" sessionID=ses_e93821e37ffe7Iwk4m4GL4mXEc cause="Cause([Die(PlatformError: NotFound: FileSystem.realPath (D:\pythonProject\电商演示系统) (cause: Error: ENOENT: no such file or directory, lstat 'D:\pythonProject\电商演示系统'))])"

Same pattern also occurred for sessions whose directories were renamed/removed:

  • PlatformError: NotFound: FileSystem.realPath (D:/pythonProject/api_test) (renamed to api_test_demo)
  • PlatformError: NotFound: FileSystem.realPath (E:/ruoyi)

The session record still points at the old path (e.g. session.directory = D:/pythonProject/电商演示系统), and the server resolves realPath per prompt, which fails with ENOENT.

Suggested fix

  • Surface the prompt_async failure to the desktop UI (error toast) instead of failing silently.
  • Or detect a missing session directory before sending and offer to relocate the session / re-open the project at its new path.
  • Ideally, handle ENOENT on FileSystem.realPath gracefully with an actionable message.

Activity

  1. opencode-agent commented on Oct 24, 2026

    @opencode-agent
    Contributor

    Thanks for the detailed report and the log lines. They make the cause clear: the session still points at the old folder, and every prompt fails in FileSystem.realPath without the error ever reaching the UI.

    The version here (1.18.30) is OpenCode v1. v1 now only gets fixes for critical bugs (data loss, security problems, or breakage with no workaround). Reopening the project at its new path works around this one, so it's unlikely to be fixed in v1.

    Please try OpenCode v2 (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0). v2 checks for a missing session folder: its terminal UI shows a "Session location unavailable" screen and lets you move the session instead of failing silently. If you still see a silent failure on v2, or you think this is critical, please reply here with your v2 version.

    Related issues:

  2. opencode-agent commented on Oct 25, 2026

    @opencode-agent
    Contributor

    Closing this as not planned. It's about OpenCode v1 Desktop (1.18.30): prompts fail silently with prompt_async failed / FileSystem.realPath ENOENT after the session's project folder is renamed, moved or deleted. v1 only gets fixes for critical bugs, and reopening the project at its new path works around this one.

    v2 checks for a missing session folder: its terminal UI shows a "Session location unavailable" screen and lets you move the session. If you still see a silent failure on v2 (opencode upgrade --major), please open a new issue with your v2 version and the steps. Related: #52108, #55129. 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