Pathrule

Comparison

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 the agents Studio runs and supported 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 compiles typed structure 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 connects strict rules and required checks to runtime guardrails on supported surfaces, while context-only integrations remain advisory. Its published compliance grid reports functional success, convention compliance and violations separately, including neutral cases.

A measured example, with its boundary

The published compliance grid includes tasks where an environment value must pass through a gateway, an empty request body must be guarded before parsing, and a database is a read-only replica. Those decisions were deliberately absent from the source files, so the agent could make a working change while violating a workspace convention.

Across 12 tasks and 24 runs with one pinned Claude Code model, both conditions finished all 12 tasks functionally. Compliance was 3/12 without Pathrule and 12/12 with it; convention violations were eight versus zero. Three tasks were neutral because the needed fact was already recoverable from the repository. This measures Pathrule's delivery in that setup. 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 writingWorkspace and user, with the evidence behind eachAuto memory, on by defaultOpt-in local memories from eligible chatsMemories, learned from your behaviourCopilot Memory preview
Who that learning belongs toThe workspace, and you across workspacesThis repository, on this machineLocal to the Codex installationYou, and your teammates never see itRepository facts shared; user preferences private
Shared with the teamWorkspace sync, 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 receivesCompiled typed knowledge, requirements ranked above adviceMarkdown textMarkdown textMarkdown textInstruction text and cited memories
EnforcementConstraints and checks held by the runtime, from the same knowledgeHooks, 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, every engine Studio runs plus 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, compiled per task. See the architecture 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. OpenCode V2 and Kimi Code document AGENTS.md instructions. Google Antigravity documents AGENTS.md and rules with activation modes, plus a /learn command that can turn feedback into persistent rules or skills. None should be described simply as having no memory or no scoped instructions.

These are documentation findings, not a cross-product runtime test. Installed CLI versions inspected here were OpenCode 1.18.34, Kimi 2.1.1 and Antigravity CLI 1.2.14; 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, Codex CLI 0.145.0, OpenCode 1.18.34, Kimi 2.1.1 and Antigravity CLI 1.2.14. Codex memories were disabled locally; memory generation and cross-agent behavior were not runtime-tested. Cursor, Copilot and Windsurf were documentation-reviewed only. Pathrule source reviewed at Studio 0.23.1 plus unreleased working-tree changes.

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, compiles it into typed structure, 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 never reads or uploads source files. It stores only the knowledge your team writes and the evidence from real work. See the Security page.

Get started with Pathrule.