Repository navigation
fix(server): Claude picks up project slash commands - #13077
JoeEverest wants to merge 4 commits into
Conversation
fe672f7 to
726b5ec
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The cache freshness issue blocks approval, and driver-level integration coverage is missing.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
What changed in this PR
Adds workspace-aware Claude slash-command discovery so project commands appear in the / menu.
Changes:
- Adds cwd-specific command probing with fallback behavior.
- Integrates workspace probes into cached provider snapshots.
- Adds probe behavior and failure-handling tests.
| File | Summary | Findings |
|---|---|---|
apps/server/src/provider/Layers/ClaudeProvider.ts |
Implements cwd-specific slash-command probing. | None |
apps/server/src/provider/Layers/ClaudeCapabilitiesProbe.test.ts |
Tests workspace discovery and fallback behavior. | None |
apps/server/src/provider/Drivers/ClaudeDriver.ts |
Integrates workspace command probes into snapshots. | Critical cache freshness issue (3 votes); moderate driver-level coverage gap (1 vote). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
726b5ec to
ba5c9e5
Compare
Claude Code resolves slash commands from the working directory, but T3 Code only ever probed for them once, in the server's own directory. Project commands in `<project>/.claude/commands` never reached the `/` menu. `snapshotForCwd` already re-discovered skills per workspace; it now re-probes slash commands there too. A failed probe keeps the machine-wide list instead of emptying the menu. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ba5c9e5 to
96390f7
Compare
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: pingdotgg/t3code/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (7)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughWorkspace snapshots now expire after five minutes. Server, web, and mobile consumers use shared freshness checks. Claude snapshot creation probes workspace-specific slash commands and merges successful results. ChangesWorkspace snapshot capabilities
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant ClaudeDriver
participant probeClaudeSlashCommandsForCwd
participant ClaudeSdk
ClaudeDriver->>probeClaudeSlashCommandsForCwd: request slash commands for cwd
probeClaudeSlashCommandsForCwd->>ClaudeSdk: query capabilities with cwd
ClaudeSdk-->>probeClaudeSlashCommandsForCwd: commands or failure
probeClaudeSlashCommandsForCwd-->>ClaudeDriver: deduplicated commands or undefined
ClaudeDriver->>ClaudeDriver: add commands to snapshot
Suggested reviewers: Merge Risk: ⚪ Minimal · up to No concrete merge-blocking defect is established by the available evidence. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — The PR adds cwd-specific Claude command discovery and changes retained workspace snapshots to re-probe after five minutes across server and client paths. It also introduces a line-level suppression for a static-analysis diagnostic, making the change unsuitable for automatic approval. Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more. |
A workspace snapshot was kept for the life of the server process, so a command or skill added to a project after it was first opened never appeared. The registry returned early whenever the cwd was already present, and both composers stopped asking once they saw a snapshot. Give the snapshot a five-minute window, shared from contracts so the registry and both clients change their minds at the same moment. Stale snapshots still serve the menu while a refresh runs; dropping back to the machine-wide lists would make project commands disappear and return. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
…e wall clock Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Note This comment is posted by Julius' dot The workspace probe fixes Claude commands missing on first load; the shared five-minute expiry also changes existing skill/command refresh across the registry and both clients. Could you explain why those need to ship together, given the earlier reply described staleness as a separate issue? Under the one-problem rule, please explain the dependency or split the independently useful refresh work so triage can finish. |
|
Thanks for working on this. We merged the orchestrator V2 rewrite in #2829, and we are closing this PR as part of that transition. The patch conflicts with the rewrite in apps/server/src/provider/Drivers/ClaudeDriver.ts, packages/contracts/src/server.ts. Even where the conflict is small enough to rebase, we are asking for fresh PRs against the new base so we can review and verify the behavior in V2. Sorry for the extra work this creates. If the change is still needed on V2, please rebuild it on current main, verify it there, and open a new PR linking back here. We're closing the current implementation without assuming the underlying request is resolved. |

Claude Code resolves slash commands from the working directory, but T3 Code only ever probed for them once, in the server's own directory. Project commands in
<project>/.claude/commandsnever reached the/menu.snapshotForCwdalready re-discovered skills per workspace; it now re-probes slash commands there too. A failed probe keeps the machine-wide list instead of emptying the menu.Workspace snapshots also never expired, so anything added to a project after it was first opened stayed invisible until a restart — for skills as much as commands. They now carry a five-minute window, shared from contracts so the registry and both composers change their minds at the same moment. A stale snapshot still serves the menu while its replacement is probed; falling back to the machine-wide lists would make project commands vanish and reappear.
before.mov
after.mov
Reproduced with a project holding one
.claude/commands/should-exist.md: the command is absent from the/menu before the change and present after. A live init handshake from~/Work/glidereports 146 commands; the cached machine-wide snapshot held 125, and the 21 missing were exactly that project's commands and skills.Claude Opus 5 (1M context) in Claude Code.
Summary by CodeRabbit
New Features
Bug Fixes