<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/i-made-my-ai-coding-agent-forget-on-purpose--jmbjoiv2w" -->

---
title: I Made My AI Coding Agent Forget on Purpose. | daily.dev
description: After four months of daily use with Claude Code on a production codebase, an engineer found their agent's persistent memory folder had bloated to 150+ files...
canonical: https://daily.dev/posts/i-made-my-ai-coding-agent-forget-on-purpose--jmbjoiv2w
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: I Made My AI Coding Agent Forget on Purpose. | daily.dev
og:description: After four months of daily use with Claude Code on a production codebase, an engineer found their agent's persistent memory folder had bloated to 150+ files...
og:url: https://daily.dev/posts/i-made-my-ai-coding-agent-forget-on-purpose--jmbjoiv2w
og:image: https://api.daily.dev/og/posts/jmBJOiv2W.png
og:image:alt: I Made My AI Coding Agent Forget on Purpose.
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# I Made My AI Coding Agent Forget on Purpose.

**[Medium](https://daily.dev/sources/medium_js)** · 10 min read · 0 upvotes · 0 comments

## Summary

After four months of daily use with Claude Code on a production codebase, an engineer found their agent's persistent memory folder had bloated to 150+ files and 127,000 words, causing stale status notes, revived disproven theories, and confusion between abandoned and active work. Roughly a quarter of memory entries were dead ends (fixed, refuted, deferred, rejected). Since consolidation only tidies but never deletes, the author built /forget, an open-source Claude Code skill that lets a human name a dead effort, review affected files, and move them to a trash folder with a full undo manifest, ensuring nothing is silently deleted. The skill was tested through planted-trap sandboxes, byte-for-byte restore checks, adversarial reviewer agents, and crucially a 'cold test' with a fresh agent that caught a flaw a 'warm' tester missed.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://generativeai.pub/i-made-my-ai-coding-agent-forget-on-purpose-33af6b7b2421>

## Questions this post answers

### Why does Claude Code's persistent memory cause problems over long-term use on a project?

Stale memory entries keep sounding true after they stop being true, so the agent trusts outdated status notes, almost re-fixes bugs that were already closed, and treats abandoned approaches as active work. Over four months of daily use on one production codebase, memory grew to 150+ files and about 127,000 words, with roughly a quarter of entries being dead ends like fixed, refuted, deferred, or rejected work.

_Developers wrestling with bloated agent memory can compare fixes like this on daily.dev._

### How does the /forget skill for Claude Code let you delete stale agent memory safely?

You name a dead effort, and the skill searches project memory via index, keyword variants, and direct reading, then shows a list of files that fully match, partially mention it, or need a warning tag before you confirm once. Whole-match files move to a .trash folder rather than being deleted, and every cut line from surviving files is copied word-for-word into a manifest first so any forget action can be fully undone.

_Anyone building safer memory-management skills for coding agents can track approaches like this via daily.dev._

### How do you test an AI agent skill that is just a prompt with no code to unit test?

Testing relied on four layers: a sandbox with planted trap files to catch wrong deletions, a strict round-trip test that restores everything from the trash manifest and compares files byte-for-byte to the original, adversarial reviewer agents told to distrust the builder's claims, and a decisive cold test where a fresh agent with no context on the skill's construction had to follow the instructions unaided.

_Teams designing testable prompt-based agent skills can find similar practices on daily.dev._

## Similar posts on daily.dev

- [AI Agent Memory: Why Agents Forget and How to Fix It in 2026](https://daily.dev/posts/ai-agent-memory-why-agents-forget-and-how-to-fix-it-in-2026-t3vsrqsah) · Alex CloudStar · 0 upvotes · 0 comments
- [Your AI Coding Tool Has Amnesia](https://daily.dev/posts/your-ai-coding-tool-has-amnesia-tl4nqc3zj) · SD Times · 1 upvotes · 0 comments
- [Your AI’s Most Dangerous Memory Is Something That Used to Be True](https://daily.dev/posts/your-ai-s-most-dangerous-memory-is-something-that-used-to-be-true-djguunt0k) · Medium · 1 upvotes · 0 comments
- [Audit your Agent files](https://daily.dev/posts/audit-your-agent-files-5pwynuy9w) · Addy Osmani · 9 upvotes · 0 comments

---

Tags: [#open-source](https://daily.dev/tags/open-source), [#ai-agents](https://daily.dev/tags/ai-agents), [#claude-code](https://daily.dev/tags/claude-code), [#context-engineering](https://daily.dev/tags/context-engineering)

[View this post on daily.dev](https://daily.dev/posts/i-made-my-ai-coding-agent-forget-on-purpose--jmbjoiv2w)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"I Made My AI Coding Agent Forget on Purpose.","url":"https://daily.dev/posts/i-made-my-ai-coding-agent-forget-on-purpose--jmbjoiv2w","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/i-made-my-ai-coding-agent-forget-on-purpose--jmbjoiv2w"},"datePublished":"2026-08-15T05:42:46.381Z","dateModified":"2026-09-13T19:19:20.095Z","description":"After four months of daily use with Claude Code on a production codebase, an engineer found their agent's persistent memory folder had bloated to 150+ files...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/e4c41ac30a706b007b51ce23cac38ac2?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/e4c41ac30a706b007b51ce23cac38ac2?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Medium","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Medium","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/medium","url":"https://daily.dev/sources/medium_js"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/i-made-my-ai-coding-agent-forget-on-purpose--jmbjoiv2w","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"open-source,ai-agents,claude-code,context-engineering","timeRequired":"PT10M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Medium","item":"https://daily.dev/sources/medium_js"},{"@type":"ListItem","position":3,"name":"I Made My AI Coding Agent Forget on Purpose."}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/i-made-my-ai-coding-agent-forget-on-purpose--jmbjoiv2w#faq","mainEntity":[{"@type":"Question","name":"Why does Claude Code's persistent memory cause problems over long-term use on a project?","acceptedAnswer":{"@type":"Answer","text":"Stale memory entries keep sounding true after they stop being true, so the agent trusts outdated status notes, almost re-fixes bugs that were already closed, and treats abandoned approaches as active work. Over four months of daily use on one production codebase, memory grew to 150+ files and about 127,000 words, with roughly a quarter of entries being dead ends like fixed, refuted, deferred, or rejected work. Developers wrestling with bloated agent memory can compare fixes like this on daily.dev."}},{"@type":"Question","name":"How does the /forget skill for Claude Code let you delete stale agent memory safely?","acceptedAnswer":{"@type":"Answer","text":"You name a dead effort, and the skill searches project memory via index, keyword variants, and direct reading, then shows a list of files that fully match, partially mention it, or need a warning tag before you confirm once. Whole-match files move to a .trash folder rather than being deleted, and every cut line from surviving files is copied word-for-word into a manifest first so any forget action can be fully undone. Anyone building safer memory-management skills for coding agents can track approaches like this via daily.dev."}},{"@type":"Question","name":"How do you test an AI agent skill that is just a prompt with no code to unit test?","acceptedAnswer":{"@type":"Answer","text":"Testing relied on four layers: a sandbox with planted trap files to catch wrong deletions, a strict round-trip test that restores everything from the trash manifest and compares files byte-for-byte to the original, adversarial reviewer agents told to distrust the builder's claims, and a decisive cold test where a fresh agent with no context on the skill's construction had to follow the instructions unaided. Teams designing testable prompt-based agent skills can find similar practices on daily.dev."}}]}
```

