Skip to content
Pathrule

compare

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

PathruleClaude CodeCodexCursorCopilot
Path scopingKnowledge attached to paths, selected per task`.claude/rules/` with `paths:` globsNested AGENTS.md, root down to your directoryRules with globsPath-specific instructions with applyTo globs
Learns without you writingAdvisory agent findings, personal preferences, and team patterns once a person verifies themAuto memory, on by defaultOpt-in local memories from eligible chatsMemories, learned from your behaviourCopilot Memory preview
Who that learning belongs toThe project, you across projects, and the team once verifiedThis repository, on this machineLocal to the Codex installationYou, and your teammates never see itRepository facts shared; user preferences private
Shared with the teamPathrule Cloud workspace, no commit neededCLAUDE.md by commit; auto memory not at allAGENTS.md by commit; local memories stay localRules by commit or team setting; Projects share context inside CursorInstructions by commit; repository memories shared with access
What the agent receivesMemories, rules and skills selected for the path and task, rules ranked by priorityMarkdown textMarkdown textMarkdown textInstruction text and cited memories
EnforcementStrict rules checked at the Pathrule hook, from the same workspace rule (Claude Code and Codex)Hooks, written separately by youHooks can block supported actionsHooks, written separately by youHooks depend on Copilot surface
Documented size limitsSelected per task rather than loaded wholeAuto memory index first 200 lines or 25KB; under 200 lines advised per CLAUDE.mdStops adding files at 32 KiB combinedGuidance to keep a rule file under 500 linesNo single cross-surface limit documented here
Reaches other agentsOne source for Claude Code, Codex, Cursor, Copilot, Windsurf and MCP clientsAGENTS.md under documented loader conditionsAGENTS.md-aware toolsCursor ecosystem, including ProjectsCopilot 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.

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.

Get started with Pathrule.