You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
desktop: file card in chat 404s with "File not found" for files in subfolders #50880
Clicking a file card in the chat fails with «не удалось открыть файл: file not found».
The client requests only the file name (GET /api/fs/read/start.cmd) while the server
resolves relative paths against the user's home directory, so any file that does not
live directly in the home folder returns 404.
Two mismatches: (1) the card sends only the base name; (2) relative fs/read paths resolve
from the home directory instead of the project/session directory.
Workspace is not a git repo; worktree discovery failed ... DirectoryUnavailableError
warnings appear in the log (probably unrelated).
Workaround: hard link at C:\Users\<user>\start.cmd → real file, so the base-name
request resolves and the card opens (verified 200 afterwards). Masks the bug, not a fix.
I checked the current v2 file-opening path: relative paths retain their subdirectory and are sent with location[directory], while absolute paths use the filename plus its parent directory. Write-tool cards render the tool content without a filesystem read.
Could you share whether this still occurs on the latest desktop build, the exact card/link you clicked (or a screenshot), and the full request URL including its query string? That will help distinguish a tool card from a file link and identify where the path or session location is lost.
Thanks for the detailed report and the path probes.
I couldn't reproduce this here: it happens in the desktop app's chat UI, and this sandbox has no way to run the desktop app. Reading the code, here's what I found:
Why your manual probes resolved from your home folder: the server resolves relative /api/fs/read/... paths against the location (project directory) sent with each request. If none is sent, it uses the server process's working directory, which for the desktop app is likely your home folder. So that part is expected for requests made by hand without a location.
The actual bug: the request from the file card contained only start.cmd, without the mini-figma/ subfolder and seemingly without your project's location. That comes from how the app builds the link for the card.
You're on 2.0.15. Could you update the desktop app to the latest release and say here whether clicking the card still fails? If it does, the GET /api/fs/read/... line from the log for that click would help a maintainer with the desktop app look into it.
Activity
Dante-dan commentedon Oct 6, 2026
I checked the current v2 file-opening path: relative paths retain their subdirectory and are sent with
location[directory], while absolute paths use the filename plus its parent directory. Write-tool cards render the tool content without a filesystem read.Could you share whether this still occurs on the latest desktop build, the exact card/link you clicked (or a screenshot), and the full request URL including its query string? That will help distinguish a tool card from a file link and identify where the path or session location is lost.
opencodejr commentedon Oct 28, 2026
Thanks for the detailed report and the path probes.
I couldn't reproduce this here: it happens in the desktop app's chat UI, and this sandbox has no way to run the desktop app. Reading the code, here's what I found:
/api/fs/read/...paths against the location (project directory) sent with each request. If none is sent, it uses the server process's working directory, which for the desktop app is likely your home folder. So that part is expected for requests made by hand without a location.start.cmd, without themini-figma/subfolder and seemingly without your project's location. That comes from how the app builds the link for the card.Related issues, most relevant first:
~-prefixed path links fail.You're on 2.0.15. Could you update the desktop app to the latest release and say here whether clicking the card still fails? If it does, the
GET /api/fs/read/...line from the log for that click would help a maintainer with the desktop app look into it.