Pathrule vs CLAUDE.md, AGENTS.md and .cursorrules
Claude Code, Codex, Cursor and Copilot all carry knowledge forward in different ways. The useful comparison is where knowledge is shared, how it is selected for a task, and whether a requirement can be checked or blocked.
What these agents already do
Claude Code has path-scoped rules and local auto memory. It also supports AGENTS.md directly from version 2.1.277, but its default loader uses AGENTS.md only when no CLAUDE.md or CLAUDE.local.md is found in the current directory or an ancestor. Codex combines nested AGENTS.md instructions with opt-in local memories generated from eligible chats.
Cursor has scoped rules, user memories and Projects that share context across Cursor agents. GitHub Copilot has path-specific instructions and a memory preview: repository facts can be shared with users who have access, while user preferences stay private. These are meaningful capabilities, so Pathrule's difference cannot be that other agents do not remember.
The remaining questions are whether the same knowledge reaches different vendors' agents, whether the task receives the relevant slice, and what happens when a rule must hold or a result must be measured.
Where Pathrule adds value
A shared source across agent vendors. Codex local memories, Claude Code auto memory and Cursor user memories are useful within their own products. Cursor Projects and Copilot repository memories also share context within their ecosystems. Pathrule holds workspace knowledge once and delivers it to Claude Code, Codex, Cursor, GitHub Copilot, Windsurf and other MCP clients, so a teammate changing agents does not need a second copy.
Task selection with explicit requirements. Pathrule attaches knowledge to workspace paths, selects the slice relevant to the request, and keeps each rule's priority and enforcement level with it so a requirement keeps its rank above advice. Path-scoped files and rules in other products solve part of this problem; the difference is one shared selection and priority model across supported agents.
Enforcement and measured outcomes. Claude Code, Codex and Cursor expose blocking hooks. Pathrule checks a strict rule with an approved block pattern at its hook on Claude Code and Codex (rules as guardrails), while Cursor, GitHub Copilot, Windsurf and Remote MCP, which Pathrule reaches over MCP, remain advisory. PathruleBench reports cost, input tokens and what reached later sessions separately, including the conditions where the channels tie.
A measured example, with its boundary
PathruleBench gives the same agent the same team knowledge through two channels, CLAUDE.md files or Pathrule, over eight sessions of four turns, and checks 26 memory probes with tests and structural checks: a habit stated once, a lesson a failing command taught, a decision that changed, seeded team knowledge.
At 2,000 items of team knowledge, in Python, Go and TypeScript, the agent read 2.7 times fewer input tokens and cost about 55% less a chain with Pathrule, and passed more of the probes. At 500 items the two channels are close, and the TypeScript 500-item memory interval includes zero. This measures Pathrule's delivery against instruction files in that setup, not a guarantee for other repositories, agents or tasks. It does not compare Codex memories, Cursor Projects or Copilot Memory.
Side by side
| Pathrule | Claude Code | Codex | Cursor | Copilot | |
|---|---|---|---|---|---|
| Path scoping | Knowledge attached to paths, selected per task | `.claude/rules/` with `paths:` globs | Nested AGENTS.md, root down to your directory | Rules with globs | Path-specific instructions with applyTo globs |
| Learns without you writing | Advisory agent findings, personal preferences, and team patterns once a person verifies them | Auto memory, on by default | Opt-in local memories from eligible chats | Memories, learned from your behaviour | Copilot Memory preview |
| Who that learning belongs to | The project, you across projects, and the team once verified | This repository, on this machine | Local to the Codex installation | You, and your teammates never see it | Repository facts shared; user preferences private |
| Shared with the team | Pathrule Cloud workspace, no commit needed | CLAUDE.md by commit; auto memory not at all | AGENTS.md by commit; local memories stay local | Rules by commit or team setting; Projects share context inside Cursor | Instructions by commit; repository memories shared with access |
| What the agent receives | Memories, rules and skills selected for the path and task, rules ranked by priority | Markdown text | Markdown text | Markdown text | Instruction text and cited memories |
| Enforcement | Strict rules checked at the Pathrule hook, from the same workspace rule (Claude Code and Codex) | Hooks, written separately by you | Hooks can block supported actions | Hooks, written separately by you | Hooks depend on Copilot surface |
| Documented size limits | Selected per task rather than loaded whole | Auto memory index first 200 lines or 25KB; under 200 lines advised per CLAUDE.md | Stops adding files at 32 KiB combined | Guidance to keep a rule file under 500 lines | No single cross-surface limit documented here |
| Reaches other agents | One source for Claude Code, Codex, Cursor, Copilot, Windsurf and MCP clients | AGENTS.md under documented loader conditions | AGENTS.md-aware tools | Cursor ecosystem, including Projects | Copilot ecosystem |
Pathrule can coexist with these files. AGENTS.md vs Pathrule explains when each fits. Sources and review scope appear below.
When each one makes sense
The files alone. Genuinely the right answer for one developer on one agent. They are zero setup, they are free, they are committed and reviewable, and with globs and auto memory they now cover much more than they used to. Start here.
The files, plus discipline. A second vendor is where duplication can appear. Claude Code, Codex and Cursor each have ways to retain context, and some share it within their own product. Check whether your actual combination reads the same file and applies the same precedence before maintaining several copies.
Pathrule. Useful when a workspace spans agent vendors, when task-specific selection matters, or when requirements need enforcement and measured outcomes. One source, selected per task. See how Pathrule Intelligence works and how we measure.
Other agents checked
Windsurf Cascade documents local workspace memories plus shareable rules and AGENTS.md. Its current Devin Desktop documentation distinguishes the legacy Cascade agent from the default Devin Local agent, which does not persist those memories. It should not be described simply as having no memory or no scoped instructions.
This is a documentation finding, not a cross-product runtime test; Windsurf, Cursor and Copilot were not locally tested. The sources below show each product's published behavior.
Sources and verification
Official documentation checked 1 October 2026. Installed versions inspected: Claude Code 2.1.287 and Codex CLI 0.145.0. Codex memories were disabled locally; memory generation and cross-agent behavior were not runtime-tested. Cursor, Copilot and Windsurf were documentation-reviewed only. Pathrule claims reviewed against the Pathrule v1 CLI on 19 October 2026.
- Claude Code: how Claude remembers your project
Official source for CLAUDE.md loading and scope, for path-scoped rules in .claude/rules/ with paths: globs, and for auto memory: its four note types, the 200 line or 25KB index limit, and that it is per repository and machine local.
- Codex: custom instructions with AGENTS.md
Official discovery order and precedence: global scope, then project root down to the working directory, one file per directory, concatenated, stopping at 32 KiB combined.
- Codex: local memories
Official opt-in local memory behavior, storage, generation and controls.
- Cursor: rules
Official rule locations, application modes, globs and team rules.
- Cursor: memories
Official behaviour for memories Cursor extracts from your work, and how they differ from rules.
- Cursor: Projects
Official shared project context across Cursor agents and machines.
- GitHub Copilot: repository custom instructions
Official behaviour for copilot-instructions.md and for path-specific *.instructions.md files with an applyTo glob.
- GitHub Copilot: memory
Official repository and user memory behavior, sharing and availability.
- Windsurf Cascade: memories and rules
Official local Cascade memories, shareable rules and AGENTS.md behavior, with the Devin Local distinction.
Frequently asked questions
Claude Code has auto memory now. Does that replace Pathrule?
Claude Code auto memory is useful within Claude Code. Pathrule is useful when the same workspace decision must reach Codex or another agent, be selected for a task, or be enforced through a supported hook. Claude Code also supports AGENTS.md under documented loading conditions.
Is Pathrule a replacement for CLAUDE.md?
No. Keep a short CLAUDE.md or AGENTS.md for repository-wide constants. Pathrule carries workspace knowledge that must reach teammates and supported agents from one source, with task selection and rule enforcement where available.
Do these files still have a scoping problem?
Less of one than they used to, and this page does not claim otherwise. Claude Code takes paths: globs on rules, Codex nests AGENTS.md per directory, and Cursor scopes rules by glob. What remains is that each documented limit is a size cap (a 32 KiB concatenation in Codex, a 200 line or 25KB memory index in Claude Code) rather than a relevance decision.
How does Pathrule compare to AGENTS.md?
Codex reads global and nested AGENTS.md instructions up to a documented 32 KiB combined limit. Other agents also support AGENTS.md, with different loading rules. Pathrule stores shared workspace knowledge as typed memories, rules and skills, and selects the relevant part for each supported agent and task.
Do I have to migrate off my existing files?
No. Pathrule layers on top. Many teams keep a short CLAUDE.md or AGENTS.md and move the path-specific, team-shared rules into Pathrule so each session only loads what applies.
Does the comparison mean files are bad?
No, and they are better than they were. A file is the right starting point for one developer on one agent. The trade-off appears at team scale, across several agents, and anywhere a rule needs to hold rather than be read.
Does Pathrule store my source code?
No. Pathrule does not automatically upload your repository source code. In cloud mode it stores the knowledge your team writes. Local mode runs with no account. See the Security page.