{
  "id": 8186081,
  "title": "Writing Cursor rules that actually fire: activation modes explained",
  "url": "https://urgent.news/2026/09/18/writing-cursor-rules-that-actually-fire-activation-modes-explained",
  "topic": "ai",
  "section": "AI",
  "published": "2026-09-18T06:01:28.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/piekwerk/writing-cursor-rules-that-actually-fire-activation-modes-explained-26fl"
  },
  "original_language": "en",
  "account": "The article explains how Cursor rule activation works and how to avoid common pitfalls. Cursor rules are defined in .mdc files with YAML frontmatter containing three fields: description, globs, and alwaysApply. The frontmatter determines when a rule loads.\n\nThere are four activation modes: Always, Auto Agent, Agent Requested, and Manual. Always rules load on every request, costing tokens, and should be kept to a minimum. Auto Agent rules load when files matching the globs appear in the agent's context, making them the most common use case. Agent Requested rules fire when explicitly invoked in chat, useful for cross-cutting rules. Manual rules are invoked when mentioning the rule name in chat and are meant for heavyweight references.\n\nThe article outlines five failure modes. Broken globs are the most common, where the specified path matches no files, and the rule never loads without any indication. Single-string globs require an array format for multiple paths. Description-only rules in Agent Requested mode need to include the necessary trigger vocabulary for the model to match. Every rule marked important with alwaysApply: true can lead to a bloated implicit CLAUDE.md. Lastly, filewatcher drift occurs when reorganizing the repository, causing scoped rules to fail quietly without any warning.\n\nTo catch these issues, the author recommends auditing the globs by checking if they match at least one real file in the repository. A Python script, rules_audit.py, is provided to automate this process. Alternatively, the AgentConfig Studio includes a validation harness that parses rule frontmatter, verifies required files and line budgets, and scans for placeholder rot. Following these guidelines ensures that Cursor rules fire as intended.",
  "summary": "A Cursor rule that never fires is indistinguishable from a rule you never wrote. There is no warning, no log line, no UI flag. You find out when the agent, for the fifth time, generates API errors as raw strings despite your beautifully written rule saying not to. This article is about the activation mechanics that decide whether a rule loads at all. The frontmatter Every .mdc file in…",
  "key_points": [
    "Cursor rules defined in .mdc files with YAML frontmatter",
    "Four activation modes: Always, Auto Agent, Agent Requested, Manual",
    "Always rules load on every request, costing tokens"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}