1 min lesson
Dynamic context discovery, since v2.4
Use "Useful context for billing tickets where a user expects every request to be maximally expensive" to say what you would do next.
Step 1 of 3
Cursor doesn't shove every file, tool and MCPModel Context Protocol. A standard that lets an AI agent pull in context from outside the repo, like Jira tickets or internal docs. Press Enter for the full definition. output into the window. Since v2.4 the agent reads from files, tools and MCP and pulls in only what it deems relevant, a filesystem approach that preserves accuracy as context grows.
Combined with caching, this harness behavior reduces agent tokens by around 47%, even on other vendors' models. Useful context for billing tickets where a user expects every request to be maximally expensive.
Learn more
Advanced table
Each context source adds its own failure surface
Each context source adds its own failure surface
- Context source
- Codebase index
- What it adds
- Semantic retrieval over the whole repo
- How it fails
- Failed/partial build, ignored paths, repo too large, stale after big changes
- Context source
- @-files / @-folders
- What it adds
- Exact files the user names
- How it fails
- User attached the wrong path or the file is huge and crowds the window
- Context source
- @-docs / @-web
- What it adds
- External reference material
- How it fails
- Doc not indexed, link unreachable, outdated source
- Context source
- Rules
- What it adds
- Standing instructions that steer the model
- How it fails
- Conflicting or overly broad rules, or a Team Rule outranking the user's own
- Context source
- MCPModel Context Protocol. A standard that lets an AI agent pull in context from outside the repo, like Jira tickets or internal docs. Press Enter for the full definition. servers
- What it adds
- External tools and data the model can call
- How it fails
- Server down, auth expired, schema mismatch, timeout
| Context source | What it adds | How it fails |
|---|---|---|
| Codebase index | Semantic retrieval over the whole repo | Failed/partial build, ignored paths, repo too large, stale after big changes |
| @-files / @-folders | Exact files the user names | User attached the wrong path or the file is huge and crowds the window |
| @-docs / @-web | External reference material | Doc not indexed, link unreachable, outdated source |
| Rules | Standing instructions that steer the model | Conflicting or overly broad rules, or a Team Rule outranking the user's own |
| MCPModel Context Protocol. A standard that lets an AI agent pull in context from outside the repo, like Jira tickets or internal docs. Press Enter for the full definition. servers | External tools and data the model can call | Server down, auth expired, schema mismatch, timeout |
More context power means more places to look when something goes wrong.
Learn more
Full explanation
Rules and MCP, specifically
Rules and MCP, specifically
Rules are standing instructions injected into the model's context, and they come in four types: Project RulesVersion-controlled instructions in the repo that every Cursor agent interaction inherits, so standards are encoded once. Press Enter for the full definition., which are .mdc files in .cursor/rules, User Rules, Team RulesRules promoted to apply across a whole organisation and shared consistently between the Cursor IDE, Agent and Bugbot. Press Enter for the full definition. and an AGENTS.md file. When guidance conflicts, precedence runs Team, then Project, then User. They're powerful and easy to forget. A user who set a rule weeks ago like "always respond in terse pseudocode" will later report that "the agent won't write real code," and the cause is sitting in their own rules.
Two causes to rule out when rules misbehave: a Team Rule enforced from the dashboard is outranking the user's own rule, or a plain .md file in .cursor/rules is being silently ignored because it has no frontmatter.
MCPModel Context Protocol. A standard that lets an AI agent pull in context from outside the repo, like Jira tickets or internal docs. Press Enter for the full definition., the Model Context Protocol, lets Cursor connect to external servers that expose tools and data. Each connection is a small integration with its own auth and uptime.
Looking at just the code helps, but the additional sources of context are what actually equip a team. Ticketing such as Jira or Intercom and a knowledge base such as Notion come first, and customer context from your CRM adds the account side.
Cursor's own support stack is concrete: Datadog MCPModel Context Protocol. A standard that lets an AI agent pull in context from outside the repo, like Jira tickets or internal docs. Press Enter for the full definition. to pull logs directly in for debugging, Notion MCP for their docs and Linear for bug reports.
Historical tickets and past answers don't need to live in a code repository. Cursor's team keeps them with an external vendor and brings them in via MCPModel Context Protocol. A standard that lets an AI agent pull in context from outside the repo, like Jira tickets or internal docs. Press Enter for the full definition.. Markdown stored somewhere Cursor can read would also help the in-IDE agent, a powerful option rather than a requirement.
Hooks: deterministic code in the agent loop
LLMs are nondeterministic by design, so you can't rely on the model to decide to protect secrets or log usage. Hooks let you attach code that runs every time its lifecycle point in the agent loop fires, instead of trusting the model to remember. Two real uses: scanning agent responses for secrets and feeding your own analytics to track usage at the team level. One catch support will field: hooks fail open by default, so a crash, a timeout or invalid JSON lets the action through. Set failClosed: true on security-critical hooks, especially beforeMCPExecution, to block instead.
Privacy ModeCursor's setting that guarantees code data is not used for training by Cursor or its model providers, and that an admin can enforce org-wide; data-retention terms are a separate, contractual layer. Press Enter for the full definition. is a no-training guarantee: your code is not used for training by Cursor or its model providers. On its own it does not explain "why doesn't it see my code," so don't blame it first.
When an enterprise user's view of the codebase is narrower than expected, check admin policy and ignore files. Admin-set controls such as repository, model and MCPModel Context Protocol. A standard that lets an AI agent pull in context from outside the repo, like Jira tickets or internal docs. Press Enter for the full definition. access, plus team-wide privacy settings, can limit what Cursor reaches by design. Cloud-backed features add their own condition: Origin and mobile agents don't work on legacy privacy mode.
cursor.com/docs has an Ask AI feature that semantic-searches the documentation and returns a detailed answer. Ask it "give me an overview of rules, skills, and sub-agents" and it pulls straight from the Customize section.
It's a good self-serve deflection for the rules, skills and MCPModel Context Protocol. A standard that lets an AI agent pull in context from outside the repo, like Jira tickets or internal docs. Press Enter for the full definition. questions in this section. Hand it to a user who wants to go deeper rather than retyping the docs into a ticket.