Switch to a fresh Claude chat without losing a single rule, correction or number.
You're 40 messages into a project. Claude starts forgetting a rule you gave at the start, brings back a mistake you already fixed, or uses an old price. The fix is a fresh chat, but a fresh chat knows nothing, and asking Claude to "summarize this chat" loses exactly the things that matter.
active-memory solves that with one command: /amhandoff. It writes a handoff file so complete that a brand-new chat continues at full quality from its very first reply. New in 0.3: /amsave packs the whole chat, with every file it used, under a number, and /amload 7 brings it all back in a new chat. Two small helpers tell you when it's time to switch.
A plain summary mostly remembers the recent messages. What gets lost is what hurts most:
- a rule you gave once, at the very start ("prices always with two decimals")
- the mistakes you already corrected, so Claude repeats them
- ideas you rejected, so Claude suggests them again
- exact numbers: "$18.00" quietly becomes "about $20"
It follows the same four passes every time:
- Read everything, from the first message to the last, against a fixed checklist.
- Sort it out: the latest decision wins, and older ones are listed as changed. If two things truly conflict, it asks you before writing.
- Look for gaps: "What would a brand-new chat still need to ask?"
- Double-check: every rule and correction included, every number exact, passwords removed.
Always the same 15 sections, so a new chat knows exactly where to look:
| # | Section | # | Section |
|---|---|---|---|
| 0 | Instructions for the new chat | 7 | Changed / rejected |
| 1 | Mission | 8 | Data & facts (exact) |
| 2 | About you | 9 | People, terms & names |
| 3 | Style & communication | 10 | Work state |
| 4 | Rules (word for word) | 11 | Next steps |
| 5 | Corrections (mistakes not to repeat) | 12 | Open questions |
| 6 | Decisions | 13 | Files to attach again |
| 14 | Claude setup (role, mindset, settings) |
π See a full example (a made-up project): examples/sample-handoff.md
A made-up example, the planning chat behind the sample file. The chat never settled one price, so /amhandoff asks before writing:
You: /amhandoff
Claude: Yes Boss! One thing to settle before I write the file:
- Holiday surcharge: 20% (said first) or 25% (said later)? a) 20%, b) 25%, c) skip, flag it in the file
You: c
Claude: Yes Boss! Handoff #1 written:
handoff.md. 13/13 sections, 6 rules, 4 corrections, secrets removed. Attach it to a new chat and send continue.
In the new chat, with only the file attached:
You: continue
Claude: Yes Boss! Goal: a booking page for Sunny Paws (
sunny-paws-booking.html). State: every pricing and layout rule is agreed, no code written yet (your rule). Next: confirm the holiday surcharge (20% or 25%) with Priya. Open questions: does the 30-minute minimum apply to 60-minute walks, and can customers book several dates at once? Ready to continue with the holiday surcharge?
In the new chat: attach the file and send continue. Claude replies with a short summary of the goal, where you are and the next step, then waits for your go.
Long projects: run /amhandoff in a chat that started from a handoff file and it updates that file (Handoff #2, #3β¦) instead of starting over, so nothing from earlier chats is lost.
We ran a 24-message planning chat with 28 details hidden in it: prices, rules given only once, two corrections, a rejected idea, a renamed file, an undecided price and a password. The handoff file kept all 28, removed the password, and listed the undecided price as an open question. A brand-new chat, given only the file, then answered 4 check questions about those details correctly (a rule given once, a rejected idea, a price calculation and a styling rule).
Release gate (tests/release_eval.py, run before every release): the same kind of made-up 24-message chat is saved with /amsave and loaded in a fresh session with /amload. A release ships only at 28/28 details, password removed, every file verified.
/amhandoff gives you a file. /amsave goes further: it builds a pack with the handoff file, a MANIFEST.md, every file the chat read, wrote or attached (any type, including Word, PDF and images) and the full transcript, then answers:
β
Saved as pack 7: Sunny Paws booking page
In a new chat, type: /amload 7
In the new chat, /amload 7 loads the pack, checks every file ("12 of 12 verified") and waits for your go. /amload alone lists your packs.
One pack for a whole project. When the new chat gets long too, type /amsave 7. Pack 7 is updated instead of a new one being made: the handoff merges both chats and every chat's files and transcript are kept.
| Where you work | Where packs are kept | What the new chat needs |
|---|---|---|
| Claude Code | ~/.claude/active-memory/packs/ |
Nothing |
| Desktop app with a connected folder | .active-memory/packs/ in that folder |
The same folder connected |
| A claude.ai Project (cloud chats) | Inside the Project, automatically. Word, PDF and images go to a connected folder or a zip, because Projects hold text only | Open the new chat in the same Project |
| Anything else | A pack-7.zip download |
Attach the zip |
| Check | What it guarantees |
|---|---|
| Collect (script) | Every file the chat used is copied into the pack. Nothing depends on Claude remembering to copy it. |
| Fingerprints (script) | Every file gets a checksum. /amload rechecks them and names anything missing or changed. |
| Recall (script) | Every number, price, file name, URL, color and quoted rule you typed is checked against the handoff. Anything missing must be added before the save counts. |
| Self-quiz | Claude answers 10 questions about the chat using only the handoff, and fixes every miss. |
| Token budget | The handoff stays under 1,600 words. Full detail lives in the pack and is opened only when needed, so the new chat starts light. |
Some rules must hold at message 80 exactly like at message 5. Pin them:
/amrules prices always in USD with two decimals
/amrules never use red anywhere
Pinned rules are re-sent to Claude with every message (in Claude Code), so they can't get buried. /amrules lists them, /amrules remove 2 unpins one, /amrules clear unpins all. /amsave keeps them in the pack, and /amload pins them again in the new chat.
Claude rarely tells you it's losing track. These two helpers do.
- π€
/amcodeword: a code word that goes missing. Claude starts every reply with "Yes Boss!" (or your own phrase). The first reply without it is your warning sign to run/amhandoff. - π
/amcheckpoint: quick checkpoints. A short recap of the chat with a π’π‘π΄ health check, whenever you ask and automatically as the chat gets long.
All commands start with am (short for active-memory). Type a command in the chat box like a normal message.
| Command | What it does | When to use it |
|---|---|---|
/amhandoff |
Writes a complete handoff file for a new chat | When the code word goes missing, you see π΄, or you're done for the day |
/amsave |
Saves the whole chat, with every file, as a numbered pack. /amsave 3 adds this chat to pack 3 |
When the chat is long and you want a fresh one |
/amload 7 |
Loads pack 7 into a new chat. /amload alone lists your packs |
First message of the new chat |
/amrules |
Pins a rule Claude re-reads before every reply. /amrules remove 2, /amrules clear |
For rules that must never drift |
/amcodeword |
Claude starts every reply with Yes Boss! | At the start of any chat you expect to be long |
/amcheckpoint |
A short recap of the chat + π’π‘π΄ health check | When replies feel off, or every ~20 messages |
/amhelp |
Shows the guide and one tip for your current chat | Anytime |
/amsetup |
Checks what the plugin needs on this computer | If something isn't working |
Code word options
| Type this | Result |
|---|---|
/amcodeword |
Turns it on with "Yes Boss!" |
/amcodeword Aye Captain! |
Turns it on with your own phrase |
/amcodeword status |
Tells you if it's on and what the phrase is |
/amcodeword off |
Turns it off |
- Start a chat and type
/amcodeword. - Work normally. Around message 20, Claude adds a checkpoint on its own.
- A reply shows up without "Yes Boss!" (or you see π΄)? Type
/amhandoff. - Download the handoff file. Open a new chat, attach the file, and send continue.
- Claude replies "Yes Boss!" with a short summary of where you are, and waits for your go.
- Download
active-memory.pluginfrom the Releases page. - Open it in the Claude desktop app and install it.
- Type
/amhelpin any chat to check it's working.
Optional, for more reliable warnings: in the desktop app, Claude has to notice a long chat by itself. Copy the short text from examples/custom-instructions.txt into your Claude profile preferences so it always keeps an eye out.
/plugin marketplace add Klopyy/active-memory
/plugin install active-memory@active-memory
Claude Code, in a terminal:
claude plugin marketplace update active-memory
claude plugin update active-memory@active-memory
Then restart Claude Code.
In the desktop app, download the newest active-memory.plugin from Releases and install it again.
Claude Code gets extra automatic checks:
- Message counter: adds a checkpoint at 20 and 35 messages, without relying on Claude to notice.
- Pinned rules:
/amrulesrules are added to every message you send. - Pack checks:
/amsaveand/amloadcollect, fingerprint and verify files on their own, with no permission prompts. - Backup before compaction: the chat transcript is copied before Claude Code compacts it.
- Code word checker: checks every reply for your code word. If it's missing, you see: "π€ active-memory: that reply was missing your code wordβ¦". The checker never reminds Claude of the code word, so it stays a real test.
Do these need Python? Only these checks do, and any version works (2.7 or any 3.x). The plugin looks for py, then python3, then python, so it uses whatever you already have. If you have none, the checks quietly do nothing and every command keeps working. Type /amsetup and Claude will check your computer and offer to install Python for you, only if you say yes.
The plugin itself needs Claude, but the handoff method works anywhere. The chatgpt/ folder has ready-to-paste instructions for a Custom GPT, a Project or Custom Instructions. Type amhandoff in a long chat, paste the file into a new one, and send continue. Handoff files are the same format in both tools. There are no hooks or /amsave packs on ChatGPT; see chatgpt/README.md.
- active-memory does not give Claude memory between chats. It makes moving to a new chat complete and painless.
- Files don't carry over with
/amhandoff. Attach them again in the new chat; the handoff file lists them./amsavepacks them for you. - Passwords and keys are never copied. They show up as
[secret removed]in handoff files. - The code word is a warning sign, not a guarantee. Claude can lose track of something and still remember the code word.
- Found a bug or have an idea? Open an issue. See CONTRIBUTING.md for how to help.
- Pick a code word Claude wouldn't say anyway. "Okay" is a bad choice because Claude often starts replies with it.
- Nothing leaves your computer. active-memory makes no network requests and sends no data anywhere.
- Handoff files and checkpoints are written by Claude in your chat, like any other reply. Passwords and keys are replaced with
[secret removed]. - The Claude Code hooks (small Python scripts in
hooks/scripts/) run on your computer when you send a message, when Claude finishes a reply and before compaction. They read the current chat's transcript file and keep a small counter file per chat in~/.claude/active-memory/sessions/(the message count, your code word and a miss count). SetACTIVE_MEMORY_STATE_DIRto store it somewhere else. - Packs (
/amsave) are saved on your computer in~/.claude/active-memory/packs/(setACTIVE_MEMORY_PACKS_DIRto change it), with a copy of the files the chat used and its transcript. Passwords are removed from the handoff, but the transcript is a word-for-word copy, so treat packs like the chat itself. Delete any pack folder any time. - Transcript backups before compaction go to
~/.claude/active-memory/transcripts/. /amsetuponly runs version checks such aspy --version. It suggests a Python install command (for examplewinget install -e --id Python.Python.3.12) and runs it only after you say yes.
active-memory/
βββ .claude-plugin/ plugin info (name, version, icon)
βββ skills/
β βββ amhandoff/ /amhandoff (+ picking up from a handoff file)
β βββ amcodeword/ /amcodeword
β βββ amcheckpoint/ /amcheckpoint (+ automatic checkpoints)
β βββ amsave/ /amsave (saves a numbered pack)
β βββ amload/ /amload (loads a pack by number)
β βββ amrules/ /amrules (pinned rules)
β βββ amhelp/ /amhelp
β βββ amsetup/ /amsetup (checks Python, offers to install it)
βββ hooks/ Claude Code only: message counter, code word checker, pack tools (collect, recall, verify), transcript backup
βββ examples/ sample handoff file, custom instructions
βββ chatgpt/ ready-to-paste instructions for ChatGPT (no hooks needed)
βββ assets/ picture used in this README
βββ .github/ issue templates for bug reports and ideas
βββ tests/ py tests/test_hooks.py (fast checks) Β· py tests/release_eval.py (full release gate)
MIT
