anthropics / anthropics/claude-code

Desktop app file viewer cannot open links to files under additionalDirectories

オープン
#94,446 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
area:desktop area:permissions bug has repro platform:wsl
主要言語
Python
スター
145k
フォーク
23.1k
PR マージ指標
PR 指標を取得中

説明

## Summary

In the desktop app (Code tab), markdown file links in assistant output open a viewer pane. The viewer only opens files under the session's **primary** working directory. Files under a directory added with `additionalDirectories` (or `--add-dir`) render as clickable links but the viewer shows "Couldn't read this file. It may be unreadable, or the session's connection may have dropped."

## Environment

- Claude Code desktop app, Code tab, Linux host (WSL2), session running in a git worktree as the primary working directory
- `permissions.additionalDirectories` set to a second repository on the same machine
- Observed 15 Sep 2026

## Steps to reproduce

1. Start a session with primary directory `/path/repo-a` and `additionalDirectories: ["/path/repo-b"]`.
2. Have the assistant emit `[doc](/path/repo-b/docs/some.md)` (absolute path).
3. Click the link.

Expected: the viewer opens `/path/repo-b/docs/some.md`, since `repo-b` is a configured working directory the session can read.
Actual: "Couldn't read this file".

## Additional observations

- A relative link to a file that exists only in the primary worktree (not in the main checkout) opens fine, so the viewer resolves against the primary working directory, not the repo's main checkout.
- A symlink inside the primary directory pointing into `repo-b` is also refused (consistent with the recent symlink-handling hardening).
- Sending the same file with the file-sharing tool works, so the session itself can read it.

## Request

Let the viewer open files under any configured working directory (`additionalDirectories`), or document the supported link form for them. Multi-repo setups where one repo holds shared tooling and specs, and the other holds the code, need clickable references across the two.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。