Skip to content
Pathrule

memory

Sessions end.
Memory stays.

Persistent memory for AI coding agents: the decisions, gotchas and conventions your team learned, kept outside the agent and attached to the paths they govern.

Codex, a week laterexample
Add a refunded status to orders.

Without

Done. Added the enum value and ran the schema migration.

Deploy failed: the data migration had to run first.1 correction

With Pathrule

1 memory for db/migrations

  • Data migration first, then schema. Reversed from the rest of the schema.

Writing the data migration first, as this folder requires.

Shipped in one pass.0 corrections

What a session takes with it.

Monday, Claude Codecontext, 92%

session closed

Tuesday, a new sessioncontext, 0%

  • Decisions, and the reasons behind them
  • The gotcha that cost a day
  • The approach that already failed
  • Whatever the other agent learned

The files state the current shape of the code. They do not state why, which way round to change it, or that someone already got it wrong.

Memory is where it starts.

  1. Memorywhat was recorded
  2. Knowledgewhat it means
  3. Intelligencewhen it matters
  4. Task contextthis task

Memory stores the past. Intelligence decides what matters now: whether it applies to this path, whether it is a rule or a preference, and whether a person confirmed it. How it decides

Built for code, not chat.

chat memoryscoped to a person
  • Recalled when something asks
  • Private to one account
  • One pile, no types
  • Resets when you switch tools
project memoryscoped to a path
  • apps/mobile3
  • services/billing7
  • db/migrations2
  • Delivered before the first tool call
  • Shared across the team
  • Typed as memories, rules and skills
  • Outside every agent

A memory store answers when it is asked, and an agent that never thought to ask about the convention never receives it. Project memory reads the path first.

Fact, rule, procedure.

If it depends on the situation, it is a memory. If it is non-negotiable, a rule. If it is a sequence someone keeps walking through, a skill.

Sometimes a file is enough.

one agent
Keep the CLAUDE.md
several agents
One memory for all
a team
Shared and reviewable
must hold
A strict rule

What changes the answer is not the size of the repository. It is whether the knowledge has to reach somewhere a file cannot travel. Where each approach breaks

Questions.

What is AI agent memory?

The knowledge an AI agent can use in a session it did not learn it in. For a coding agent the useful kind is project memory: decisions, gotchas and conventions that are stated nowhere in the source, stored outside the agent and delivered back when work happens near the code they govern.

Why do AI coding agents forget between sessions?

A model call has no inherent memory, but products can persist knowledge outside the context window. Codex local memories, Claude Code auto memory and committed instruction files all help between sessions. The remaining question is what gets stored, who can use it and when it arrives. Long read: why AI coding assistants forget your codebase between sessions.

Is a memory API the same as memory for a coding agent?

No, and the difference is delivery timing. A memory API answers when it is queried, which works when you own the call site inside your own product. A coding agent does not know what it is missing, so a constraint it never thought to ask about never arrives. Project memory reads the path the agent is about to work in and delivers the matching knowledge before the first tool call.

Can I not just put everything in CLAUDE.md?

For a small repository, a short instruction file is often enough. Claude Code supports path-scoped rules and conditional AGENTS.md loading; Codex supports nested AGENTS.md and local memories. Pathrule becomes useful when the same workspace knowledge must reach different agents with task-specific selection and enforceable requirements. Side by side: Pathrule vs instruction files.

How is this different from vector search over my repository?

They answer different questions. An index over your repository can tell the agent what the code currently says, which is useful when the answer exists but nobody remembers where. It has nothing to return for a decision that was made in a review and written down nowhere, and that is most of what project memory holds. The two coexist: retrieval over the files, memory over the reasoning. Long-form: vector RAG vs path-scoped context.

Does team memory mean my whole team sees everything?

Membership decides. Memories, rules and skills live in a shared path-indexed graph with workspace access enforced on the server rather than in the client. See roles and permissions.

Does agent memory mean uploading my source code?

It does not have to. Pathrule does not automatically upload your repository source code. In local mode there is no account and knowledge stays on your machine. In cloud mode, Pathrule Cloud stores the memories, rules and skills your team writes, and the start of each prompt is sent to rank what applies. Full breakdown on the Security page.

What happens to my memory when I change coding agent?

Nothing, which is the point of storing it outside the agent. The same memories reach Claude Code, Codex, Cursor, GitHub Copilot, Windsurf and any other client connected over MCP, so switching agent does not reset what the team has written down. Long read: team memory should not change when AI tools do.

Do I need agent memory if I work alone?

You still forget, and so does the agent. Solo, the thing memory buys you is not sharing, it is the version of yourself from four months ago: the reason you rejected an approach, which you will otherwise re-litigate with an agent that has no idea it was ever settled. It compounds further if you run more than one agent, since none of them can read another's notes. Pathrule is free for individual use. Which approach fits covers when it is genuinely overkill.

Write it down once.
Every session starts there.