Repository navigation
[Bug]: Pi provider lacks per-workspace skill discovery — project .agents skills never appear in the $ picker #15810
Copy link
Copy link
Closed
Labels
bugSomething is broken or behaving incorrectly.Something is broken or behaving incorrectly.via-triageFiled through npx t3 triageFiled through npx t3 triage
Description
Activity
- addedbugSomething is broken or behaving incorrectly.Something is broken or behaving incorrectly.needs-triageIssue needs maintainer review and initial categorization.Issue needs maintainer review and initial categorization.
on Oct 5, 2026 Note
Grok responding on behalf of Julius.
Triage
Thanks @v-senninha-v for the detailed root-cause write-up and the workaround. It checked out against current
main(efecd3cf8b).What I found
ProviderRegistry.refreshWorkspaceSnapshot(apps/server/src/provider/Layers/ProviderRegistry.ts) returns the current provider list without scanning when the instance has nosnapshotForCwd.PiDriveris the only driver that leaves it out. Claude, Codex, Cursor, Grok, OpenCode, and Antigravity all implement it. The field is optional inProviderDriver.ts, so this type-checks.- The machine-level catalog comes from
checkPiProviderStatus, which uses the server process cwd (ServerConfig.cwd).discoverPiViaRpcpasses that cwd intopi --mode rpc, soget_commandsonly sees skills that are visible from there. Where that cwd ends up depends on how T3 is run:- Packaged desktop app: the home directory (
backendCwdinDesktopEnvironment.ts). - Unpackaged desktop build: the app root.
npx t3: whatever directory the server was started in.
- Packaged desktop app: the home directory (
- The composer already asks for a workspace scan and prefers
workspaceSnapshotsfor the thread cwd (resolveProviderSkillsForCwdinpackages/client-runtime/src/providerSkills.ts). When there's no snapshot, it falls back toprovider.skills, and each re-ask does nothing on the server. - The live Pi session works because the adapter starts
piin the thread cwd. That's why the model can list the project skill, and why typing/skill:<name>still runs it. - Project slash commands are hidden the same way, because
/usesresolveProviderSlashCommandsForCwdwith the same fallback. - These are related but aren't duplicates:
- [Bug]: Project skills that a new worktree receives after creation never appear in the $ picker #14801 is Claude, when a worktree gains skills after the first scan.
- [Bug]: Workspace snapshot taken before the first Claude probe finishes leaves the / menu without provider commands for the whole session #11575 is Claude storing the pending launch probe as the workspace command list.
Likely fix area
One option is to add
snapshotForCwdtoPiDriver. It would run the existing short-livedget_commandsdiscovery in the requested cwd, using that instance's launch args, and lay bothskillsandslashCommandsover the machine snapshot. Some details to keep in mind:- The cwd result has to be the full set Pi exposes there, user skills included, because the client replaces the machine list with it.
- Keeping the existing discovery timeout means an untrusted project can't hang on Pi's trust prompt.
- A regression test could show that a Pi cwd probe lands in
workspaceSnapshotswhile the machine-levelskillsstay unchanged.
Until then, the workaround in the report works: point Pi's user skills setting at the project's
.agents/skills, or type/skill:<name>.A maintainer will decide on the fix direction.
- addedvia-triageFiled through npx t3 triageFiled through npx t3 triageand removedneeds-triageIssue needs maintainer review and initial categorization.Issue needs maintainer review and initial categorization.
on Oct 5, 2026
Metadata
Metadata
Assignees
Labels
bugSomething is broken or behaving incorrectly.Something is broken or behaving incorrectly.via-triageFiled through npx t3 triageFiled through npx t3 triage
Before submitting
Area
apps/server
Steps to reproduce
<repo>/.agents/skills/test-skill/SKILL.md(committed; the repo is trusted in~/.pi/agent/trust.json, or set the Pi provider launch args to--approvein T3 settings).get_commandsreturns it).$in the composer → the project skill is absent; only user-scope skills appear.~/.t3/caches/pi.jsonafter a provider refresh: theworkspaceSnapshotskey is absent, and the provider-levelskillsarray contains only entries under the home directory.Expected behavior
The
$picker shows the same skills pi exposes viaget_commandsfor the thread's cwd (project.agents/skillsincluded), mirroring how the Claude provider surfaces.claude/skillsper workspace. A provider refresh or app restart should make project skills appear.Actual behavior
Only user-scope skills appear, for the life of the server process, regardless of provider refresh or app restart. The agent-side behavior is correct — pi's system prompt includes the project skills, so the model can use them; only the picker is wrong (easy to miss because of this A/B mismatch).
Impact
Blocks work completely
Version or commit
No response
Environment
0.0.46-nightly.20261004(Windows 11, desktop) - pi 1.0.2Logs or stack traces
Screenshots, recordings, or supporting files
No response
Workaround
Add the project skills directory to user-level pi settings (
~/.pi/agent/settings.json):These load in every pi session (including the provider-level home-dir discovery), so they appear in the
$picker. Alternatively,/skill:<name>typed directly still works even when the picker omits the skill.