Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): Cursor V2 threads load project skills and rules #13499

Mergedjuliusmarmingemerged 1 commit intot3code/codex-turn-mapping fromrefs/pull/13499/headmerged by juliusmarminge View on GitHub

Showing 12 changed files with 41 additions and 1 deletion (loading 9).

x
0 of 12 viewed, 12 left
22 additions and 0 deletionsapps/server/src/orchestration-v2/Adapters/CursorAdapterV2.test.tsModified
View file
@@ -845,6 +845,28 @@
});
​
+ it("loads the user's Cursor settings layers in every runtime mode", () => {
+ // The SDK loads no rules, skills, hooks, or MCP config from disk unless
+ // settingSources names them, so an omitted list silently drops AGENTS.md.
+ for (const runtimeMode of ["full-access", "auto-accept-edits", "approval-required"] as const) {
+ const options = makeCursorAgentOptions({
+ modelSelection: {
+ instanceId: ProviderInstanceId.make("cursor"),
+ model: "composer-2.5",
+ },
+ runtimePolicy: { runtimeMode, interactionMode: "default", cwd: "/workspace" },
+ threadId: ThreadId.make("thread-cursor-setting-sources"),
+ });
+ assert.deepEqual(options.local?.settingSources, [
+ "project",
+ "user",
+ "team",
+ "mdm",
+ "plugins",
+ ]);
+ }
+ });
+​
it("injects thread-scoped MCP credentials without logging them", () => {
const threadId = ThreadId.make("thread-cursor-mcp");
McpProviderSession.setMcpProviderSession({