Repository navigation
Description
Environment
- opencode desktop app 1.18.21, macOS
opencode serve1.18.21 running inside a Linux dev container, attached over HTTP- Repository is bind-mounted into the container at
/workspaces/<repo>
What happens
Attach the desktop app to the remote server, pick the project, send a message.
Nothing comes back. No error, no spinner that ends, no failed state — the
message simply sits there. I sent three before going to look at the server.
The server log explains it:
level=ERROR message=failed
error="PlatformError: NotFound: FileSystem.realPath (/Users/<user>/Projects/<repo>)
(cause: Error: ENOENT: no such file or directory,
lstat '/Users/<user>/Projects/<repo>')"
level=ERROR message="prompt_async failed" sessionID=ses_...
cause="Cause([Die(PlatformError: NotFound: FileSystem.realPath (/Users/<user>/Projects/<repo>))])"
level=WARN message="failed to initialize fff"
error="Failed to init file picker: Invalid path /Users/<user>/Projects/<repo>"
and the session was created with the host's path:
message=created id=ses_... directory=/Users/<user>/Projects/<repo> ...
/Users/<user>/Projects/<repo> is the path on my Mac. The server is in a Linux
container where the checkout lives at /workspaces/<repo>, so that string means
nothing there.
Two separate problems
1. The project picker browses the local filesystem while attached to a remote
server. This looks like the root cause rather than a marshalling slip: when the
app is attached to a remote server, the picker still shows my Mac's directories,
so whatever I choose can only ever be a host path. #40136 ("don't forward host
directory to remote workspace") and #5380 (attach --dir referencing the local
directory) fixed this class of problem on other paths; the desktop-app-to-remote-
server path still has it.
Should the picker browse the server's filesystem when attached remotely? If
there is already a supported way to open a project by its server-side path, I did
not find it.
2. The failure is completely silent in the UI. This is arguably the worse
half. prompt_async failed is a server-side error with a clear cause, and none
of it reaches the client — the app looks idle rather than broken. Surfacing it
would have turned a long debugging session into a five-second fix, regardless of
what happens with the path handling.
Workaround, in case it helps others
Mount the checkout a second time inside the container at the same absolute path
it has on the host, so both names refer to the same directory:
-v /Users/<user>/Projects/<repo>:/Users/<user>/Projects/<repo>
A symlink also lets the files be read, but realPath resolves it back to the
container path and the server then reports that back to the client, so the
mismatch just reappears on the return trip. A second bind mount has nothing to
resolve: realPath returns the same string the app sent, which is valid on both
sides.
Activity
fix(devcontainer): mount the checkout at the host path, and pin the s…
LittleNightmare commentedon Sep 15, 2026
Same class of failure here, on Windows client -> remote
opencode serveover SSH.Environment
opencode serveon Linux, reachable through an SSH tunnel aslocalhost:4096Symptom
location.directoryrather than a server-side path.Cross-platform data point in case it helps: the host path is
C:\Users\...style while server paths are POSIX, so any client-side path reuse is guaranteed to failrealPathon the server.opencodejr commentedon Oct 28, 2026
Thanks for the detailed write-up and for sharing the workaround. It will help others who run into this.
This was reported on 1.18.21, which is OpenCode v1. v1 now only gets fixes for critical bugs such as data loss, security problems, or crashes with no workaround. Both parts of this issue (the project picker browsing the local filesystem while attached to a remote server, and the silent
prompt_async failed) have a workaround, the second bind mount you describe, so they're unlikely to be fixed in v1.Please consider upgrading to v2 (the
@opencode/clipackage /opencodecommand), which is where active development happens. If you think this is critical, or you can reproduce it on v2, please reply here with the v2 version and steps.Related issues, for reference:
prompt_async failedwithFileSystem.realPathENOENT, when a session's directory doesn't exist on the serveropencodejr commentedon Oct 29, 2026
Closing this as not planned. This was reported on OpenCode v1 (1.18.21), which only gets fixes for critical bugs. Both problems here have a workaround: the project picker sends host paths to a remote server, and the
prompt_asyncfailure is silent. The workaround is bind-mounting the checkout at the same absolute path inside the container.Thanks again for the thorough report. If you can reproduce this on v2 (
@opencode/cli), please open a new issue with the v2 version and steps, and link this one.