Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/coco-research/cocoWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/coco-research/coco/persistent-memory)<a href="https://agentmods.dev/rules/coco-research/coco/persistent-memory"><img src="https://agentmods.dev/badge/rules/coco-research/coco/persistent-memory/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/coco-research/coco/persistent-memory"><img src="https://agentmods.dev/badge/rules/coco-research/coco/persistent-memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00942 | $0.00942 |
| Opus 5.5 | $0.00377 | $0.00377 |
| Sonnet 5.5 | $0.00188 | $0.00188 |
| Haiku 4.5 | $0.00094 | $0.00094 |
Grade A, and why
persistent-memory scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 122 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Persistent Memory Protocol
Session Start (CRITICAL)
Before ANY work, read both memory files:
~/.claude/CLAUDE.md— Global memory (cross-project patterns)./CLAUDE.local.md— Local memory (project-specific)
Multi-project workspaces: If the workspace contains multiple project folders, each project should have its own CLAUDE.local.md inside its folder. The workspace root CLAUDE.local.md tracks standalone tasks only. When working on a specific project, read that project's local memory file (e.g., ./ProjectName/CLAUDE.local.md).
If ./CLAUDE.local.md doesn't exist, create it immediately using the Local Memory Template below.
Continuous Local Memory Updates
Update ./CLAUDE.local.md IMMEDIATELY after:
| Trigger | What to Log |
|---|---|
| Code change | File modified, what changed, why |
| New file created | Purpose, location, dependencies |
| Bug fixed | Root cause, solution, prevention |
| Feature added | What it does, where it lives |
| Refactor | What changed, before/after pattern |
| Dependency added | Package name, version, why needed |
| Config change | What setting, old → new value |
| API endpoint | Route, method, purpose |
| Decision made | Choice, alternatives considered, rationale |
Format:
## Recent Changes
- [YYYY-MM-DD HH:MM] `path/to/file.ts` — Added error handling for API timeout
- [YYYY-MM-DD HH:MM] `package.json` — Added [email protected] for HTTP requests
Global Memory Updates
Update ~/.claude/CLAUDE.md when patterns are reusable:
- New tool/skill installed
- Cross-project convention established
- Lesson learned applicable everywhere
- Workflow optimization discovered
Local Memory Template
# Project Memory — {Project Name}
## Overview
- Purpose:
- Stack:
- Started: [YYYY-MM-DD]
## Architecture
- Entry:
- Structure:
## Key Decisions
<!-- Log every significant choice -->
## Recent Changes
<!-- Updated continuously with each code change -->
## Open Questions
<!-- Unresolved items -->
## Commands
- Dev:
- Build:
- Test:
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago Changed · +49 tokens per session 7ca3c0bdbf01
- 3mo ago First seen · 122 lines · 893 tokens per session scan A d910973e5fb2
persistent-memory is a cursor rule published in the GitHub repository coco-research/coco (323 stars, last pushed yesterday), licensed Apache-2.0. It adds 942 tokens to every session, about $0.0038 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
persistent-memory compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| persistent-memorycoco-research/coco | Cursor rule | 323 | yesterday | Apache-2.0 | A | 942 | Cursor |
| context-bankkadiresen/context-bank | Cursor rule | 9 | 1mo ago | MIT | A | 83 | Cursor |
| error-logsordi-ai/skill-everything | Cursor rule | 21 | 6mo ago | MIT | A | 26 | Cursor |
| obsidian-memoryVahlame/create-vkm-kit | Cursor rule | 4 | 29d ago | none | A | 166 | Cursor |
| agent-context-doctordadion123/agent-context-doctor | Cursor rule | 1 | 5mo ago | MIT | A | 48 | Cursor |
| kolorpiecioshka/whose-context-wins | Cursor rule | 2 | 1mo ago | none | A | 26 | Cursor |
| deepinit-leandeepfusionlabs/deep-init | Cursor rule | 6 | 2mo ago | MIT | A | 1,693 | Windsurf |