Skip to content

Desktop silently returns an empty response when the saved project directory no longer exists #39471

Description

@sokolsok

Description

OpenCode Desktop silently fails to generate responses when it restores a project whose directory has been deleted or moved.

The submitted prompt appears in the chat, but the request finishes almost immediately. The completion sound is played, but no assistant response and no error message are displayed.

Changing the selected model does not help. The problem disappears immediately after opening an existing project directory.

Steps to reproduce

  1. Open a project directory in OpenCode Desktop.
  2. While OpenCode is still running, delete or move that project directory outside of OpenCode.
  3. Continue using OpenCode. It may still work correctly during the current session.
  4. Close OpenCode Desktop.
  5. Restart the computer or reopen OpenCode Desktop.
  6. OpenCode restores the previous project, but its saved directory no longer exists.
  7. Submit any prompt.

Actual behavior

  • The prompt is added to the chat.
  • Processing finishes almost immediately.
  • The completion sound is played.
  • No assistant response is displayed.
  • No warning or error explains that the working directory does not exist.
  • The same behavior occurs regardless of which model is selected.

Expected behavior

OpenCode should detect that the saved project directory no longer exists and:

  • display a clear error message,
  • ask the user to select another project directory, or
  • prevent the project from being restored until a valid directory is selected.

It should not silently treat the request as successfully completed.

Workaround

Opening or selecting an existing project directory fixes the problem immediately.

Additional context

The original project directory was deleted while OpenCode was running. OpenCode continued working correctly until it was closed and started again.

This behavior can easily be mistaken for a model, provider, authentication, or API outage because the missing project directory is not reported anywhere in the UI.

OpenCode version

v1.18.9

Operating System

Windows 11

Terminal

Not applicable — OpenCode Desktop

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