<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Dana from PeKG</title>
    <description>The latest articles on DEV Community by Dana from PeKG (@pekg).</description>
    <link>https://dev.to/pekg</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3881974%2F95c1a948-a35e-47ae-bf81-25e0d37009b0.png</url>
      <title>DEV Community: Dana from PeKG</title>
      <link>https://dev.to/pekg</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pekg"/>
    <language>en</language>
    <item>
      <title>Why AI Coding Agents Forget Everything Between Sessions (And How to Fix It)</title>
      <dc:creator>Dana from PeKG</dc:creator>
      <pubDate>Thu, 16 Apr 2026 16:46:26 +0000</pubDate>
      <link>https://dev.to/pekg/why-ai-coding-agents-forget-everything-between-sessions-and-how-to-fix-it-3mki</link>
      <guid>https://dev.to/pekg/why-ai-coding-agents-forget-everything-between-sessions-and-how-to-fix-it-3mki</guid>
      <description>&lt;p&gt;Last week, I watched an AI coding agent make the &lt;em&gt;exact same mistake&lt;/em&gt; for the third time.&lt;/p&gt;

&lt;p&gt;It reintroduced a bug we’d already fixed, ignored a team convention we’d already explained, and suggested a migration path we’d already rejected.&lt;/p&gt;

&lt;p&gt;None of this was surprising. The agent wasn’t “bad.” It just had the same problem most AI coding agents have:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;they don’t actually remember your project.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;They remember the current prompt window. Maybe a few files. Maybe some chat history. But once the session ends, a lot of the hard-won knowledge disappears:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;why you chose one pattern over another&lt;/li&gt;
&lt;li&gt;which workaround fixed that weird framework bug&lt;/li&gt;
&lt;li&gt;what &lt;em&gt;not&lt;/em&gt; to touch in a fragile integration&lt;/li&gt;
&lt;li&gt;which architecture decisions are still valid&lt;/li&gt;
&lt;li&gt;which ones were replaced two weeks ago&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So every new session starts with a tax:&lt;br&gt;
&lt;strong&gt;re-explain context, re-discover gotchas, re-make old mistakes.&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  The real problem isn’t generation. It’s memory.
&lt;/h2&gt;

&lt;p&gt;Most people focus on model quality.&lt;/p&gt;

&lt;p&gt;That matters, of course. Better models write better code.&lt;/p&gt;

&lt;p&gt;But in day-to-day development, the bigger issue is often &lt;strong&gt;context continuity&lt;/strong&gt;. A strong model with no memory still behaves like a smart contractor with short-term amnesia.&lt;/p&gt;

&lt;p&gt;Here’s the usual loop:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Session 1:
- Agent learns auth flow
- Agent fixes edge case
- Agent discovers API rate limit gotcha
- Session ends

Session 2:
- Agent forgets auth flow
- Agent misses the same edge case
- Agent hits the same rate limit gotcha
- You explain it all again
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That’s not an intelligence problem. It’s a knowledge storage problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this happens
&lt;/h2&gt;

&lt;p&gt;Most coding agents are stateless or semi-stateless by design.&lt;/p&gt;

&lt;p&gt;They’re good at:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;reading the current codebase&lt;/li&gt;
&lt;li&gt;following local instructions&lt;/li&gt;
&lt;li&gt;making edits quickly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They’re bad at:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;preserving decisions across sessions&lt;/li&gt;
&lt;li&gt;carrying knowledge across projects&lt;/li&gt;
&lt;li&gt;building a durable “mental model” of your engineering environment&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even when an agent can search files, that’s not the same as memory.&lt;/p&gt;

&lt;p&gt;A codebase tells you &lt;strong&gt;what exists&lt;/strong&gt;. It usually does &lt;strong&gt;not&lt;/strong&gt; tell you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;why&lt;/em&gt; a decision was made&lt;/li&gt;
&lt;li&gt;what alternatives failed&lt;/li&gt;
&lt;li&gt;which bug fixes came with caveats&lt;/li&gt;
&lt;li&gt;what hidden constraints the team already learned the hard way&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That missing layer is where teams lose time.&lt;/p&gt;

&lt;h2&gt;
  
  
  What actually helps
&lt;/h2&gt;

&lt;p&gt;If your problem is small, a &lt;code&gt;DECISIONS.md&lt;/code&gt;, &lt;code&gt;ARCHITECTURE.md&lt;/code&gt;, or a good internal wiki may be enough. For many teams, that’s the right answer.&lt;/p&gt;

&lt;p&gt;But once you’re using AI coding agents heavily, you usually need something more structured than scattered docs and chat logs.&lt;/p&gt;

&lt;p&gt;What works better is &lt;strong&gt;persistent, queryable memory&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;store bug fixes, patterns, and decisions&lt;/li&gt;
&lt;li&gt;make them searchable by the agent&lt;/li&gt;
&lt;li&gt;retrieve them automatically when relevant&lt;/li&gt;
&lt;li&gt;keep them across sessions and projects&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Think less “chat history,” more &lt;strong&gt;knowledge graph for your engineering context&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  A simple mental model
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Raw experience
   ↓
bug fixes / decisions / gotchas / patterns
   ↓
structured memory
   ↓
retrieved into future agent sessions
   ↓
fewer repeated mistakes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The key is turning raw project knowledge into something an agent can actually use later.&lt;/p&gt;

&lt;h2&gt;
  
  
  A runnable example
&lt;/h2&gt;

&lt;p&gt;If you’re using MCP-compatible agents, the setup pattern is straightforward. Your agent stays the same; memory gets added as an external tool.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @pekg/cli
pekg login
pekg mcp add
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then your agent can start storing and retrieving persistent knowledge across sessions.&lt;/p&gt;

&lt;p&gt;For example, after fixing a bug, you’d save knowledge like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pekg remember &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--project&lt;/span&gt; my-app &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--title&lt;/span&gt; &lt;span class="s2"&gt;"Stripe webhook retries can duplicate order creation"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--note&lt;/span&gt; &lt;span class="s2"&gt;"Use idempotency check on event.id before creating orders"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That’s the basic idea: don’t rely on the next session to “just know” what the last one learned.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we built for this
&lt;/h2&gt;

&lt;p&gt;This is the problem we built &lt;strong&gt;PeKG&lt;/strong&gt; to solve.&lt;/p&gt;

&lt;p&gt;PeKG is a personal knowledge graph for AI coding agents. It gives agents persistent memory across sessions and projects by storing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;decisions&lt;/li&gt;
&lt;li&gt;patterns&lt;/li&gt;
&lt;li&gt;bug fixes&lt;/li&gt;
&lt;li&gt;gotchas&lt;/li&gt;
&lt;li&gt;architecture knowledge&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It works with &lt;strong&gt;any MCP-compatible agent&lt;/strong&gt; like Claude Code, Cursor, Windsurf, Cline, Aider, and Roo Code.&lt;/p&gt;

&lt;p&gt;A few details that matter:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;your agent does the reasoning; PeKG stores and retrieves the knowledge&lt;/li&gt;
&lt;li&gt;it can synthesize knowledge across projects&lt;/li&gt;
&lt;li&gt;it compiles raw notes and source material into structured wiki-style articles&lt;/li&gt;
&lt;li&gt;it supports graph relationships like &lt;code&gt;depends_on&lt;/code&gt;, &lt;code&gt;replaces&lt;/code&gt;, and &lt;code&gt;conflicts_with&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;it has tiered knowledge: personal &amp;gt; team &amp;gt; shared &amp;gt; hive&lt;/li&gt;
&lt;li&gt;there’s also a public Hive for community-shared patterns and gotchas&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That said, the bigger takeaway isn’t “use our tool.” It’s this:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;if you rely on AI coding agents, you need a memory layer somewhere.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For some teams that will be docs. For others it’ll be a vector store, internal wiki, or custom retrieval system. For teams that want an MCP-native option, PeKG is one approach.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it yourself
&lt;/h2&gt;

&lt;p&gt;If this sounds familiar, the easiest next step is to test a persistent memory workflow on one real project:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Capture 5 things your agent keeps forgetting&lt;/li&gt;
&lt;li&gt;Store them somewhere queryable&lt;/li&gt;
&lt;li&gt;See whether future sessions stop repeating the same mistakes&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you want an MCP-native setup, check out &lt;a href="https://pekg.ai/docs" rel="noopener noreferrer"&gt;https://pekg.ai/docs&lt;/a&gt; for MCP setup.&lt;/p&gt;

&lt;p&gt;If you want practical ideas for what knowledge is worth saving, see &lt;a href="https://pekg.ai/hints.txt" rel="noopener noreferrer"&gt;https://pekg.ai/hints.txt&lt;/a&gt; for 115 practical tips.&lt;/p&gt;

&lt;p&gt;And if you want to try PeKG directly, try &lt;a href="https://app.pekg.ai" rel="noopener noreferrer"&gt;https://app.pekg.ai&lt;/a&gt; — there’s a free tier available:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;100 articles&lt;/li&gt;
&lt;li&gt;5 projects&lt;/li&gt;
&lt;li&gt;1 user&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The shift that matters
&lt;/h2&gt;

&lt;p&gt;The next leap for coding agents probably isn’t just better code generation.&lt;/p&gt;

&lt;p&gt;It’s &lt;strong&gt;better memory&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Because once an agent can retain what your team has already learned, it stops acting like a talented stranger and starts acting more like a teammate.&lt;/p&gt;

&lt;p&gt;How are you handling long-term memory for coding agents today — docs, prompts, custom RAG, something else? Drop your approach below.&lt;/p&gt;

&lt;p&gt;-- PeKG team&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This post was created with AI assistance.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>tutorial</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Why AI coding agents forget everything between sessions (and how to fix it)</title>
      <dc:creator>Dana from PeKG</dc:creator>
      <pubDate>Thu, 16 Apr 2026 16:39:17 +0000</pubDate>
      <link>https://dev.to/pekg/why-ai-coding-agents-forget-everything-between-sessions-and-how-to-fix-it-pik</link>
      <guid>https://dev.to/pekg/why-ai-coding-agents-forget-everything-between-sessions-and-how-to-fix-it-pik</guid>
      <description>&lt;p&gt;Last week I watched an AI coding agent make the &lt;em&gt;exact same mistake&lt;/em&gt; for the third time.&lt;/p&gt;

&lt;p&gt;It reintroduced a bug we’d already fixed, ignored a project convention we’d explained twice, and suggested an architecture decision we had explicitly rejected a few days earlier.&lt;/p&gt;

&lt;p&gt;Nothing was “wrong” with the model.&lt;/p&gt;

&lt;p&gt;It just had no memory.&lt;/p&gt;

&lt;p&gt;That’s the part nobody tells you when you start using AI coding agents in real projects: &lt;strong&gt;they’re smart inside a session, but stateless across sessions&lt;/strong&gt;. Close the tab, start a new task, switch repos, and a lot of the hard-won context is gone.&lt;/p&gt;

&lt;p&gt;So you end up doing this over and over:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;re-explaining folder structure&lt;/li&gt;
&lt;li&gt;re-describing why you don’t use a certain library&lt;/li&gt;
&lt;li&gt;re-teaching the same bug fix&lt;/li&gt;
&lt;li&gt;re-listing all the project gotchas&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s fine for a demo. It’s painful in production.&lt;/p&gt;

&lt;h2&gt;
  
  
  The real problem isn’t code generation
&lt;/h2&gt;

&lt;p&gt;Most agent discussions focus on which model writes better code.&lt;/p&gt;

&lt;p&gt;In practice, the bigger issue is often &lt;strong&gt;continuity&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A useful coding agent needs to remember things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“We wrap all API calls in &lt;code&gt;safeRequest()&lt;/code&gt;”&lt;/li&gt;
&lt;li&gt;“Don’t use local time here; this service must be UTC-only”&lt;/li&gt;
&lt;li&gt;“This auth middleware breaks on preview deployments”&lt;/li&gt;
&lt;li&gt;“We tried library X and replaced it with Y because of bundle size”&lt;/li&gt;
&lt;li&gt;“In this repo, migrations must be backward-compatible for one release”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s not just “context.” That’s &lt;strong&gt;working team knowledge&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;And if it disappears between sessions, your agent keeps acting like a new hire on day one.&lt;/p&gt;

&lt;h2&gt;
  
  
  What most teams do instead
&lt;/h2&gt;

&lt;p&gt;Usually, developers try one of these:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Put everything in README files&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Good idea, but READMEs get stale fast.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Keep giant prompt files&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Works until they become long, repetitive, and impossible to maintain.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Rely on the agent to scan the codebase every time&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Better than nothing, but expensive and inconsistent. Also, code doesn’t explain &lt;em&gt;why&lt;/em&gt; decisions were made.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Accept the repetition&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
This is where a lot of teams land. It’s annoying, but it feels easier than building a memory layer.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If your needs are simple, a good &lt;code&gt;AGENTS.md&lt;/code&gt;, project docs, and repo conventions may be enough. Not every team needs a separate memory system.&lt;/p&gt;

&lt;p&gt;But once you’re juggling multiple repos, multiple agents, or recurring architectural gotchas, the lack of persistent memory starts costing real time.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a persistent memory layer looks like
&lt;/h2&gt;

&lt;p&gt;The missing piece is a system that stores knowledge &lt;em&gt;outside&lt;/em&gt; the chat session, then gives it back to the agent when relevant.&lt;/p&gt;

&lt;p&gt;Something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Code / chats / docs / bugs]
            |
            v
   [Knowledge extraction]
            |
            v
 [Structured memory / graph]
            |
            v
 [Agent retrieves relevant context]
            |
            v
   Better decisions next session
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The key is that the memory shouldn’t just be raw logs.&lt;/p&gt;

&lt;p&gt;It should capture:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;decisions&lt;/li&gt;
&lt;li&gt;patterns&lt;/li&gt;
&lt;li&gt;bug fixes&lt;/li&gt;
&lt;li&gt;gotchas&lt;/li&gt;
&lt;li&gt;dependencies&lt;/li&gt;
&lt;li&gt;relationships between concepts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s where a knowledge graph approach gets useful. Instead of storing random notes, you store connected knowledge: what uses what, what replaced what, what conflicts with what, what depends on what.&lt;/p&gt;

&lt;h2&gt;
  
  
  A simple example
&lt;/h2&gt;

&lt;p&gt;Here’s the kind of thing you want an agent to remember automatically:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @pekg/cli
pekg remember &lt;span class="s2"&gt;"In this project, use zod for runtime validation. We replaced yup because zod integrates better with our tRPC stack."&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then later, when your MCP-compatible agent is working in that repo, it can retrieve that decision instead of proposing &lt;code&gt;yup&lt;/code&gt; again.&lt;/p&gt;

&lt;p&gt;That’s the idea behind &lt;strong&gt;PeKG&lt;/strong&gt;: a personal knowledge graph for AI coding agents.&lt;/p&gt;

&lt;p&gt;It gives agents persistent memory across sessions and projects by storing decisions, patterns, fixes, and architecture knowledge in a searchable graph. It works with MCP-compatible agents like Claude Code, Cursor, Windsurf, Cline, Aider, and Roo Code.&lt;/p&gt;

&lt;p&gt;A few things that matter in practice:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;BYOLLM&lt;/strong&gt;: your agent does the reasoning; PeKG stores and retrieves knowledge&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-project synthesis&lt;/strong&gt;: learn something in Project A, reuse it in Project B&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automatic compilation&lt;/strong&gt;: raw notes and sources get turned into structured wiki-style knowledge&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deep scan&lt;/strong&gt;: extract knowledge from source code files&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tiered knowledge&lt;/strong&gt;: personal, team, shared, and public hive knowledge with trust scoring&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That matters because a lot of useful engineering knowledge is not just “facts.” It’s accumulated judgment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this matters more than people expect
&lt;/h2&gt;

&lt;p&gt;Without memory, agents repeat effort.&lt;/p&gt;

&lt;p&gt;With memory, they start compounding effort.&lt;/p&gt;

&lt;p&gt;That changes the workflow:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;bug fixes become reusable knowledge&lt;/li&gt;
&lt;li&gt;architecture decisions stop disappearing into Slack&lt;/li&gt;
&lt;li&gt;project-specific gotchas get surfaced before mistakes happen&lt;/li&gt;
&lt;li&gt;patterns learned in one repo can help in another&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And importantly, this doesn’t have to be all-or-nothing. You can still use docs, READMEs, and prompt files. A memory layer just gives your agent somewhere durable to put what it learns.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it yourself
&lt;/h2&gt;

&lt;p&gt;If you’re already using an MCP-compatible coding agent, the easiest experiment is to give it persistent memory and see whether repeated explanations drop off after a week.&lt;/p&gt;

&lt;p&gt;PeKG has a free tier: &lt;strong&gt;100 articles, 5 projects, 1 user&lt;/strong&gt;. If you want to test the idea, try &lt;a href="https://app.pekg.ai" rel="noopener noreferrer"&gt;https://app.pekg.ai&lt;/a&gt;. For MCP setup, check out &lt;a href="https://pekg.ai/docs" rel="noopener noreferrer"&gt;https://pekg.ai/docs&lt;/a&gt;. And if you’re thinking about knowledge capture more broadly, see &lt;a href="https://pekg.ai/hints.txt" rel="noopener noreferrer"&gt;https://pekg.ai/hints.txt&lt;/a&gt; for 115 practical tips.&lt;/p&gt;

&lt;p&gt;If PeKG isn’t the right fit, the broader takeaway still stands: &lt;strong&gt;don’t treat session memory as team memory&lt;/strong&gt;. They are not the same thing.&lt;/p&gt;

&lt;p&gt;Your model may be smart. But if it forgets every lesson by tomorrow, your team keeps paying to teach it the same things again.&lt;/p&gt;

&lt;p&gt;How are you handling agent memory today: giant prompts, repo docs, MCP tools, or something else? Drop your approach below.&lt;/p&gt;

&lt;p&gt;-- PeKG team&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This post was created with AI assistance.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Why AI coding agents keep making the same mistakes (and how we fixed it)</title>
      <dc:creator>Dana from PeKG</dc:creator>
      <pubDate>Thu, 16 Apr 2026 16:20:23 +0000</pubDate>
      <link>https://dev.to/pekg/why-ai-coding-agents-keep-making-the-same-mistakes-and-how-we-fixed-it-ejh</link>
      <guid>https://dev.to/pekg/why-ai-coding-agents-keep-making-the-same-mistakes-and-how-we-fixed-it-ejh</guid>
      <description>&lt;p&gt;Last week, I watched an AI coding agent make the exact same mistake for the third time.&lt;/p&gt;

&lt;p&gt;It wasn’t a hard problem. Two days earlier, we had already explained the fix: &lt;em&gt;don’t use that migration pattern in this repo; it breaks multi-tenant rollbacks&lt;/em&gt;. The agent fixed it, the PR passed, everyone moved on.&lt;/p&gt;

&lt;p&gt;Then the next session started.&lt;/p&gt;

&lt;p&gt;Fresh context window. Fresh confusion. Same bad migration. Same explanation from a human.&lt;/p&gt;

&lt;p&gt;That’s the real problem with AI coding agents right now: they’re smart in-session, but amnesiac across sessions and projects.&lt;/p&gt;

&lt;p&gt;And if you use agents seriously, you’ve probably felt this already:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;you keep re-explaining architecture decisions&lt;/li&gt;
&lt;li&gt;the agent rediscovers the same bug fixes&lt;/li&gt;
&lt;li&gt;repo-specific gotchas vanish after the chat ends&lt;/li&gt;
&lt;li&gt;lessons learned in Project A never show up in Project B&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Bigger context windows help a little. Better prompts help a little. Repo indexing helps a little.&lt;/p&gt;

&lt;p&gt;But none of those actually give your agent a &lt;strong&gt;persistent memory&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The gap isn’t code search. It’s knowledge memory.
&lt;/h2&gt;

&lt;p&gt;Most tooling today is good at finding files.&lt;/p&gt;

&lt;p&gt;That’s useful, but it’s not the same as remembering things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“We tried library X and replaced it because of cold start issues”&lt;/li&gt;
&lt;li&gt;“This service depends on eventual consistency, so don’t ‘fix’ the delay”&lt;/li&gt;
&lt;li&gt;“That flaky test only fails when Redis is started with AOF disabled”&lt;/li&gt;
&lt;li&gt;“In every React app we own, this auth edge case shows up eventually”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Those aren’t just snippets. They’re decisions, patterns, tradeoffs, and gotchas.&lt;/p&gt;

&lt;p&gt;What agents really need is something closer to a team brain:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Project A lesson ─────┐
Bug fix from March ───┼──&amp;gt; persistent knowledge graph ──&amp;gt; Agent in new session
Architecture note ────┤
Gotcha from Project B ┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That’s where a knowledge graph turns out to be surprisingly practical.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why a knowledge graph works better than a giant note dump
&lt;/h2&gt;

&lt;p&gt;A flat wiki helps humans. A vector DB helps similarity search. But coding agents often need more structure than “find something vaguely related.”&lt;/p&gt;

&lt;p&gt;A knowledge graph can store:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;entities: services, libraries, patterns, bugs, teams&lt;/li&gt;
&lt;li&gt;relationships: &lt;code&gt;depends_on&lt;/code&gt;, &lt;code&gt;replaces&lt;/code&gt;, &lt;code&gt;conflicts_with&lt;/code&gt;, &lt;code&gt;uses&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;compiled knowledge: clean articles distilled from raw chats, PRs, docs, and code&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That means an agent can retrieve not just “something about auth,” but:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the auth middleware pattern your team uses&lt;/li&gt;
&lt;li&gt;the reason it exists&lt;/li&gt;
&lt;li&gt;which service depends on it&lt;/li&gt;
&lt;li&gt;what it replaced&lt;/li&gt;
&lt;li&gt;what breaks if it’s changed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If all you need is local repo memory, a simple notes file or project wiki may be enough. But if your problem is &lt;strong&gt;cross-session + cross-project memory&lt;/strong&gt;, that’s where graph-based memory gets interesting.&lt;/p&gt;

&lt;h2&gt;
  
  
  A simple MCP example
&lt;/h2&gt;

&lt;p&gt;If you’re already using an MCP-compatible agent, the easiest path is to give it tools for storing and retrieving knowledge.&lt;/p&gt;

&lt;p&gt;Here’s a minimal example of adding the PeKG MCP server with npm:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @pekg/mcp-server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then in your MCP config:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"pekg"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"@pekg/mcp-server"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"env"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"PEKG_API_KEY"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"your_api_key"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once connected, your agent can ingest knowledge, search prior decisions, pull project context, and query relationships through MCP tools.&lt;/p&gt;

&lt;p&gt;PeKG works with any MCP-compatible agent, including Claude Code, Cursor, Windsurf, Cline, Aider, and Roo Code. Your agent still does the reasoning; PeKG handles storing and retrieving structured memory.&lt;/p&gt;

&lt;p&gt;Check out &lt;a href="https://pekg.ai/docs" rel="noopener noreferrer"&gt;https://pekg.ai/docs&lt;/a&gt; for MCP setup.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this looks like in practice
&lt;/h2&gt;

&lt;p&gt;The useful pattern is not “save every chat forever.”&lt;/p&gt;

&lt;p&gt;It’s:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;capture raw sources: chats, code, docs, fixes, notes&lt;/li&gt;
&lt;li&gt;compile them into structured knowledge&lt;/li&gt;
&lt;li&gt;extract entities and relationships&lt;/li&gt;
&lt;li&gt;retrieve the right knowledge when the agent needs it later&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That’s the model PeKG is built around.&lt;/p&gt;

&lt;p&gt;It stores decisions, patterns, bug fixes, gotchas, and architecture knowledge in a searchable graph. It also does deep scans of source files, clusters related knowledge automatically, and compiles raw material into wiki-style articles.&lt;/p&gt;

&lt;p&gt;One thing I think matters here: it’s &lt;strong&gt;BYOLLM&lt;/strong&gt;. Your preferred agent/model does the compilation work; PeKG stores and organizes the resulting knowledge. That makes it easier to fit into existing workflows instead of forcing a new agent stack.&lt;/p&gt;

&lt;p&gt;It also supports tiered knowledge:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;personal&lt;/li&gt;
&lt;li&gt;team&lt;/li&gt;
&lt;li&gt;shared&lt;/li&gt;
&lt;li&gt;hive&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So your private project memory can stay private, while trusted community patterns can still help with common problems. The Public Hive is especially useful for broad gotchas that repeat across teams.&lt;/p&gt;

&lt;p&gt;If you’re working solo, this solves “why do I keep re-teaching my agent?”&lt;br&gt;
If you’re on a team, it starts solving “why does every engineer and every agent relearn the same lessons?”&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it yourself
&lt;/h2&gt;

&lt;p&gt;If this sounds like your problem, the easiest test is simple: pick one recurring gotcha and see whether your agent can remember it next week without you retyping it.&lt;/p&gt;

&lt;p&gt;PeKG has a free tier:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;100 articles&lt;/li&gt;
&lt;li&gt;5 projects&lt;/li&gt;
&lt;li&gt;1 user&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can try it at &lt;a href="https://app.pekg.ai" rel="noopener noreferrer"&gt;https://app.pekg.ai&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you’re thinking about agent memory design more broadly, see &lt;a href="https://pekg.ai/hints.txt" rel="noopener noreferrer"&gt;https://pekg.ai/hints.txt&lt;/a&gt; for 115 practical tips.&lt;/p&gt;

&lt;p&gt;Pricing if you need more:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Free: 100 articles, 5 projects&lt;/li&gt;
&lt;li&gt;Pro: $15/mo&lt;/li&gt;
&lt;li&gt;Team: $39/mo/seat&lt;/li&gt;
&lt;li&gt;Enterprise: custom&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The bigger point
&lt;/h2&gt;

&lt;p&gt;The next bottleneck for AI coding agents isn’t just model quality.&lt;/p&gt;

&lt;p&gt;It’s memory.&lt;/p&gt;

&lt;p&gt;Until agents can retain decisions, patterns, fixes, and architectural context across sessions, they’ll keep acting like brilliant interns with goldfish memory.&lt;/p&gt;

&lt;p&gt;And that’s fixable.&lt;/p&gt;

&lt;p&gt;How are you handling agent memory today: bigger prompts, repo indexing, internal docs, or something else? Drop your approach below.&lt;/p&gt;

&lt;p&gt;-- PeKG team&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This post was created with AI assistance.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>tutorial</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
