Skip to content

[Bug]: Project skills that a new worktree receives after creation never appear in the $ picker #14801

Description

@caitlon

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

  1. Use the Claude provider in the desktop app with a repository whose .claude/skills/ is gitignored. Ours is gitignored on purpose; a new worktree gets it from a Claude Code SessionStart hook that symlinks .claude/skills from the main checkout.
  2. Start a new thread in New worktree mode and send the first message. T3 runs git worktree add, starts the Claude session, and the hook creates <worktree>/.claude/skills within the same second.
  3. In that thread, type $ in the composer.

Expected behavior

The $ picker lists the project skills from <worktree>/.claude/skills, the same ones Claude Code itself loads in that session.

Actual behavior

The picker shows only the user-scope skills from ~/.claude/skills, and it stays that way for the life of the server process. Claude Code in the same thread does see the project skills: they are in the session's skill listing, and typing $name by hand still invokes them. A thread whose worktree already existed when T3 started shows all project skills, which is how we noticed the difference (two threads created after the last app launch are affected, one created before it is not).

Mechanism, read from ProviderRegistry.refreshWorkspaceSnapshot and ClaudeDriver.snapshotForCwd: the workspace snapshot for a cwd is scanned once, and every later call returns early because a snapshot for that cwd already exists. If the first scan runs before .claude/skills is present in the new worktree, the empty project list is cached for that cwd. In server.trace.ndjson every refreshWorkspaceSnapshot span for the affected thread lasts 0.005 to 0.017 ms and has no discoverClaudeSkills child, so the folder is never read again.

#14542 (merged 2026-10-01) adds Restart agent session with a fresh rescan, which should work around this by hand. Nothing rescans automatically, so every new worktree thread starts with a picker that is missing the project skills until the user knows to run it. This is the skills counterpart of #11575, where the same early return freezes the / menu.

A possible fix: rescan the workspace snapshot when a thread's provider session starts (after its hooks have run), or treat a snapshot whose project root did not exist or was empty as stale.

Impact

Minor bug or occasional failure

Version or commit

Desktop 0.0.44; the early return is still on main @ 921cb3c without the fresh flag.

Environment

macOS 27, T3 Code desktop 0.0.44, Claude Code 2.1.286, Claude provider (Fable 5.1 and Opus 5.5).

Workaround

Type the skill name in full ($name), or restart the T3 app. On builds with #14542, Restart agent session from cmd+k should rescan.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaving incorrectly.via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions