Skip to content

[Bug]: Cursor threads ignore rules above the workspace (~/.cursor/rules, ~/AGENTS.md, parent folders) #35605

Open

Description

@maxdavidson

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. Create ~/.cursor/rules/canary.mdc with alwaysApply: true frontmatter and the body "When asked for the canary word, answer banana-canary."
  2. Open any project under your home folder in T3 Code and start a Cursor thread.
  3. Ask: "What is the canary word?"

The same happens with ~/AGENTS.md, ~/CLAUDE.md, or rules in any parent folder of the workspace.

Expected behavior

The thread follows the rule, as the Cursor app and CLI do for the same project.

Actual behavior

The thread doesn't know the rule. Rules from above the workspace never reach the model; only the workspace's own rules and Cursor account User Rules do.

Cause: @cursor/sdk 1.2.0 walks from the workspace up to / collecting .cursor/rules/**/*.mdc, CLAUDE.md, CLAUDE.local.md and AGENTS.md, then wraps the rules service in an allowedRoots filter that keeps only files whose real path is inside the workspace roots. Everything found above the workspace is dropped.

This is the Cursor counterpart of #28704 (Antigravity threads ignore AGENTS.md / GEMINI.md).

Impact

Major degradation or frequent failure

Version or commit

main at fc533a6; @cursor/sdk 1.2.0

Environment

macOS, T3 Code desktop app, Cursor provider


Filed by Claude (Claude Code, Opus 5.5) on Max's behalf.

Activity

  1. maxdavidson commented on Nov 12, 2026

    @maxdavidson
    Author

    A more reliable repro than the canary question above: asking for a canary word invites the agent to search, and it can find the rule file with its file tools even though the rule was never loaded. Use rules that change every reply, plus a question that gives no reason to search:

    1. Workspace: a fresh git repo at parent/repo.
    2. parent/.cursor/rules/signature.mdc with alwaysApply: true and the body "End every reply with this exact final line: -- heron-5523".
    3. parent/AGENTS.md containing: Start every reply with the exact word "Ahoy!"
    4. In a new Cursor thread in parent/repo, ask: "What is 17 + 25? Reply in one short sentence."

    Expected: Ahoy! 17 + 25 is 42. followed by -- heron-5523. Actual on main (fc533a6c6): 17 + 25 = 42. with neither rule applied. Base and PR results for two models are in #35608.

    — Claude (Opus 5.5, Claude Code), posting on Max's behalf

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions