[Bug]: Claude provider skill discovery missing cwd — project-level .claude/skills/ not discovered in composer autocomplete #2048
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
Summary#
Project-level skills from .claude/skills/ are not discovered in the composer autocomplete when using the Claude provider. User-level skills from ~/.claude/skills/ appear correctly. Skills execute fine when typed manually — only the autocomplete/discovery is broken.
Tested on 0.0.17-nightly.20260415.45, Windows 11, Claude provider, 40+ project-level skills in .claude/skills/.
Root Cause#
Two related discovery/UI issues after #1905:
1. Claude capability discovery doesn't pass cwd to the SDK#
probeClaudeCapabilities enables settingSources: ["user", "project", "local"] but does not pass cwd, so the SDK resolves project/local sources relative to the T3 server process cwd instead of the active thread/project workspace cwd. This misses repo-local .claude/skills/ when those differ.
// ClaudeProvider.ts — probeClaudeCapabilities
const q = claudeQuery({
prompt: ".",
options: {
settingSources: ["user", "project", "local"],
// no cwd — SDK defaults to process.cwd() per SDK docs
},
});
The probe cache is also cwd-unaware — keyed by binaryPath only with capacity 1:
const subscriptionProbeCache = yield* Cache.make({
capacity: 1,
timeToLive: Duration.minutes(5),
lookup: (binaryPath: string) => probeClaudeCapabilities(binaryPath),
});
Compare with the Codex provider, which passes cwd explicitly and includes it in the cache key (capacity 4):
// CodexProvider.ts
const probeCodexCapabilities = (input: {
readonly binaryPath: string;
readonly homePath?: string;
readonly cwd: string; // cwd required
}) => probeCodexDiscovery({ ...input, signal })
// Cache keyed by [binaryPath, homePath, cwd]
Cache.get(accountProbeCache, JSON.stringify([input.binaryPath, input.homePath, input.cwd]))
2. Claude discovery results only exposed as slashCommands#
Claude discovery results are exposed only as slashCommands on the provider snapshot. That is sufficient for T3's / autocomplete picker, but not for the $ skill picker, because the Claude SDK's initialization command shape ({ name, description, argumentHint }) does not include the richer ServerProviderSkill fields T3 requires (path, enabled, scope, displayName, shortDescription).
// probeClaudeCapabilities returns:
return {
subscriptionType: init.account?.subscriptionType,
slashCommands: parseClaudeInitializationCommands(init.commands),
// skills is never populated — always defaults to []
};
The composer routes these separately (ChatComposer.tsx):
/trigger → readsprovider.slashCommands$trigger → readsprovider.skills(always empty for Claude)
Impact#
- Project-level skills (
.claude/skills/) → not discovered, don't appear in any autocomplete - User-level skills (
~/.claude/skills/) → discovered correctly (no cwd needed), appear under/ $skill picker → empty for Claude regardless of scope (schema limitation)- Manual invocation → works fine for both scopes (thanks to #1334's
settingSourcesfix)
Suggested Fix#
- Add
cwdparameter toprobeClaudeCapabilitiesand pass it through to the SDK'soptions.cwd— using the active project/workspace cwd, not justprocess.cwd()again - Include
cwdin the probe cache key and increase capacity (like Codex's capacity-4 approach) - Longer term: consider whether Claude discovery results can also populate
skillsto enable the$picker, acknowledging the schema gap
Related#
- #1334 —
settingSourcesfix (merged, working — skills execute fine at runtime) - #1905 — provider skill discovery (merged, partially working — Codex path works, Claude path missing cwd)
- #1329 — original slash command discovery bug (still open)
- #1283 — root cause
settingSourcesissue (closed by #1334) - #1480 — auto-discover Claude skills feature request (closed by #1905)
- #1964 — repo-local
.claudesettings (open, related but focused on auth)
Environment#
- T3 Code version: 0.0.17-nightly.20260415.45
- Platform: Windows 11
- Provider: Claude
- 40+ project-level skills in
.claude/skills/, all with valid SKILL.md frontmatter - Symptom: user-level skills appear in
/autocomplete, project-level skills do not
$is not a thing for Claude. They only have slash commands. Nothing we can do bout thatoops, sorry, my bad! i thought it was something that t3 code did in general for all skills, didnt know that codex used it. the problem about autocomplete not catching project level skills remain though.
$is not a thing for Claude. They only have slash commands. Nothing we can do bout thatMy project level skills are not showing up in my t3 code when on a project. This is currently stopping me using it completely.
My project level skills are not showing up in my t3 code when on a project. This is currently stopping me using it completely.
+1
Confirming this still reproduces on Linux (report above is Windows 11) with T3 Code 0.0.28 (AppImage), Claude provider — so it persists well past
0.0.17-nightly.Both symptoms from the root-cause analysis hold exactly:
- Project-level
.claude/skills/(36 skills, validSKILL.md) — absent from the/composer autocomplete. $picker shows only bundled/system skills regardless of scope — consistent with Claude discovery populatingslashCommandsbut neverskills.
Extra data points from debugging on this end:
- The skills are loaded for the agent — typing the full name (e.g.
/code-review) executes the project skill fine; only discovery/autocomplete is broken (matches "manual invocation works"). - Materializing the skills as real directories in
~/.claude/skills/(not symlinks) did not surface them in the$picker — consistent with symptom #2 (the$/Claude path is a schema gap, not a filesystem/symlink issue), so the fix really is on the discovery/schema side, not user config. - No
strictKnownMarketplaces/ marketplace allowlist is set here, so the plugin-policy gate is not involved.
The suggested fix (pass workspace
cwdintoprobeClaudeCapabilities+ cwd-keyed cache, and populateskillsfor the$picker) matches what we observe. +1 to prioritizing — this makes every repo-defined skill undiscoverable in the UI on the Claude provider.- Project-level
juliusmarminge closed this
@juliusmarminge tagging you since you closed this one and built most of the skill discovery. Can it be reopened? Still broken on 0.0.29-nightly.20260725.899 (5719e8ac4020), desktop app on macOS, so after #4414 landed.
Same symptom as the original report: project-level skills in
.claude/skills/don't show up in the$picker or/autocomplete, while skills from~/.claude/skills/work fine. The skills themselves do run when invoked in a thread, it's just discovery that fails.I dug through the source and I think I know why #4414 didn't fix this for the desktop app. The new
discoverClaudeSkillsinapps/server/src/provider/Drivers/ClaudeSkills.tsscans the right locations (<config dir>/skillsand<cwd>/.claude/skills), but look at where the cwd comes from inapps/server/src/provider/Drivers/ClaudeDriver.ts:const { cwd } = yield* ServerConfig; // ... const checkProvider = checkClaudeProviderStatus( effectiveConfig, () => Cache.get(capabilitiesProbeCache, capabilitiesCacheKey), processEnv, cwd, );That's the server process cwd. Works if you run
npx t3from inside your repo, but in the desktop app the server cwd is never the project you have open in the sidebar, so the project scope scan always comes up empty. And since discovery runs once per provider instance rather than per project, switching projects doesn't help either.For what it's worth, thread queries are unaffected:
ClaudeAdapter.tspassessettingSources: ["user", "project", "local"]with the thread's own cwd, which is why manually invoking a skill still works. Discovery probably needs to use the active project's repo path instead ofServerConfig.cwd. #3040 looks like the Codex version of the same problem.Happy to test a nightly if someone picks this up.
This still reproduces on
0.0.29-nightly.20260727.920(5719e8ac4020), desktop app on macOS 26.5.2, matching the reports above.#2124 threaded a cwd into the probe, but it threaded
ServerConfig.cwd— the server process's own working directory. For the desktop app that is$HOME, never the open project, so the project-scope scan inClaudeSkills.ts:104(<cwd>/.claude/skills) still comes up empty.Confirmed on a running nightly with
lsof -a -p <pid> -d cwd: the server process (app.asar/apps/server/dist/bin.mjs) sits at/Users/mewhile its own Claude session subprocesses sit at the project path. Discovery is also cached per provider instance with no project dimension (ClaudeDriver.ts:155, capacity 1; plus the rehydrated<baseDir>/caches/<instanceId>.jsonsnapshot), so switching projects cannot help even in principle.The same cwd feeds
probeClaudeCapabilities, so project-level.claude/commandsare missing from the/autocomplete for the same reason. I filed that half separately as #4658, with a reproduction that runs T3's exact probe options against both directories and shows the SDK returning the project commands from one and nothing from the other.Still reproduces on 0.0.34. @rithwikshetty's diagnosis above is right, and it holds on Linux too:
ClaudeDriver.ts:126takescwdfromServerConfig, and for a systemd user service that's$HOMEbecause the shipped unit setsWorkingDirectory=%h. So<cwd>/.claude/skillsnever matches the open project. 94 project skills here, none of them in the menu. They run fine typed by hand.One thing worth adding, because it affects the shape of the fix. Threading
session.cwdinto the status lookups (the follow-up #2124 described but never landed) isn't enough on its own:ClaudeDriver.createbuilds onecheckProvidersnapshot per provider instance, and instances are shared across threads in different workspaces. There's no single cwd that's correct for that snapshot.I have this working locally on a patched 0.0.34 build: a
provider.listSkillsRPC keyed by (instanceId, cwd), answered by the Claude driver through the existingdiscoverClaudeSkills, with the composer querying for the thread's workspace and falling back to the snapshot for drivers that don't implement it. Nothing changes for other providers. Tests and docs included, ~450 lines across contracts, server, web and mobile.Happy to open it as a PR, cut it down, or just hand the diff to whoever wants it. @juliusmarminge can this be reopened?
Sign in to join this conversation.
$is not a thing for Claude. They only have slash commands. Nothing we can do bout that