Repository navigation
Description
Summary
OpenCode Desktop persists the absolute path of a workspace. If the project or one of
its parent directories is later renamed or moved, Desktop restores the stale
workspace on every launch.
The app logs a FileSystem.realPath NotFound error during startup. Sending a
prompt from a session associated with that workspace then fails in
prompt_async. There is no visible recovery flow to locate the moved project,
detach the session from the missing path, or clearly explain why the prompt
failed.
This reproduced after replacing the application with a freshly downloaded,
checksum-verified, notarized copy while retaining user data.
Environment
- OpenCode Desktop: 1.18.4, packaged release, latest channel
- Release commit:
49c69c5 - Desktop runtime reported in process metadata: Electron 42.3.3
- OS: macOS 26.5.2, build 25F84
- Architecture: Apple silicon (
arm64) - Hardware: Apple M4, 16 GB RAM
- Global config:
{
"$schema": "https://opencode.ai/config.json"
}- No project-specific plugin configuration was required to reproduce
- No OpenCode crash report was created
Steps to reproduce
-
Create or open a project at:
/Users/USER/Projects/old-parent/example-project -
Create a session in the project and send at least one prompt.
-
Quit OpenCode Desktop.
-
Move or rename the project so the old path no longer exists, for example:
/Users/USER/Projects/example-project -
Relaunch OpenCode Desktop.
-
Open the restored session associated with the old path.
-
Send another prompt.
Actual behavior
At startup, Desktop restores the stale absolute path and logs:
level=ERROR message=failed ref=err_REDACTED
error="PlatformError: NotFound: FileSystem.realPath
(/Users/USER/Projects/old-parent/example-project)
(cause: Error: ENOENT: no such file or directory,
lstat '/Users/USER/Projects/old-parent')"
Sending a prompt from an affected session fails:
level=ERROR message="prompt_async failed"
sessionID=ses_REDACTED
cause="Cause([Die(PlatformError: NotFound: FileSystem.realPath
(/Users/USER/Projects/old-parent/example-project)
(cause: Error: ENOENT: no such file or directory,
lstat '/Users/USER/Projects/old-parent'))])"
The main process and sidecar otherwise start normally:
app starting { version: '1.18.4', packaged: true, onboardingTest: false }
sidecar connection started { url: 'http://127.0.0.1:PORT' }
server ready { url: 'http://127.0.0.1:PORT' }
The failure repeats across restarts and attempts to use the affected sessions.
Expected behavior
When a persisted workspace path no longer exists, Desktop should do one of the
following:
- Prompt the user to locate the moved project and rebind the workspace and its
sessions; - Mark the workspace unavailable and provide Remove/Locate actions; or
- Allow the session to open in a recoverable state with a clear error instead
of silently failingprompt_async.
At minimum, the UI should surface the missing path and should not leave the send
action appearing broken.
Clean-reinstall control
To rule out a locally damaged application:
-
Downloaded the official
opencode-desktop-mac-arm64.app.tar.gzasset for
v1.18.4. -
Verified its published SHA-256 digest:
f840b796090f557d707718078eb5d8b6b5077f6ab42e06481d7981577f83fc3f -
Replaced only
/Applications/OpenCode.app; retained all user configuration,
workspace, and session data. -
Verified the installed app with:
codesign --verify --deep --strict /Applications/OpenCode.app spctl -a -vv /Applications/OpenCode.app -
Gatekeeper reported a notarized Developer ID build from Anomaly Innovations,
Inc. -
Relaunched Desktop.
The stale-path startup error reproduced immediately after the clean reinstall.
The installed app remained signature-valid after launch.
Additional observation: existing plugin@local issue
The same clean v1.18.4 launch also logged this warning repeatedly despite the
minimal global configuration shown above:
level=WARN message="background dependency install failed"
dir=/Users/USER/.config/opencode
error="Cause([Fail(NpmInstallFailedError
(cause: @opencode-ai/plugin: No matching version found for
@opencode-ai/plugin@local.))])"
This appears to match existing issue #26003 and is included only to distinguish
that warning from the FileSystem.realPath failure. It probably should not be
tracked again in this issue unless maintainers believe the two startup paths are
connected.
Issue #14292 is also related because it discusses sessions being locked to their
original project directory, but it does not appear to cover Desktop repeatedly
restoring a missing path or the resulting prompt_async failure.
Privacy/anonymization
- Username replaced with
USER - Project and parent-directory names replaced with generic examples
- Session IDs, error reference IDs, workspace/account IDs, localhost ports, and
provider information removed or replaced - No authentication data, prompts, source code, repository URLs, or billing URLs
included
Activity
github-actions commentedon Jul 23, 2026
This issue might be a duplicate of existing issues. Please check:
project.worktreeafter project folder is renamed on disk; remote clients keep reopening the dead path #35240: Server keeps staleproject.worktreeafter project folder is renamed on disk; remote clients keep reopening the dead pathIf your issue is distinct from all of the above (e.g. specific to Desktop persisting and restoring the stale path across restarts rather than just a single-session failure), please clarify the difference so maintainers can track it separately.
Hona commentedon Sep 2, 2026
Fixed for opencode2 launch via #46713
You can try the desktop beta here: https://github.com/anomalyco/opencode-beta