●WATERMARK — Since 11/16, text from Opus 4.6, Sonnet 4.5 and other models carries a watermark; non-default temperature and similar settings may drop it●CC 2.1.325 — Claude Code is still on 2.1.325 (11/13), with no newer release yet●SONNET 4.5 — Retires on the Claude API on 11/30, 13 days left. Sweep model IDs in code and saved settings in one pass●AUTOMATION — A user reports recurring AI jobs set up without run counts or a spending cap, burning through a weekly allowance●CONNECTOR — If connectors vanish only in new sessions, compare the /mcp list against an older session first●NEW — Cowork Feels Worse? Run the Same Request in Three Fresh Sessions●WATERMARK — Since 11/16, text from Opus 4.6, Sonnet 4.5 and other models carries a watermark; non-default temperature and similar settings may drop it●CC 2.1.325 — Claude Code is still on 2.1.325 (11/13), with no newer release yet●SONNET 4.5 — Retires on the Claude API on 11/30, 13 days left. Sweep model IDs in code and saved settings in one pass●AUTOMATION — A user reports recurring AI jobs set up without run counts or a spending cap, burning through a weekly allowance●CONNECTOR — If connectors vanish only in new sessions, compare the /mcp list against an older session first●NEW — Cowork Feels Worse? Run the Same Request in Three Fresh Sessions
78 Memory Files Outside the Index: Retiring Cowork Project Memory Without Deleting It, and Moving Decisions Into Docs
I had been keeping app-operations decisions in a Cowork project's memory, and 78 files had drifted out of the index. Three scripts (find, retire-and-restore, index lint) and the line I drew between memory and docs.
On September 13 I asked Claude, inside the Cowork project I use to run my wallpaper apps, to help me tidy the project memory. When it compared the memory index (MEMORY.md) with what was actually sitting in the folder, the two did not match at all.
78 memory files could not be reached from the index. I had never deleted any of them on purpose. Each time I "cleaned up", I had only removed the line from the index. I had quietly assumed that a shorter index meant a tidier memory, and that assumption was mine, not the tool's.
What follows is how I retired those files between mid-September and early October, and the three small scripts I keep around now. Every number comes from my own indie developer project. I reran the scripts on a dummy folder with the same layout and checked that the output matches what I describe.
What was left behind
I later copied the full text of the retired files into my app documentation folder as a backup. Recounting that backup (74 files are still readable there) gave this picture:
What I looked at
Count
What it tended to be
A date in the file name
65 of 74
Diagnoses, weekly checks, release plans: work that was finished once it reached a conclusion
Description saying "merged / retired"
5
Files whose content had already moved into another memory, but the file itself was still there
type: project
Most of them
Very few feedback or reference entries; nearly all were snapshots of a situation
Size
Median about 3.3KB, largest about 17.7KB
The largest was a plan that really belonged in a document
The first thing I want to say is that what had piled up was not "things to remember" but records of finished work. A dated diagnosis note mattered on the day I wrote it. Once it reached a conclusion, only the conclusion mattered, and the numbers and back-and-forth did not need to ride along with every new task.
The five stubs made me stop for a moment. When I merged them, I had rewritten their descriptions to say "content moved over there" and dropped them from the index, yet the files stayed in the folder. Removing something from the index and retiring it turned out to be two different jobs.
The mistake: thinking the index was the cleanup
Looking back, every tidy-up I had done amounted to deleting index lines. A shorter index felt like a weight off my shoulders. I never checked how files outside the index were treated afterwards in my setup, and I still have not verified it. Without that check, I had no grounds to say leftover files were harmless either.
There was also a practical wall. At the time, the memory folder was read-only from the session, so Claude could not move the files itself. We split the work: Claude wrote a shell script full of move commands, I read it, and I ran it in Terminal. That split ended up being the arrangement I trusted most.
The line I drew from this is simple.
Decisions live in documents; memory only keeps the way there.
Memory holds one line about what counts as the source of truth, plus the number or section of the canonical document. History, figures and half-formed hypotheses go into the document.
✦
Thank you for reading this far.
Continue Reading
What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.
WHAT YOU'LL LEARN
✦You will be able to spot memory files that fell out of the index, and leftover merged stubs, in one list before stale decisions start leaking into your work
✦You can now tidy project memory with a paired retire script and restore script, without deleting a single file
✦You will be able to decide, for your own project, that decisions live in canonical docs and memory keeps only a one-line summary and a pointer
Secure payment via Stripe · Cancel anytime
✦
Unlock This Article
Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.
Script 1: list memory files outside the index (read-only)
The first script moves nothing. It collects references from the index in both [title](name.md) and [[name]] form, compares them with the .md files in the folder, and flags dated names and descriptions that mention a merge.
#!/usr/bin/env python3"""MEMORY.md の索引に載っていないメモリファイルを洗い出す(読むだけ・何も動かさない)。使い方: python3 memory_orphans.py <memory フォルダ> > orphans.tsv"""import reimport sysfrom pathlib import PathDATE_IN_NAME = re.compile(r"20\d{2}[_-]\d{2}[_-]\d{2}")RETIRED_WORDS = ("統合済み", "退役", "失効", "superseded", "merged into")def indexed_names(index_text: str) -> set[str]: """索引から参照されているファイル名(拡張子なし)を集める。 [タイトル](name.md) と [[name]] の両方を拾う。""" names = set(re.findall(r"\]\(([^)#\s]+?)\.md\)", index_text)) names |= set(re.findall(r"\[\[([^\]|#]+)", index_text)) return {Path(n).name for n in names}def description_of(path: Path) -> str: # フロントマターの description だけを読む。壊れたファイルでも止まらない try: head = path.read_text(encoding="utf-8", errors="replace")[:2000] except OSError as e: return f"(読めません: {e})" m = re.search(r"^description:\s*(.+)$", head, re.M) return m.group(1).strip().strip('"') if m else ""def main() -> int: if len(sys.argv) != 2: print(__doc__, file=sys.stderr) return 2 root = Path(sys.argv[1]) index = root / "MEMORY.md" if not index.is_file(): print(f"MEMORY.md がありません: {index}", file=sys.stderr) return 1 listed = indexed_names(index.read_text(encoding="utf-8")) rows = [] for p in sorted(root.glob("*.md")): if p.name == "MEMORY.md" or p.stem in listed: continue desc = description_of(p) dated = "dated" if DATE_IN_NAME.search(p.stem) else "-" tomb = "tombstone" if any(w in desc for w in RETIRED_WORDS) else "-" rows.append((p.name, dated, tomb, p.stat().st_size, desc[:60])) print("file\tdated\ttombstone\tbytes\tdescription") for r in rows: print("\t".join(map(str, r))) total = len(list(root.glob("*.md"))) - 1 print(f"# 索引外 {len(rows)} 本 / 全 {total} 本" f"(日付つき {sum(r[1] == 'dated' for r in rows)}・" f"統合済みの抜け殻 {sum(r[2] == 'tombstone' for r in rows)})", file=sys.stderr) return 0if __name__ == "__main__": sys.exit(main())
On the dummy folder (three files in the index, three outside), stderr printed # 索引外 3 本 / 全 6 本(日付つき 2・統合済みの抜け殻 1), which reads as "3 of 6 outside the index, 2 dated, 1 merged stub", and the TSV listed three rows. A file name with a space in it was picked up correctly.
I keep it read-only on purpose. I want a moment, every time, where I look at the list and decide what stays. Some dated files were still live decisions, such as my per-format ad policy. Those I took out of memory and kept as policy documents instead.
Script 2: write the retire and restore scripts as a pair
The script Claude wrote for me in September was 78 lines of [ -f name ] && mv name _retired/, with a single comment saying that restoring meant moving the files back. It worked. If I did it again today, I would generate the restore script at the same time.
#!/usr/bin/env python3"""orphans.tsv から「退役スクリプト」と「戻しスクリプト」を書き出す。自分では動かさない。人が中身を読んでから実行する前提。使い方: python3 make_retire_script.py orphans.tsv <memory フォルダの絶対パス> <出力フォルダ>"""import shleximport sysfrom datetime import datefrom pathlib import Pathdef main() -> int: if len(sys.argv) != 4: print(__doc__, file=sys.stderr) return 2 tsv, mem_dir, out_dir = Path(sys.argv[1]), sys.argv[2], Path(sys.argv[3]) names = [line.split("\t", 1)[0] for line in tsv.read_text(encoding="utf-8").splitlines() if line and not line.startswith(("file\t", "#"))] if not names: print("退役候補がありません", file=sys.stderr) return 1 out_dir.mkdir(parents=True, exist_ok=True) stamp = date.today().isoformat() q = shlex.quote(mem_dir) head = ["#!/bin/bash", "set -e", f"cd {q}", "mkdir -p _retired", "n=0"] retire = head + [f"[ -f {shlex.quote(n)} ] && mv -n {shlex.quote(n)} _retired/ && n=$((n+1))" for n in names] retire += ['echo "moved: $n files -> _retired/"', 'ls *.md | wc -l | xargs echo "remaining:"'] restore = head[:3] + ["n=0"] + [ f"[ -f _retired/{shlex.quote(n)} ] && mv -n _retired/{shlex.quote(n)} . && n=$((n+1))" for n in names] restore += ['echo "restored: $n files"'] r = out_dir / f"memory_retire_{stamp}.sh" b = out_dir / f"memory_restore_{stamp}.sh" r.write_text("\n".join(retire) + "\n", encoding="utf-8") b.write_text("\n".join(restore) + "\n", encoding="utf-8") print(f"{len(names)} 本分: {r} / {b}") return 0if __name__ == "__main__": sys.exit(main())
On the dummy folder, the retire script printed moved: 3 files -> _retired/ and remaining: 4 (that count includes MEMORY.md), and the restore script printed restored: 3 files, bringing back the original seven files.
Three choices are worth explaining:
mv -n never overwrites an existing file in _retired/, so a second tidy-up cannot clobber an older backup.
shlex.quote keeps a file name with spaces or symbols from splitting the command.
The [ -f … ] && chain keeps going when a file is already gone and only counts what actually moved.
Moving files aside instead of deleting them means any wrong call can be undone. Knowing that, moving 78 files in one go did not keep me up at night.
Script 3: lint the one-line rule in the index
This one is the watchman that stops memory from swelling again. For each index line it checks the length and whether the line carries a pointer to a canonical source: #123, §3, or a something.md file name.
#!/usr/bin/env python3"""MEMORY.md の1行1件ルールを検査する。長すぎる行と、正本への番号がない行を出す。使い方: python3 index_lint.py MEMORY.md [--max 150]"""import reimport sysPOINTER = re.compile(r"(#\d+|§\s?\d+|\S+\.md\b)") # 番号・節・正本ファイル名のどれかdef main() -> int: args = sys.argv[1:] if not args: print(__doc__, file=sys.stderr) return 2 limit = int(args[args.index("--max") + 1]) if "--max" in args else 150 bad = 0 with open(args[0], encoding="utf-8") as f: for no, line in enumerate(f, 1): line = line.rstrip("\n") if not line.startswith("- "): continue # 見出しや空行は対象外 body = re.sub(r"\]\([^)]*\)", "]", line) # リンク先は字数に数えない problems = [] if len(body) > limit: problems.append(f"{len(body)}字") if not POINTER.search(line): problems.append("正本への番号なし") if problems: bad += 1 print(f"L{no}: {' / '.join(problems)}: {body[:70]}") print(f"# 要確認 {bad} 行", file=sys.stderr) return 1 if bad else 0if __name__ == "__main__": sys.exit(main())
On the dummy index, two lines were reported as missing a pointer: one that was only [[feedback_tone]], and one long line full of history. The exit code was 1. With --max 100, the long line also got a length warning (114 characters).
The exact limit is only a guide. What matters is the nudge it gives me: if it does not fit on one line, it probably was not a memory in the first place.
October: merging, and keeping a one-line conclusion
On October 5, about three weeks after the first pass, I did a second round. This time I picked ten files that were still in the index but had either concluded or duplicated something else.
Seven memories that tracked one release step by step, from preparation to publication, became a single record for that release.
One duplicate describing the same bug under another name was absorbed.
One resolved store-paperwork item was deleted, with only its key points and steps kept in the backup.
Before retiring them, I copied their text into a dated backup folder and wrote three lines in that folder's README about what went where. The backup is not meant to be read. If I need something, I grep it.
I also added three operating rules to the README that indexes my app documentation folder:
Recurring outputs are saved with a date, and the older run of the same kind moves to _archive/ at the next run.
When a diagnosis reaches a conclusion, the document moves to _archive/ and one line with the conclusion is added to the README.
Only live policies and fixed procedures stay at the top level.
The one line left in memory points at that README conclusion or at a numbered entry in my pitfalls document. The canonical source is always the document; memory is just a shortcut to it.
Four things I learned the hard way
Every merge creates a stub. After moving content, send the original file to _retired/ as well. Rewriting its description is not enough; the file stays in the folder.
Dated does not mean disposable. Some dated files were still live policies. Someone has to look at the list and choose.
Some places cannot be changed from the session. In my setup at the time, the memory folder was read-only from the session. Claude writes the commands; I run them. Clear roles, no confusion.
Decide that the backup is not for reading. Once the full text is backed up, it is tempting to read it and pull old context back into memory. If something needs to come back, I rewrite it into a document first.
If you try anything from this, run Script 1 once against your own project's memory folder. It moves nothing. Just seeing how many files sit outside the index, and how many of them are dated or merged stubs, usually makes it clear what should move into a document next.
For me, treating memory as a signpost to the canonical source, rather than a place to keep things, removed one recurring question from every tidy-up: I only have to decide what moves into a document. Decisions in documents, directions in memory — that is the line I intend to keep.
Share
Thank You for Reading
Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.