Back to feed
Dev.to
Dev.to
7/11/2026
How Cursor, Claude Code, and Codex actually load your project rules (and why yours get ignored)

How Cursor, Claude Code, and Codex actually load your project rules (and why yours get ignored)

Short summary

Cursor, Claude Code, and Codex each load project rules files differently — Cursor uses frontmatter-driven attachment modes, Claude Code loads CLAUDE.md every session as a context tax, and Codex merges AGENTS.md hierarchically with nearest-file precedence. Most 'ignored rules' aren't broken; they were never loaded because of vague descriptions or missing globs. Write imperatives at the decision site, explain the why on negative constraints, and prune rules to avoid diluting the model's attention.

  • Cursor rules need globs and precise descriptions to be loaded; vague rules sit unused in Apply Intelligently mode
  • Claude Code's CLAUDE.md is a context tax — keep root short, push detail into nested/imported files
  • Codex AGENTS.md merges hierarchically; treat it as scoping, not duplication, to avoid silent overrides

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more