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
[Bug]: Not following symlinks to iCloud~Drive, can't read files/see diffs #8234
The distinct behavior in this report is that the workspace index follows an external directory symlink and lists its contents, while projects.readFile resolves the same path and rejects it as resolved_path_outside_root. The behavior is not specific to iCloud; an ordinary directory symlink that leaves the project root reaches the same containment check.
A safe resolution probably needs either explicit authorization for external symlink targets or consistent filtering and messaging in the workspace index. Simply removing the canonical containment check would allow a project symlink to expose arbitrary files readable by the server process.
I have the same issue - one of the sub-directories in my project is symlinked from a Dropbox directory.
I cannot open and view those files in the file view
Confirmed on a Linux SSH-hosted server as well; this is not specific to iCloud or macOS. I searched the existing issues, discussions and PRs before preparing a fix. This report and #8408 cover the observed failure; discussion #6727 and open PRs #8281 / #21920 are also relevant.
A minimal reproduction, using only disposable directories:
fixture=$(mktemp -d)
mkdir -p "$fixture/project""$fixture/storage"printf'linked report\n'>"$fixture/storage/report.md"
ln -s "$fixture/storage""$fixture/project/data"# Add "$fixture/project" as a T3 project, then browse data/report.md.
The server's OS user can list project/data and read project/data/report.md. On current upstream main (dc84b0962efa4f4e05ef392c08986a9cd7c994d1):
filesystem.browse omits the directory link because its Dirent is not a directory.
projects.listEntries({cwd: project, directoryPath: ""}) omits the link for the same reason; explicitly listing directoryPath: "data" rejects its canonical target as outside the workspace.
projects.readFile({cwd: project, relativePath: "data/report.md"}) fails with resolved_path_outside_root, while reading the same host file by absolute path succeeds.
In the real Linux layout, a home-directory link to projects on a separate data volume made the projects disappear from the picker. Comparing OS listings with the patched service's actual RPC results verified 21 directories (including all 15 readable first-level project directories on that volume) and 17 file previews. No filesystem permission changes or root execution were needed. Those checks were against the deployed fork; the new PR is independently based on current upstream main and has its own regressions and validation.
The proposed fix follows local directory/file links using the server user's existing OS permissions, preserves alias paths, bounds link classification, and suppresses links that would make folder expansion cycle. Workspace writes and external network-target restrictions remain bounded. Allowing relative local symlink reads outside the workspace changes the existing canonical-read containment rule; I am calling that out explicitly for maintainer review, rather than treating it as an already-approved direction. The picker-only and contained-link PRs above do not resolve that part of this report.
Proposed fix: #26044, based directly on the main commit above. Its 43 focused tests and check:changed pass; the PR explicitly calls out the local read-containment policy change for maintainer review.
Another use case for symlinks that point outside the workspace, with no cloud drive involved.
I keep several local git worktrees of the same repo side by side. Each worktree has symlinks to directories that live outside all of them and are shared on purpose: a data directory and a plans/ directory. The agents in every worktree read and write those shared directories, so the links are intentional and are the whole point of the setup.
The agents themselves are already able to follow outside symlinks (everything is in YOLO anyway). So can Cursor launched from T3. What's the purpose intentionally limiting the reach of T3's File Browser?!
In T3 Code these links do not appear in the Files tree at all, so I cannot browse or preview the shared plans next to the code.
Treating a link the user created inside the project as part of the project, at least for read and browse, would cover this. #26044 looks like it addresses exactly this.
My project has a subfolder that is a symlink to a directory outside the project root. Agents read and write through it fine, but files behind the link can't be opened in the file viewer.
The link is deliberate, so read and browse through it would cover my case.
Another case, and a question for a maintainer before anyone opens a PR again (#26044 was closed for lacking that OK).
Case. A project with projects/customers -> ~/Library/CloudStorage/OneDrive-Org/Customers and projects/partners -> …/Partners, plus a root REPO-INDEX.md linked from a sibling repo. The agents work in those folders every day. The Files tree shows none of the three, so the files the project is about can't be browsed or previewed. Desktop client, remote macOS server, build of 222288b00f.
Containment currently depends on how the path is spelled. On main (1d1489d0b8), all of these need the same AuthFilesystemReadScope:
projects.readFile with an absolute or ~/ path reads the host file in place with no root check. Only network paths are checked (WorkspaceFileSystem.resolveReadTarget: "An absolute or ~/ path reads a host file in place … it gets no root check"). The chat already opens such paths read-only in the right panel (feat(files): open markdown, HTML, and PDF files outside the workspace #9140).
filesystem.browse lists any folder.
projects.readFile with projects/partners/x.md, the same file reached through a link the user made inside the project, fails with WorkspaceFilePathEscapeError. projects.listEntries hides the link (fix(server): the Files tree lists symlinked files and folders #21920) and refuses to list inside it.
So hiding and refusing the link doesn't keep a client with this scope away from any file it can't already read by absolute path. It only hides the user's own links. Writes are a different matter, and #18819's rule for them should stay.
Proposal for a focused fix.listEntries lists and expands a link to a local folder or file outside the root, and readFile reads through it read-only, with the absolute-path rules: network targets refused, .git targets, dangling links and loops hidden. Writes, the search index (#24578) and browse stay as they are. Would a maintainer accept a PR of that scope? We carry it in our own build meanwhile and can open the PR from current main.
Closing as not planned. Workspace-relative reads and folder expansion stay inside the project's real root on purpose, so links that point outside it won't be followed. As a workaround, add the link's real target folder (for example the iCloud Drive folder itself) as its own project.
@juliusmarminge "stay... on purpose" And you still don't explain that purpose?..
Agent harnesses themselves are happy to follow links outside. IDEs (openable from t3code) too. What's so special about t3code's File Browser that it must protect its path harder then the agents themselves do?!!
Activity
dpkass commentedon Aug 25, 2026
Codex investigation notes: this does not appear to be an exact duplicate, but several closed issues are relevant:
readFilealready rejects symlinks whose canonical target is outside the project root; that issue concerned bringing writes under the same restriction.The distinct behavior in this report is that the workspace index follows an external directory symlink and lists its contents, while
projects.readFileresolves the same path and rejects it asresolved_path_outside_root. The behavior is not specific to iCloud; an ordinary directory symlink that leaves the project root reaches the same containment check.A safe resolution probably needs either explicit authorization for external symlink targets or consistent filtering and messaging in the workspace index. Simply removing the canonical containment check would allow a project symlink to expose arbitrary files readable by the server process.
fMads commentedon Sep 4, 2026
I have the same issue - one of the sub-directories in my project is symlinked from a Dropbox directory.
I cannot open and view those files in the file view
Squashed '.repos/effect-smol/' changes from a43c7e244c..e17ecdbe90
asafbennatan commentedon Oct 18, 2026
issue still exists on v0.1.0
msuadOf commentedon Oct 27, 2026
Confirmed on a Linux SSH-hosted server as well; this is not specific to iCloud or macOS. I searched the existing issues, discussions and PRs before preparing a fix. This report and #8408 cover the observed failure; discussion #6727 and open PRs #8281 / #21920 are also relevant.
A minimal reproduction, using only disposable directories:
The server's OS user can list
project/dataand readproject/data/report.md. On current upstreammain(dc84b0962efa4f4e05ef392c08986a9cd7c994d1):filesystem.browseomits the directory link because its Dirent is not a directory.projects.listEntries({cwd: project, directoryPath: ""})omits the link for the same reason; explicitly listingdirectoryPath: "data"rejects its canonical target as outside the workspace.projects.readFile({cwd: project, relativePath: "data/report.md"})fails withresolved_path_outside_root, while reading the same host file by absolute path succeeds.In the real Linux layout, a home-directory link to projects on a separate data volume made the projects disappear from the picker. Comparing OS listings with the patched service's actual RPC results verified 21 directories (including all 15 readable first-level project directories on that volume) and 17 file previews. No filesystem permission changes or root execution were needed. Those checks were against the deployed fork; the new PR is independently based on current upstream main and has its own regressions and validation.
The proposed fix follows local directory/file links using the server user's existing OS permissions, preserves alias paths, bounds link classification, and suppresses links that would make folder expansion cycle. Workspace writes and external network-target restrictions remain bounded. Allowing relative local symlink reads outside the workspace changes the existing canonical-read containment rule; I am calling that out explicitly for maintainer review, rather than treating it as an already-approved direction. The picker-only and contained-link PRs above do not resolve that part of this report.
Proposed fix: #26044, based directly on the main commit above. Its 43 focused tests and
check:changedpass; the PR explicitly calls out the local read-containment policy change for maintainer review.DmitriyAlergant commentedon Oct 28, 2026
Another use case for symlinks that point outside the workspace, with no cloud drive involved.
I keep several local git worktrees of the same repo side by side. Each worktree has symlinks to directories that live outside all of them and are shared on purpose: a data directory and a
plans/directory. The agents in every worktree read and write those shared directories, so the links are intentional and are the whole point of the setup.The agents themselves are already able to follow outside symlinks (everything is in YOLO anyway). So can Cursor launched from T3. What's the purpose intentionally limiting the reach of T3's File Browser?!
In T3 Code these links do not appear in the Files tree at all, so I cannot browse or preview the shared plans next to the code.
Treating a link the user created inside the project as part of the project, at least for read and browse, would cover this.
#26044 looks like it addresses exactly this.
hjbrandt commentedon Nov 11, 2026
Same here on v0.1.8 (desktop beta), macOS 27.0.1.
My project has a subfolder that is a symlink to a directory outside the project root. Agents read and write through it fine, but files behind the link can't be opened in the file viewer.
The link is deliberate, so read and browse through it would cover my case.
astarktc commentedon Nov 16, 2026
Another case, and a question for a maintainer before anyone opens a PR again (#26044 was closed for lacking that OK).
Case. A project with
projects/customers -> ~/Library/CloudStorage/OneDrive-Org/Customersandprojects/partners -> …/Partners, plus a rootREPO-INDEX.mdlinked from a sibling repo. The agents work in those folders every day. The Files tree shows none of the three, so the files the project is about can't be browsed or previewed. Desktop client, remote macOS server, build of222288b00f.Containment currently depends on how the path is spelled. On main (
1d1489d0b8), all of these need the sameAuthFilesystemReadScope:projects.readFilewith an absolute or~/path reads the host file in place with no root check. Only network paths are checked (WorkspaceFileSystem.resolveReadTarget: "An absolute or~/path reads a host file in place … it gets no root check"). The chat already opens such paths read-only in the right panel (feat(files): open markdown, HTML, and PDF files outside the workspace #9140).filesystem.browselists any folder.projects.readFilewithprojects/partners/x.md, the same file reached through a link the user made inside the project, fails withWorkspaceFilePathEscapeError.projects.listEntrieshides the link (fix(server): the Files tree lists symlinked files and folders #21920) and refuses to list inside it.So hiding and refusing the link doesn't keep a client with this scope away from any file it can't already read by absolute path. It only hides the user's own links. Writes are a different matter, and #18819's rule for them should stay.
Proposal for a focused fix.
listEntrieslists and expands a link to a local folder or file outside the root, andreadFilereads through it read-only, with the absolute-path rules: network targets refused,.gittargets, dangling links and loops hidden. Writes, the search index (#24578) andbrowsestay as they are. Would a maintainer accept a PR of that scope? We carry it in our own build meanwhile and can open the PR from current main.fix(server): Files tree shows symlinks to folders outside the project
juliusmarminge commentedon Nov 17, 2026
Closing as not planned. Workspace-relative reads and folder expansion stay inside the project's real root on purpose, so links that point outside it won't be followed. As a workaround, add the link's real target folder (for example the iCloud Drive folder itself) as its own project.
fix(server): Files tree shows symlinks to folders outside the project
DmitriyAlergant commentedon Nov 18, 2026
@juliusmarminge "stay... on purpose" And you still don't explain that purpose?..
Agent harnesses themselves are happy to follow links outside. IDEs (openable from t3code) too. What's so special about t3code's File Browser that it must protect its path harder then the agents themselves do?!!
fix(server): Files tree shows symlinks to folders outside the project
fix(server): Files tree shows symlinks to folders outside the project
fix(server): Files tree shows symlinks to folders outside the project