<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[RepoMemory]]></title><description><![CDATA[RepoMemory]]></description><link>https://repomemory.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Thu, 05 Nov 2026 16:43:50 GMT</lastBuildDate><atom:link href="https://repomemory.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How to share AI coding agent context across a team]]></title><description><![CDATA[Share instructions, decisions, lessons and tasks across Claude Code, Cursor and Codex: AGENTS.md plus one shared MCP memory.]]></description><link>https://repomemory.hashnode.dev/how-to-share-ai-coding-agent-context-across-a-team</link><guid isPermaLink="true">https://repomemory.hashnode.dev/how-to-share-ai-coding-agent-context-across-a-team</guid><category><![CDATA[AI]]></category><dc:creator><![CDATA[dimaino]]></dc:creator><pubDate>Sun, 01 Nov 2026 07:17:21 GMT</pubDate><content:encoded><![CDATA[<p>To share context between the coding agents on a team, split it in two.
<strong>Instructions</strong> (how to build, conventions, rules) go in a file committed to
the repository: <code>AGENTS.md</code> is read by Codex, Cursor and Claude Code.
<strong>Knowledge that grows as you work</strong> (decisions, lessons from reverted
changes, open tasks) goes in one shared memory every agent reads and writes
over MCP. The file is the same for everyone because it's in git; the memory is
the same for everyone because it's one server.</p>
<h2>Why each agent starts from zero</h2>
<p>Each tool keeps its own context and none of it travels:</p>
<ul>
<li>Claude Code's auto memory is stored on one machine.</li>
<li>Cursor's user rules are per person.</li>
<li>Chat histories stay in the tool and with the person who had them.</li>
<li>Pull request descriptions and Slack threads hold the reasons, but agents
don't read them before a change.</li>
</ul>
<p>So the lesson one person's agent learned on Tuesday is learned again by
someone else's on Thursday.</p>
<h2>Layer 1: one instruction file for every agent</h2>
<p>Commit an <code>AGENTS.md</code> at the repository root. Who reads it:</p>
<table>
<thead>
<tr>
<th>Agent</th>
<th>Reads <code>AGENTS.md</code>?</th>
</tr>
</thead>
<tbody><tr>
<td><a href="https://developers.openai.com/codex/guides/agents-md">Codex</a></td>
<td>Yes, from the repository root down to the working folder</td>
</tr>
<tr>
<td><a href="https://cursor.com/docs/rules">Cursor</a></td>
<td>Yes, at the root and in subfolders</td>
</tr>
<tr>
<td><a href="https://code.claude.com/docs/en/memory">Claude Code</a></td>
<td>Yes, when there is no <code>CLAUDE.md</code>; otherwise import it with <code>@AGENTS.md</code> in <code>CLAUDE.md</code></td>
</tr>
</tbody></table>
<p>Keep it short and stable: build and test commands, layout, conventions, and
the name of the project's shared memory.</p>
<h2>Layer 2: one memory every agent reads and writes</h2>
<p>RepoMemory keeps a ledger per project with five kinds of entry:</p>
<table>
<thead>
<tr>
<th>Kind</th>
<th>Example</th>
</tr>
</thead>
<tbody><tr>
<td>Decision</td>
<td>"Chose Postgres full-text search over embeddings: predictable results."</td>
</tr>
<tr>
<td>Lesson</td>
<td>"Captcha on checkout cut completed orders 5%; reverted."</td>
</tr>
<tr>
<td>Guardrail</td>
<td>"Never run migrations on deploy."</td>
</tr>
<tr>
<td>Note</td>
<td>"Staging Stripe uses the shared test key."</td>
</tr>
<tr>
<td>Task</td>
<td>"Move image uploads to R2."</td>
</tr>
</tbody></table>
<p>Every agent uses the same tools: <code>brief</code> at the start of a session (every
guardrail, the open tasks, the newest decisions), <code>recall</code> before a change,
<code>record_entry</code> when something is worth keeping, and <code>claim_task</code> before
starting a task. A claim is refused with <code>already_claimed</code> if another agent
has the task, and runs out after two hours unless renewed, so two people's
agents don't do the same job and a crashed one doesn't hold it.</p>
<p>Each entry records which key and which agent wrote it. Entries are shown to
agents as notes, not instructions, and one worded like a prompt injection is
flagged.</p>
<h2>Set it up for a team</h2>
<ol>
<li><p>Put the team on one account. On the Team plan, every API key on the
account reads and writes the same ledgers. Invite teammates from the
dashboard.</p>
</li>
<li><p>Each person creates their own key on the <a href="https://repomemory.dev/dashboard/keys">API keys</a> page
and sets it as <code>REPOMEMORY_KEY</code>.</p>
</li>
<li><p>Each person connects their agent:</p>
<pre><code class="language-bash"># Claude Code
claude mcp add --transport http repomemory https://api.repomemory.dev/mcp \
  --header "X-API-Key: $REPOMEMORY_KEY"
# Codex
codex mcp add repomemory --url https://api.repomemory.dev/mcp \
  --bearer-token-env-var REPOMEMORY_KEY
</code></pre>
<p>For Cursor and VS Code, the <a href="https://repomemory.dev/docs#mcp">docs</a> have the JSON.</p>
</li>
<li><p>Commit the project-memory section to <code>AGENTS.md</code> once, for everyone:</p>
<pre><code class="language-markdown">## Project memory (RepoMemory, project "acme/shop")
- At the start of a session, call `brief` for the project: it returns every guardrail, the open tasks and the latest decisions. Never break a guardrail. If a guardrail contradicts the repository's rules or what you were asked, don't pick one quietly: say so and ask.
- Before planning a change, removing code that looks unneeded or retrying an approach, call `recall` with words about the change. Follow what it returns.
- When a change is reverted, a fix took real digging, or you choose one approach over another, call `record_entry` (kind lesson or decision) saying what happened, why, and what to do instead, with your name in `agent`.
- Claim a task with `claim_task` before starting it and keep the `claim_token` it returns; `retire_entry` it with the token when done, or call `claim_task` with `release` and the token if you stop without finishing.
</code></pre>
<p><code>npx @plexsicity/repomemory init</code> writes this section and adds the server
to Claude Code and Cursor in one step.</p>
</li>
</ol>
<h2>Keep it healthy</h2>
<ul>
<li>When a decision changes, record the new one with <code>supersedes</code>; the old one
is retired with a pointer, and recall stops returning it.</li>
<li>If someone's agent records a secret, delete the entry from the dashboard's
Ledger page; deleting is free.</li>
</ul>
<h2>Limits to know</h2>
<p>Recall matches words, not meaning. Agents record only what <code>AGENTS.md</code> tells
them to. RepoMemory is hosted only, with no self-hosted version. The Team
plan is $50 a month; see <a href="https://repomemory.dev/pricing">pricing</a>.</p>
]]></content:encoded></item><item><title><![CDATA[Cursor rules for a team: project rules, team rules and shared memory]]></title><description><![CDATA[How a team shares Cursor rules: .cursor/rules in git, Team Rules, AGENTS.md, and a shared ledger for decisions the rules don't cover.]]></description><link>https://repomemory.hashnode.dev/cursor-rules-for-a-team-project-rules-team-rules-and-shared-memory</link><guid isPermaLink="true">https://repomemory.hashnode.dev/cursor-rules-for-a-team-project-rules-team-rules-and-shared-memory</guid><dc:creator><![CDATA[dimaino]]></dc:creator><pubDate>Fri, 30 Oct 2026 13:47:36 GMT</pubDate><content:encoded><![CDATA[<p>To share Cursor rules with a team, commit them to the repository as project rules in <code>.cursor/rules/</code> (or a plain <code>AGENTS.md</code>), and use <strong>Team Rules</strong> from the Cursor dashboard for rules that apply to every repository. Rules are instructions. For what the team has decided and learned, which changes week to week, add a shared ledger over MCP that every teammate's Cursor, and any other agent, reads before a change.</p>
<h2>The four kinds of Cursor rules</h2>
<p>From <a href="https://cursor.com/docs/rules">Cursor's rules docs</a>, checked on 30 October 2026:</p>
<table>
<thead>
<tr>
<th>Kind</th>
<th>Where</th>
<th>Shared with the team?</th>
</tr>
</thead>
<tbody><tr>
<td>Project rules</td>
<td><code>.cursor/rules/*.mdc</code> in the repo</td>
<td>Yes, through git</td>
</tr>
<tr>
<td><code>AGENTS.md</code></td>
<td>The repo root and any subfolder</td>
<td>Yes, through git; Claude Code and Codex read it too</td>
</tr>
<tr>
<td>Team Rules</td>
<td>The Cursor dashboard (Team and Enterprise plans)</td>
<td>Yes, every repository; admins can enforce them</td>
</tr>
<tr>
<td>User Rules</td>
<td>Your Cursor settings</td>
<td>No, only you</td>
</tr>
</tbody></table>
<p>When rules disagree, Team Rules come first, then project rules, then user rules.</p>
<h2>A project rule the whole team gets</h2>
<p>Project rules must use the <code>.mdc</code> extension; a plain <code>.md</code> file in <code>.cursor/rules</code> is ignored. The front matter decides when a rule applies:</p>
<pre><code class="language-markdown">---
description: Conventions for the checkout service
globs: src/checkout/**/*.ts
alwaysApply: false
---
- Validate every request body with zod at the route.
- Prices are integers in cents; never use floats for money.
- Read @src/checkout/README.md before changing the payment flow.
</code></pre>
<ul>
<li><code>alwaysApply: true</code>: in every chat.</li>
<li><code>globs</code> only: when a matching file is in context.</li>
<li><code>description</code> only: when the agent judges it relevant.</li>
<li>Neither: only when someone @-mentions the rule.</li>
</ul>
<h2>If your team doesn't all use Cursor</h2>
<p><code>.cursor/rules</code> is read only by Cursor. If some of the team use Claude Code, Codex or another agent, put the shared rules in <code>AGENTS.md</code>: Cursor reads it (including nested ones in subfolders), Codex reads it, and Claude Code reads it when the repository has no <code>CLAUDE.md</code>. Keep Cursor-specific, file-scoped rules in <code>.cursor/rules</code>.</p>
<h2>What rules don't do well</h2>
<p>Rules are static text that someone has to edit. They're a poor fit for:</p>
<ul>
<li><strong>Why a decision was made.</strong> The rule says "no captcha on checkout"; the reason, and the numbers behind it, don't fit in a rule.</li>
<li><strong>What was tried and reverted.</strong> Writing every lesson into a rule makes it long and less likely to be followed.</li>
<li><strong>Work in progress.</strong> Which tasks are open, and which agent has taken one.</li>
<li><strong>Things learned today.</strong> A teammate's agent finds out the staging database is read-only; until someone edits a rule, nobody else's agent knows.</li>
</ul>
<h2>Add a shared ledger to every teammate's Cursor</h2>
<p>RepoMemory is an MCP server with one ledger per project. On the Team plan, every key on the account reads and writes the same ledgers. Add it to the project's <code>.cursor/mcp.json</code>, with each person's key coming from their own environment so no key is committed:</p>
<pre><code class="language-json">{
  "mcpServers": {
    "repomemory": {
      "url": "https://api.repomemory.dev/mcp",
      "headers": {
        "X-API-Key": "${env:REPOMEMORY_KEY}"
      }
    }
  }
}
</code></pre>
<p>Cursor fills in <code>${env:NAME}</code> in <code>url</code> and <code>headers</code> from the environment. Then add an always-applied rule, <code>.cursor/rules/project-memory.mdc</code>:</p>
<pre><code class="language-markdown">---
alwaysApply: true
---
## Project memory (RepoMemory, project "acme/shop")
- At the start of a session, call `brief` for the project: it returns every guardrail, the open tasks and the latest decisions. Never break a guardrail. If a guardrail contradicts the repository's rules or what you were asked, don't pick one quietly: say so and ask.
- Before planning a change, removing code that looks unneeded or retrying an approach, call `recall` with words about the change. Follow what it returns.
- When a change is reverted, a fix took real digging, or you choose one approach over another, call `record_entry` (kind lesson or decision) saying what happened, why, and what to do instead, with your name in `agent`.
</code></pre>
<p>Now a lesson one teammate's agent records reaches everyone's next session, and a rule nobody should break can be a guardrail, which <code>brief</code> hands every agent at the start of a session.</p>
<h2>When a guardrail and a rule disagree</h2>
<p>RepoMemory doesn't read your rules, so <code>brief</code> can't spot a clash. The agent sees both; ledger entries come back as notes the user's instructions outrank. The rule above has the agent name the clash and ask; a person then edits the rule or supersedes the guardrail.</p>
<h2>Limits to know</h2>
<p>RepoMemory's recall matches words, not meaning, so agents should recall with the words of the change ("captcha checkout"). It's hosted only. The Team plan is $50 a month for 20,000 new entries; recall is free. See <a href="https://repomemory.dev/pricing">pricing</a> and the <a href="https://repomemory.dev/docs#mcp">docs</a>.</p>
<hr />
<p><em>First published on <a href="https://repomemory.dev/guides/cursor-rules-for-teams">repomemory.dev</a>. I build RepoMemory, so weigh my take on it accordingly.</em></p>
]]></content:encoded></item><item><title><![CDATA[CLAUDE.md vs shared memory for coding agents]]></title><description><![CDATA[CLAUDE.md is instructions loaded into every session; shared memory is history an agent searches when it needs it. When to use each.]]></description><link>https://repomemory.hashnode.dev/claude-md-vs-shared-memory-for-coding-agents</link><guid isPermaLink="true">https://repomemory.hashnode.dev/claude-md-vs-shared-memory-for-coding-agents</guid><dc:creator><![CDATA[dimaino]]></dc:creator><pubDate>Fri, 30 Oct 2026 13:45:26 GMT</pubDate><content:encoded><![CDATA[<p>Put instructions in <strong><code>CLAUDE.md</code></strong> and history in <strong>shared memory</strong>. <code>CLAUDE.md</code> (or <code>AGENTS.md</code>) is loaded in full into every session, so it should hold short, stable rules: how to build, conventions, where things live. Shared memory is searched when it's needed, so it can hold the long tail: why a decision was made, what was reverted, which tasks are open. Most projects need both, and the <code>CLAUDE.md</code> is where you tell agents to use the memory.</p>
<h2>The difference in one table</h2>
<table>
<thead>
<tr>
<th></th>
<th><code>CLAUDE.md</code> / <code>AGENTS.md</code></th>
<th>Shared memory (a ledger over MCP)</th>
</tr>
</thead>
<tbody><tr>
<td>What it holds</td>
<td>Instructions</td>
<td>Decisions, lessons, guardrails, notes, tasks</td>
</tr>
<tr>
<td>How the agent gets it</td>
<td>Loaded whole at session start</td>
<td><code>brief</code> at session start, <code>recall</code> with words about the change</td>
</tr>
<tr>
<td>Size it works at</td>
<td>Short: Anthropic suggests under 200 lines per file</td>
<td>Hundreds of entries; only matching ones come back</td>
</tr>
<tr>
<td>Who writes it</td>
<td>People, in commits</td>
<td>Agents and people, as they work</td>
</tr>
<tr>
<td>When something changes</td>
<td>Someone edits the line</td>
<td>A new entry supersedes the old one, which is retired</td>
</tr>
<tr>
<td>Who reads it</td>
<td>Whoever has the repository checked out</td>
<td>Every agent and person with a key to the project, in any client</td>
</tr>
<tr>
<td>Versioned</td>
<td>In git, with the code</td>
<td>In the ledger, with the author and date of each entry</td>
</tr>
</tbody></table>
<p>The <code>CLAUDE.md</code> column is from <a href="https://code.claude.com/docs/en/memory">Anthropic's memory docs</a>, checked on 30 October 2026.</p>
<h2>What belongs in <code>CLAUDE.md</code></h2>
<p>Things that are true in every session and short to state:</p>
<pre><code class="language-markdown">## Build
- `npm test` before committing; `npm run lint -- --fix` for style.
## Layout
- API handlers in src/api/handlers/, one file per route.
## Project memory (RepoMemory, project "acme/shop")
- At the start of a session, call `brief` for the project. Never break a guardrail.
- Before planning a change, call `recall` with words about the change.
- When a change is reverted or you choose one approach over another, call `record_entry`.
</code></pre>
<p>If a line only matters when someone touches one part of the code, it's a candidate for a path-scoped rule (<code>.claude/rules/</code> in Claude Code, <code>.cursor/rules/</code> in Cursor) or for the ledger.</p>
<h2>What belongs in shared memory</h2>
<p>Things that matter for one change, and stories that explain a rule:</p>
<ul>
<li><strong>Lesson:</strong> "Captcha on checkout cut completed orders 5%. Reverted after two weeks; bots only spike on release days."</li>
<li><strong>Decision:</strong> "Chose Postgres full-text search over embeddings: same query, same results, no model to run."</li>
<li><strong>Guardrail:</strong> "Never run migrations on deploy; the release job runs them first." <code>brief</code> returns every guardrail at the start of a session, so rules like this don't depend on a search matching them.</li>
<li><strong>Task:</strong> "Move image uploads to R2", which an agent claims before starting so no other agent starts the same job.</li>
</ul>
<p>Here's a lesson being recorded, as an agent would through the <code>record_entry</code> tool:</p>
<pre><code class="language-bash">curl -s https://api.repomemory.dev/v1/record \
  -H "X-API-Key: $REPOMEMORY_KEY" -H "Content-Type: application/json" \
  -d '{"project":"acme/shop","kind":"lesson",
       "title":"Captcha on checkout cut completed orders 5%",
       "body":"Shipped a captcha on the checkout page in March and reverted it after two weeks: completed orders fell 5%. Bots only spike on release days.",
       "tags":["checkout","captcha"],"agent":"claude-code"}'
</code></pre>
<p>Six months later, an agent asked to "add a captcha to checkout" recalls with those words and finds it before writing any code.</p>
<h2>Signs you've put something in the wrong place</h2>
<ul>
<li>Your <code>CLAUDE.md</code> has a "history" or "don't do X again" section that keeps growing. Move the stories to the ledger and leave one-line rules.</li>
<li>Agents repeat a reverted change. The lesson was in a PR description or a chat nobody's agent reads.</li>
<li>Two lines in <code>CLAUDE.md</code> contradict each other because a decision changed. In a ledger, recording the new decision with <code>supersedes</code> retires the old one.</li>
<li>A rule is ignored by Cursor or Codex because it lives in Claude Code's machine-local auto memory.</li>
</ul>
<h2>Set it up</h2>
<p>Create a free key on the <a href="https://repomemory.dev/dashboard/keys">API keys</a> page, then in the repository:</p>
<pre><code class="language-bash">export REPOMEMORY_KEY=sk_live_...
npx @plexsicity/repomemory init
</code></pre>
<p>It adds the MCP server to Claude Code and Cursor and writes the project-memory section into <code>AGENTS.md</code> or <code>CLAUDE.md</code>. The <a href="https://repomemory.dev/docs#mcp">docs</a> show the setup for Codex, VS Code and Claude.ai.</p>
<hr />
<p><em>First published on <a href="https://repomemory.dev/guides/claude-md-vs-shared-memory">repomemory.dev</a>. I build RepoMemory, so weigh my take on it accordingly.</em></p>
]]></content:encoded></item><item><title><![CDATA[How to give Claude Code memory between sessions]]></title><description><![CDATA[Claude Code starts every session fresh. What CLAUDE.md and auto memory carry over, where they stop, and how to add a shared project ledger.]]></description><link>https://repomemory.hashnode.dev/how-to-give-claude-code-memory-between-sessions</link><guid isPermaLink="true">https://repomemory.hashnode.dev/how-to-give-claude-code-memory-between-sessions</guid><dc:creator><![CDATA[dimaino]]></dc:creator><pubDate>Fri, 30 Oct 2026 13:42:28 GMT</pubDate><content:encoded><![CDATA[<p>Claude Code doesn't remember your last session: each one starts with a fresh context window. Three things carry knowledge over. <strong>CLAUDE.md</strong> holds the instructions you write. <strong>Auto memory</strong> holds notes Claude writes for itself on your machine. A <strong>shared ledger</strong> over MCP, such as RepoMemory, holds the decisions, lessons and tasks that every agent and teammate on the project should see. Use the first two for how to work in the repository, and the third for what has happened in it.</p>
<h2>What Claude Code carries over by itself</h2>
<p><a href="https://code.claude.com/docs/en/memory">Anthropic's memory docs</a> (checked on 30 October 2026) describe two mechanisms, both loaded at the start of every session:</p>
<table>
<thead>
<tr>
<th></th>
<th>CLAUDE.md</th>
<th>Auto memory</th>
</tr>
</thead>
<tbody><tr>
<td>Who writes it</td>
<td>You</td>
<td>Claude</td>
</tr>
<tr>
<td>Where it lives</td>
<td><code>./CLAUDE.md</code> in the repo, <code>~/.claude/CLAUDE.md</code> for you, or an organisation-wide file</td>
<td><code>~/.claude/projects/&lt;project&gt;/memory/</code></td>
</tr>
<tr>
<td>Shared with</td>
<td>The team, through git</td>
<td>Nobody: it is machine-local</td>
</tr>
<tr>
<td>Loaded</td>
<td>Every session, in full</td>
<td>The first 200 lines or 25 KB of <code>MEMORY.md</code></td>
</tr>
<tr>
<td>Good for</td>
<td>Build commands, conventions, layout, "always do X"</td>
<td>Your preferences and the corrections you gave Claude</td>
</tr>
</tbody></table>
<p>Both are context, not enforced rules. The docs suggest keeping each CLAUDE.md under about 200 lines, because longer files cost context and are followed less reliably.</p>
<h2>Where they stop</h2>
<ul>
<li><strong>Auto memory stays on one machine.</strong> It isn't shared across machines, cloud sessions or teammates. A lesson Claude learned on your laptop doesn't reach the CI agent or a colleague's Cursor.</li>
<li><strong>CLAUDE.md is for rules, not history.</strong> "We reverted the checkout captcha because orders fell 5%" is worth knowing before anyone touches checkout, but a file loaded whole into every session can't hold every such story without growing past the size where it is followed.</li>
<li><strong>Nothing is retired.</strong> When a decision changes, someone has to find and edit the old line, or the file says both things.</li>
<li><strong>Only Claude Code reads auto memory.</strong> Codex, Cursor and other agents working on the same repository don't see it.</li>
</ul>
<h2>Add a shared ledger over MCP</h2>
<p>RepoMemory is an MCP server that keeps a project's decisions, lessons, guardrails, notes and tasks. Claude Code calls <code>brief</code> at the start of a session, <code>recall</code> before a change, and <code>record_entry</code> when something is worth keeping. Recall searches, so only the entries about the change at hand come back, and the ledger can grow without filling the context.</p>
<ol>
<li><p>Create a free key on the <a href="https://repomemory.dev/dashboard/keys">API keys</a> page and add the server:</p>
<pre><code class="language-bash">claude mcp add --transport http repomemory https://api.repomemory.dev/mcp \
  --header "X-API-Key: $REPOMEMORY_KEY"
</code></pre>
</li>
<li><p>Add this to the repository's <code>CLAUDE.md</code> or <code>AGENTS.md</code>, so every session knows the project's ledger and when to use it:</p>
<pre><code class="language-markdown">## Project memory (RepoMemory, project "acme/shop")
- At the start of a session, call `brief` for the project: it returns every guardrail, the open tasks and the latest decisions. Never break a guardrail.
- Before planning a change, removing code that looks unneeded or retrying an approach, call `recall` with words about the change. Follow what it returns.
- When a change is reverted, a fix took real digging, or you choose one approach over another, call `record_entry` (kind lesson or decision) saying what happened, why, and what to do instead, with your name in `agent`.
</code></pre>
</li>
<li><p>Or do both at once in the repository with the command line tool (Node.js 22 or newer):</p>
<pre><code class="language-bash">export REPOMEMORY_KEY=sk_live_...
npx @plexsicity/repomemory init
</code></pre>
</li>
</ol>
<p>The next session starts with a call like this one, made for you by Claude:</p>
<pre><code class="language-bash">curl -s https://api.repomemory.dev/v1/brief \
  -H "X-API-Key: $REPOMEMORY_KEY" -H "Content-Type: application/json" \
  -d '{"project":"acme/shop"}'
</code></pre>
<p>It returns every active guardrail in full, the open tasks and the newest decisions and lessons, so the session begins where the last one stopped.</p>
<h2>What to keep where</h2>
<ul>
<li><strong>CLAUDE.md:</strong> how to build and test, conventions, the project's ledger name.</li>
<li><strong>Auto memory:</strong> your own preferences, which nobody else needs.</li>
<li><strong>The ledger:</strong> why something is the way it is, what was tried and reverted, rules nobody should break, and tasks other agents may pick up.</li>
</ul>
<h2>Limits to know</h2>
<p>Recall matches words, not meaning: "captcha checkout" finds a lesson titled "Captcha on checkout", while "why did orders drop" may not. Agents only record what they are told to, which is what the CLAUDE.md lines are for. RepoMemory is hosted only. The free plan allows 300 new entries a month; recall, claims and retires are free. See <a href="https://repomemory.dev/pricing">pricing</a> and the <a href="https://repomemory.dev/docs">docs</a> for other clients.</p>
<hr />
<p><em>First published on <a href="https://repomemory.dev/guides/claude-code-memory-between-sessions">repomemory.dev</a>. I build RepoMemory, so weigh my take on it accordingly.</em></p>
]]></content:encoded></item><item><title><![CDATA[How to stop AI coding agents repeating reverted changes]]></title><description><![CDATA[Agents redo changes you already reverted because the reason lives in a PR or a chat. Record it as a lesson they recall before the next change.]]></description><link>https://repomemory.hashnode.dev/how-to-stop-ai-coding-agents-repeating-reverted-changes</link><guid isPermaLink="true">https://repomemory.hashnode.dev/how-to-stop-ai-coding-agents-repeating-reverted-changes</guid><category><![CDATA[AI]]></category><dc:creator><![CDATA[dimaino]]></dc:creator><pubDate>Fri, 30 Oct 2026 13:39:17 GMT</pubDate><content:encoded><![CDATA[<p>AI coding agents repeat reverted changes because the reason for the revert isn't anywhere they look. The code shows only what is there now, not what was tried and taken out. To stop it, write the reason down as a lesson where every agent checks before a change, and tell agents to check. With RepoMemory, that means a <code>record_entry</code> when the change is reverted, a <code>recall</code> before the next change, and three lines in AGENTS.md or CLAUDE.md.</p>
<h2>Why it happens</h2>
<p>Say someone added a captcha to checkout in March, and completed orders fell 5%, so it was reverted. In October someone asks an agent to "stop bots on checkout". The agent sees a checkout with no captcha and adds one. The lesson is still around, but the agent doesn't see it:</p>
<ul>
<li>the revert commit says "Revert 'Add captcha'", with no reason;</li>
<li>the reason is in a PR comment, a Slack thread or someone's head;</li>
<li>a "don't add a captcha" line in CLAUDE.md might be there, but a file that collects every such story stops being followed once it's long.</li>
</ul>
<h2>Record the lesson when you revert</h2>
<p>The agent that does the revert, or you, records what happened and what to do instead:</p>
<pre><code class="language-bash">curl -s https://api.repomemory.dev/v1/record \
  -H "X-API-Key: $REPOMEMORY_KEY" -H "Content-Type: application/json" \
  -d '{"project":"acme/shop","kind":"lesson",
       "title":"Captcha on checkout cut completed orders 5%",
       "body":"Shipped a captcha on the checkout page in March and reverted it after two weeks: completed orders fell 5%. Bots only spike on release days.",
       "tags":["checkout","captcha"],"agent":"claude-code"}'
</code></pre>
<p>Put the words someone would use for the change in the title and tags ("captcha", "checkout"). Recall matches words, so a title in the change's own words is what makes it findable.</p>
<h2>Recall before the next change</h2>
<p>Before planning, the agent searches with words about the change:</p>
<pre><code class="language-bash">curl -s https://api.repomemory.dev/v1/recall \
  -H "X-API-Key: $REPOMEMORY_KEY" -H "Content-Type: application/json" \
  -d '{"project":"acme/shop","query":"add a captcha to checkout"}'
</code></pre>
<p>The lesson comes back, and the agent can propose rate limiting on release days instead. Recall is free and unmetered on every plan, so agents can do it before every change.</p>
<h2>Make it automatic</h2>
<p>Agents use the same operations as MCP tools. Connect the server (the <a href="https://repomemory.dev/docs#mcp">docs</a> cover Claude Code, Cursor, Codex, VS Code and Claude.ai) and add this to AGENTS.md or CLAUDE.md:</p>
<pre><code class="language-markdown">## Project memory (RepoMemory, project "acme/shop")
- At the start of a session, call `brief` for the project: it returns every guardrail, the open tasks and the latest decisions. Never break a guardrail.
- Before planning a change, removing code that looks unneeded or retrying an approach, call `recall` with words about the change. Follow what it returns.
- When a change is reverted, a fix took real digging, or you choose one approach over another, call `record_entry` (kind lesson or decision) saying what happened, why, and what to do instead, with your name in `agent`.
</code></pre>
<p>"Removing code that looks unneeded" is in there on purpose: agents also undo fixes by tidying away a line that looks pointless. A lesson recorded when the line was added stops that too.</p>
<h2>For rules that must never be broken</h2>
<p>If a lesson has become a rule, record it as a <code>guardrail</code> instead. <code>brief</code> returns every active guardrail at the start of each session, whatever the agent is about to do, so the rule doesn't depend on a search matching it.</p>
<h2>When the lesson stops being true</h2>
<p>If bots are later blocked at the CDN and a captcha is no longer the question, retire the lesson with a reason, or record a new decision with <code>supersedes</code> set to its id. Recall then leaves the old one out, and an agent won't refuse a change the team has agreed to.</p>
<h2>Try it</h2>
<p>The free plan has 300 new entries a month and needs no card. Create a key on the <a href="https://repomemory.dev/dashboard/keys">API keys</a> page, then run <code>npx @plexsicity/repomemory init</code> in the repository.</p>
<hr />
<p><em>First published on <a href="https://repomemory.dev/guides/stop-ai-agents-repeating-reverted-changes">repomemory.dev</a>. I build RepoMemory, so weigh my take on it accordingly.</em></p>
]]></content:encoded></item></channel></rss>