Skip to content

fix(cursor): discover and preserve native slash commands - #10796

Open
al0x99 wants to merge 1 commit into
pingdotgg:mainfrom
al0x99:fix/cursor-acp-commands-verified
Open

fix(cursor): discover and preserve native slash commands#10796
al0x99 wants to merge 1 commit into
pingdotgg:mainfrom
al0x99:fix/cursor-acp-commands-verified

Conversation

@al0x99

@al0x99 al0x99 commented Sep 8, 2026

Copy link
Copy Markdown

What Changed

Cursor advertises native slash commands such as /goal over ACP, but T3 ignores that catalog. T3 also appends a runtime-info text block that prevents Cursor from parsing the original command correctly.

Publish available_commands_update in the existing workspace catalog and preserve leading slash prompts when sending them to Cursor. Keep local skills and T3's /compact entry, replace withdrawn commands, and isolate catalogs by workspace and provider instance. The workspace cache is bounded to 16 entries.

Command dispatch does not wait for catalog discovery. Cursor can publish metadata after session startup; a first-turn command must still reach its native parser unchanged. Autocomplete gains the native entries once the session advertises them.

Why

Cursor CLI 2026.09.02-c22c1a3 joins ACP text blocks before resolving a leading slash command. Appending <runtime_info> can turn that context into command arguments or prevent a match. Ordinary prompts retain the existing runtime context.

Related to the capability and invocation work in discussion #6766. This is scoped to the existing Cursor adapter, with no client component or contract changes.

Verification

  • 46 focused tests pass. The three original regressions fail on upstream 061543e9. A separate regression verifies dispatch before command metadata arrives.
  • Server typecheck, targeted lint, formatting, and git diff --check pass.
  • Real Cursor through the patched T3 driver: /copy-request-id returns its native response without inference. A /goal task repairs a Python function and passes seven independently checked cases; the test file is unchanged.
  • The web client shows the advertised /goal entry and inserts it on selection.
vp test run apps/server/src/provider/Drivers/CursorCommands.test.ts apps/server/src/provider/Drivers/CursorDriver.test.ts apps/server/src/provider/Layers/CursorAdapter.test.ts apps/server/src/provider/acp/CursorTransportFailure.test.ts
# From apps/server:
tsc --noEmit

Longer live sequences can still return Error: RetriableError: WritableIterable is closed. The same workload reproduces this with direct Cursor ACP, without T3. That existing Cursor failure is outside this fix; this PR does not claim full CLI goal-loop parity.

UI Changes

Both captures use Cursor Auto after session startup. The baseline's transport diagnostic is the separate failure described above.

Before After
Native goal entry absent Native goal entry available

8-second command selection recording

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for the command menu
  • I included a video for the interaction change
  • Review assets are uploaded to GitHub, not committed

Model: GPT-6. Harness: Codex.

Summary by CodeRabbit

  • New Features
    • Added support for discovering and displaying Cursor slash commands within workspaces.
    • Preserved typed slash commands and leading commands while command catalogs load.
    • Kept commands and skills isolated across workspaces and sessions.
    • Preserved local skills while updating available Cursor commands.
    • Improved handling of native slash commands when sending prompts.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Sep 8, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — The PR adds a new Cursor command-catalog capability and changes production prompt assembly and asynchronous workspace snapshot behavior. Although focused tests cover the main flows, the cross-component, user-facing runtime change warrants human review.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: fda6fa53-0669-4007-9d4c-213e1ab010a3

📥 Commits

Reviewing files that changed from the base of the PR and between 061543e and 719c573.

📒 Files selected for processing (4)
  • apps/server/src/provider/Drivers/CursorCommands.test.ts
  • apps/server/src/provider/Drivers/CursorCommands.ts
  • apps/server/src/provider/Drivers/CursorDriver.ts
  • apps/server/src/provider/Layers/CursorAdapter.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

Cursor now captures ACP slash commands per workspace, merges them into provider snapshots, preserves local skills, and avoids appending runtime instructions to native slash-command prompts. New tests cover command timing, isolation, replacement, and clearing.

Changes

Cursor command catalog

Layer / File(s) Summary
Capture ACP commands and preserve native slash prompts
apps/server/src/provider/Layers/CursorAdapter.ts
CursorAdapter forwards available-command updates to a callback. Prompts beginning with slash commands omit the runtime instruction block.
Store and merge workspace commands
apps/server/src/provider/Drivers/CursorCommands.ts
The command catalog stores bounded workspace snapshots, deduplicates commands, preserves skills, and merges catalog commands with provider snapshots.
Wire catalog state into CursorDriver
apps/server/src/provider/Drivers/CursorDriver.ts, apps/server/src/provider/Drivers/CursorCommands.test.ts
CursorDriver integrates command updates into snapshot refresh and change streams. Tests cover delayed publication, workspace isolation, local skills, command replacement, and clearing.

Priority: ➖ Normal — Schedule the Cursor adapter change because it restores native slash-command discovery, invocation, and workspace-specific autocomplete behavior.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: ⚪ Minimal · up to 719c5

Cursor native slash commands are now preserved for invocation and surfaced for autocomplete per workspace while retaining local skills. The covered catalog, isolation, and timing behavior presents no remaining merge-blocking risk.

Suggested reviewers: juliusmarminge, maria-rcks, t3dotgg

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly explains the change, the reason, verification steps, UI evidence, scope limits, and checklist completion. It follows the repository template and provides sufficient implementat…
Title check ✅ Passed The title clearly and concisely describes the primary change: discovering and preserving Cursor native slash commands.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

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

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant