anthropics / anthropics/claude-code
[BUG] File preview panel can't open files outside the opened project folder (even though Finder can)
- Ngôn ngữ chính
- Python
- Star
- 145k
- Fork
- 23.1k
- Chỉ số merge pull request
- Chỉ số pull request đang chờ
Mô tả
### Preflight Checklist
- [x] I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
### What's Wrong?
When Claude sends/creates a file located outside the currently opened project folder (but still on the same disk, one level up from the opened project), clicking the file card in the chat opens a "Fichier" side panel that says:
"Ce fichier est introuvable. Il a peut-être été supprimé, ou il se trouve en dehors du répertoire de travail."
Example: project opened for the session is ~/Documents/personal-ascension/plugins/personal-ascension, and the file is at ~/Documents/personal-ascension/inspiration/2026-08-24-hellowillfan/2026-08-24-inspiration-hellowillfan.md (one level above).
The panel's "Afficher dans le Finder" button DOES work and opens the correct file in Finder — proving the file exists and is fully readable on disk. So the app has full filesystem access, it just refuses to preview it because the path is outside the opened project's scope.
Reproduced on macOS, both in a session that had connected GitHub for cloud mode and in a session confirmed running locally. Also fails on the Claude mobile app for the same attachment (tapping the file card does nothing there).
### What Should Happen?
Clicking a file card/link that points to an existing local file should open it, regardless of whether that file is inside or outside the currently opened project folder — since the app's own "Show in Finder" button proves it already has full filesystem access to that same file.
### Error Messages/Logs
```shell
Ce fichier est introuvable. Il a peut-être été supprimé, ou il se trouve en dehors du répertoire de travail.
```
### Steps to Reproduce
1. Open a Claude Code session with a project folder scoped to a subdirectory of a larger repo (e.g. project opened at repo/plugins/my-plugin).
2. Have Claude create or send a file located in a sibling folder outside that opened project (e.g. repo/some-other-folder/file.md).
3. Click the resulting file card/link in the chat.
4. The "Fichier" side panel opens and shows "file not found / outside the working directory", even though the file exists.
5. Click "Afficher dans le Finder" (Show in Finder) on that same panel — it correctly opens Finder to the real file, proving the file is fully accessible on disk.
### Claude Model
Sonnet (default)
### Is this a regression?
Yes, this worked in a previous version
### Last Working Version
_No response_
### Claude Code Version
2.1.185 (Claude Code)
### Platform
Anthropic API
### Operating System
macOS
### Terminal/Shell
Terminal.app (macOS)
### Additional Information
_No response_
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
No source file, test, or entry point is named in the report. Start by reproducing the issue with a file one level outside the opened project, then compare the file preview behavior with the working “Show in Finder” action on macOS and the attachment behavior on mobile. Done means existing local files outside the project scope open in the preview panel without the outside-working-directory error.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Lĩnh vực
- desktop, mobile-dev
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 38/100