Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): discover project skills for Codex and OpenCode #8778

MergedUtkarshUsername(GitHub profile, opens in a new tab)merged 3 commits intomain fromrefs/pull/8778/headmerged by maria-rcks View on GitHub

Closes #8792

What Changed

  • Added workspace-scoped provider snapshots for skills and slash commands.
  • Probed project skills from the active working directory for Codex and OpenCode.
  • Updated the / command menu and $ skill search to resolve skills and commands from the current workspace snapshot.
  • Added focused coverage for workspace snapshot storage, refresh deduplication, and client-side selection.

Why

Codex and OpenCode discover project-local skills relative to the current working directory, but T3 Code only exposed the machine-level provider snapshot to the composer. As a result, skills from the current project were missing from both selectors.

Workspace discovery now stays scoped to the provider instance and working directory, while machine-level provider metadata remains unchanged.

Screenshots

The Unslop skill is installed in the project, but it was not shown before. It is shown now.

Before: image image Image Image

After: image image image image

(The skill being labelled as provider skill for OpenCode is a different bug. Will fix that in another PR)

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Built with GPT-5.6 Sol in the Codex harness.

Note

Add workspace-scoped provider skills and slash commands to composer menus

  • Introduces per-cwd workspace snapshots on ServerProvider containing skills and slashCommands, stored in-memory in ProviderRegistry with a cap of 16 entries per provider and deduplication of concurrent refreshes.
  • CodexDriver and OpenCodeDriver expose snapshotForCwd(cwd) which probes skills for the working directory (via app-server process or CLI) with a 20s timeout.
  • ProviderCommandReactor triggers a background refreshWorkspaceSnapshot when a thread resolves its effectiveCwd, and the serverRefreshProviders RPC accepts an optional cwd to scope the refresh.
  • ChatComposer and ChatView now use resolveProviderSkillsForCwd / resolveProviderSlashCommandsForCwd to display cwd-specific menus, falling back to machine-level collections when no workspace snapshot exists.
  • Risk: workspace snapshots are excluded from on-disk provider caches and cleared on instance rebuild, so skills may briefly show machine-level results after a provider restart until the next background probe completes. loadOpenCodeSkills SDK failures now propagate the error instead of defaulting to [] within that function.
Macroscope summarized f1f91e1.

Note

Medium Risk Adds cwd-scoped CLI/app-server probes and orchestration hooks on session start; failures are mostly non-fatal but increase background process load and change provider refresh RPC semantics.

Overview Project-local Codex and OpenCode skills and slash commands were missing from the composer because the UI only used machine-wide provider snapshots. This PR adds per-workspace snapshots (workspaceSnapshots on ServerProvider) and fills them by probing each provider for the active cwd.

Server: Codex and OpenCode drivers expose optional snapshotForCwd(cwd) (skills probe with a 20s timeout). ProviderRegistry.refreshWorkspaceSnapshot deduplicates in-flight probes, keeps up to 16 cwd entries in memory, strips workspace data from on-disk provider caches, and clears snapshots when an instance rebuilds. ProviderCommandReactor kicks off a detached workspace refresh after session start and when reusing a session without a full restart. serverRefreshProviders accepts optional instanceId + cwd to target a workspace refresh.

Client: resolveProviderSkillsForCwd / resolveProviderSlashCommandsForCwd prefer the matching workspace snapshot, else fall back to machine metadata. ChatComposer requests a scoped refresh when the selected provider lacks a snapshot for gitCwd; timeline and slash/$ menus use the resolved lists. refreshProviders single-flight keys now include cwd.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit f1f91e137a2a20d757b86444e7c53f33c0000dde. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro Plus

      Run ID: 259176d0-06ad-4a33-a1f2-b863c5f7bb77

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review

      Warning

      Your free Security trial is over. An organization admin can activate Security or dismiss this notice.


      Comment `@coderabbitai help` to get the list of available commands.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    3. UI consistency review: one concern about the new mount-time provider refresh in ChatComposer.

      Posted via Macroscope — UI Consistency
    4. Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.

      Fix All in Cursor ❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the [Cursor dashboard](https://www.cursor.com/dashboard/bugbot). Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 782d95cedddee092df92b0e331fbe9fb7ce33de4. Configure [here](https://www.cursor.com/dashboard/bugbot).
    5. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Not approved

      Macroscope's review found this PR not approvable — This change introduces workspace-specific provider probing, caching, RPC plumbing, and automatic process discovery from the Composer across server and web layers. Its cross-cutting runtime effects and unresolved probe/status interaction concern warrant human review.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    6. maria-rcks merged this80a14b6

    7. maria-rcks closed this

Sign in to join this conversation.