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 Report - Termic fails to read directory content #250
I'm getting Couldn't read this folder. Retry messages on the "All Files" tab. Clicking on the message or on the round button on the top right does not help. What's a good way to debug this one?
The row was carrying no information: it hard-coded "Couldn't read this folder" and threw the actual rejection away, so a report of it could only ever be a screenshot. Fixed on main in 0cd6aa6, will be in the next release.
What you will see instead. The row now says what failed, with the raw Rust error underneath and in the tooltip: "Permission denied", "This folder no longer exists", "This folder links outside the task", and so on. An error nobody has mapped shows verbatim rather than being replaced by a generic sentence. task_dir_list also names the path in every error now, so an ENOENT says WHICH path went missing, and a containment rejection says where the symlink pointed. The folder view (a directory link opened in the preview tab) reads the same way.
The leading suspect for your case.task_dir_list canonicalizes and rejects anything resolving outside the task, so a folder that is a symlink OUT of the worktree lists as a directory but can never be read. Retrying and refreshing cannot fix it, which is exactly what you describe. A linked vendor directory, a shared cache, a pnpm-style link all take that shape. If that is it, the row will say "This folder links outside the task" and the tooltip will name the target.
The other likely one is a plain permissions failure on the directory, which the new message separates cleanly from the first.
When you next hit it, paste the row's text plus its tooltip and I will know which one it is. If it turns out to be the symlink case, the follow-up question is whether to allow a link that resolves inside the PROJECT rather than only inside the task worktree, which is a sandbox policy decision rather than a bug.
The folder-read diagnostics are live in v0.29.0. Update and open the folder again: the row should now name what failed (permission denied, links outside the task, no longer exists) with the raw error under it. Paste what it says and I can tell you whether it is fixable from here.
It's an interesting case. The .claude directory lives in the repo root, and not copied to worktrees because it's not in git. I do, however, have access to it in the repo root.
@simion what are your thoughts? Should we stay with this behaviour?
Confirmed, and it turns out to be self-inflicted — thank you both, the screenshot was exactly what was needed.
.claude/ is a symlink we create. link_config_dir links .claude/, .gemini/ and .codex/ from the repo root into every new worktree precisely because they are commonly gitignored, so git worktree add leaves them out and an agent spawned there would otherwise lose its project subagents, skills and commands. The containment check then canonicalized that link, saw it landing outside the worktree, and refused to read back through the very link termic had just made. So the folder listed (the parent's read_dir sees a directory entry) and could never be opened — no retry or refresh could help. It hit the editor too, not just the tree: opening .claude/settings.json failed the same way.
Fixed on main. Reads now allow a symlink at the task root whose target resolves inside the project root. Bounded three ways, each with a test:
It is a fallback — everything that resolved before resolves identically, and ../outside / /etc/passwd stay rejected.
Only a link at the task root qualifies; one buried in the repo widens nothing.
A link that leaves the project is still refused, which is the .claude -> ~/.ssh case the check exists for.
Read paths only. Rename, delete and every git path keep the strict check, so nothing can mutate the main checkout by writing through a link from a worktree.
On the question I raised earlier about whether to allow links resolving inside the project rather than only the task: that is the bound now, chosen because a name-based allowance tied to worktree_symlink_paths would break every task linked while an older list was in effect.
Activity
simion commentedon Aug 21, 2026
Related: #159
Will investigate further.
I'll add the exact error
fix(files): say what went wrong when a folder will not read
simion commentedon Aug 21, 2026
The row was carrying no information: it hard-coded "Couldn't read this folder" and threw the actual rejection away, so a report of it could only ever be a screenshot. Fixed on main in 0cd6aa6, will be in the next release.
What you will see instead. The row now says what failed, with the raw Rust error underneath and in the tooltip: "Permission denied", "This folder no longer exists", "This folder links outside the task", and so on. An error nobody has mapped shows verbatim rather than being replaced by a generic sentence.
task_dir_listalso names the path in every error now, so an ENOENT says WHICH path went missing, and a containment rejection says where the symlink pointed. The folder view (a directory link opened in the preview tab) reads the same way.The leading suspect for your case.
task_dir_listcanonicalizes and rejects anything resolving outside the task, so a folder that is a symlink OUT of the worktree lists as a directory but can never be read. Retrying and refreshing cannot fix it, which is exactly what you describe. A linked vendor directory, a shared cache, a pnpm-style link all take that shape. If that is it, the row will say "This folder links outside the task" and the tooltip will name the target.The other likely one is a plain permissions failure on the directory, which the new message separates cleanly from the first.
When you next hit it, paste the row's text plus its tooltip and I will know which one it is. If it turns out to be the symlink case, the follow-up question is whether to allow a link that resolves inside the PROJECT rather than only inside the task worktree, which is a sandbox policy decision rather than a bug.
simion commentedon Aug 21, 2026
The folder-read diagnostics are live in v0.29.0. Update and open the folder again: the row should now name what failed (permission denied, links outside the task, no longer exists) with the raw error under it. Paste what it says and I can tell you whether it is fixable from here.
adamatan commentedon Aug 21, 2026
It's an interesting case. The
.claudedirectory lives in the repo root, and not copied to worktrees because it's not in git. I do, however, have access to it in the repo root.@simion what are your thoughts? Should we stay with this behaviour?
simion commentedon Aug 21, 2026
hmm, we do link .claude from repo root to worktrees because some these dirs are gitignored.
Yes, will fix 🤝
fix(files): read through the config-dir symlinks we create ourselves (#…
simion commentedon Aug 21, 2026
Confirmed, and it turns out to be self-inflicted — thank you both, the screenshot was exactly what was needed.
.claude/is a symlink we create.link_config_dirlinks.claude/,.gemini/and.codex/from the repo root into every new worktree precisely because they are commonly gitignored, sogit worktree addleaves them out and an agent spawned there would otherwise lose its project subagents, skills and commands. The containment check then canonicalized that link, saw it landing outside the worktree, and refused to read back through the very link termic had just made. So the folder listed (the parent'sread_dirsees a directory entry) and could never be opened — no retry or refresh could help. It hit the editor too, not just the tree: opening.claude/settings.jsonfailed the same way.Fixed on main. Reads now allow a symlink at the task root whose target resolves inside the project root. Bounded three ways, each with a test:
../outside//etc/passwdstay rejected..claude -> ~/.sshcase the check exists for.Read paths only. Rename, delete and every git path keep the strict check, so nothing can mutate the main checkout by writing through a link from a worktree.
On the question I raised earlier about whether to allow links resolving inside the project rather than only the task: that is the bound now, chosen because a name-based allowance tied to
worktree_symlink_pathswould break every task linked while an older list was in effect.Will be in the next release.
adamatan commentedon Aug 22, 2026
Great, thanks!
fix(files): save through a link into a user-granted sandbox path (sim…
fix(files): editor writes follow the agent's real cage (simion#250)
fix(files): open links out of the task, read-only unless the user gra…