Repository navigation
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
mkdir -p ~/.claude/skills && cd ~/.claude/skills && ln -s b a && ln -s a b- Start T3 Code, open a Cursor thread (or refresh providers).
- Open the composer's
/or$menu.
Expected behavior
The looping entry is skipped, like a dangling symlink already is, and every other skill still shows up. This is also how the agents themselves behave (see below).
Actual behavior
No skills show up and the Cursor provider fails to refresh:
ERROR provider registry refresh failed; preserving cached providers
ProviderDriverError: Provider driver 'cursor' failed to create instance 'cursor':
Failed to discover Cursor skills for '~'
[cause]: CursorSkillsProbeError: Cursor skill discovery for '~' was incomplete (filesystem-error).
What I found
My ~/.claude/skills had leftover test symlinks pointing at each other (chain-a → chain-b → chain-c → chain-a, cycle-a ↔ cycle-b, one pointing at itself). Dangling links in the same folder were fine.
The agents handle this fine. I tested the same looping symlinks with Claude, Cursor, Copilot, Codex, Antigravity, Kiro, Grok, OpenCode, Muse and Pi run directly. All of them skip the looped entries and keep loading their other skills. So T3 Code is the odd one out, and skipping loops would align it with the providers, not add new behaviour.
In T3's own scanner (packages/provider-cursor/src/server/skills.ts, used to fill the skill menu), "file not found" errors are ignored but any other filesystem error marks the scan "incomplete". An incomplete scan throws, which takes the whole Cursor provider instance down instead of skipping the bad entry.
A loop makes the OS return ELOOP (a dangling link is ENOENT). Effect's platform layer maps ELOOP to BadResource, not NotFound, so loops count as "incomplete" while dangling links are skipped. I checked the Node behaviour directly and the mapping in Effect's source; I haven't run T3 Code itself against a loop.
This is the same kind of bug as #17215 and #23221, where one odd thing in a skills folder (depth, node_modules, a symlinked root, supporting files) dropped every skill. Those were fixed one cause at a time, and a loop is permanent, so retrying never helps.
Suggested fix: treat BadResource (ELOOP, also ENOTDIR/EISDIR) like NotFound so the entry is skipped. Permission-denied and busy errors stay strict, since they can be temporary. Happy to send a PR with a small test if that direction is fine.
Open question: any other unexpected error in these folders (e.g. a macOS permission denial) still disables skills for the whole Cursor provider. I understand strict failing is deliberate so partial lists aren't cached (#9180, #16866), so I'm not proposing to change it. Should such errors degrade to "provider works, skills missing, with a warning", or is hard failure intended?
Antigravity's scanner (AntigravitySkills.ts, readIfPresent) has the same "anything but NotFound fails" pattern, so it may break on loops too. Not reproduced.
Impact
Major degradation or frequent failure
Environment
macOS, T3 Code Nightly desktop app with local server, Cursor provider
Workaround
cd ~/.claude/skills && rm chain-a chain-b chain-c cycle-a cycle-b self-loop, then refresh providers.
Investigated with Claude Code (Claude Sonnet 5.5) in T3 Code; I reviewed the findings.
Activity