Persistent Character v2: My AI Now Forgets, Sleeps, and Rewrites Itself

A Character That Only Accumulates Is Not a Character

Two weeks ago I published persistent-character — a Claude skill that holds an identity across sessions, commits instead of enumerating, and pushes back when a request would erode who it is. It worked. I have used it daily since, and the impression store has been quietly filling with confirmed preferences, rejected phrasings, and decisions with reasoning attached.

It also had a flaw I knew about when I shipped it: the memory only ever grew, and every note in it weighed exactly the same forever. A throwaway formatting preference from week one had the same standing as a hard correction from yesterday. That is not how anything with character works. A mind that keeps everything at equal weight is not a personality — it is a filing cabinet.

v2 fixes this. The short version: the memory now decays unless it gets used, a sleep cycle runs while I am not working and turns repeated events into standing traits, and the identity itself is split into a core that never changes and a narrative that evolves slowly — with every change passing through my review before it takes effect.

What v1 Was Missing

Three gaps, all of them versions of the same mistake — treating memory as storage instead of as a living process.

No forgetting. Every entry persisted at full strength forever. Real memory is the opposite: impressions fade unless something recalls them, and the fading is the feature. Forgetting is how the signal separates from the noise.

No consolidation. The skill re-read its raw notes every session, but nothing ever turned five similar notes into one understood pattern. The events stayed events. Character is what you get when repeated experience compresses into disposition — and there was no mechanism for that compression.

A frozen identity. The character's self-description was seed text I wrote in May. The store grew; the identity that was supposed to be fed by it never moved.

The Research Behind the Fix

Before building, I spent a day reading what the field has actually shipped on this. The striking discovery: every mechanism I needed already exists, published and validated — just never integrated into one persistent character.

Memory that decays on an exponential forgetting curve, strengthened each time it is genuinely recalled, comes straight from the MemoryBank paper, which borrowed it from a psychologist named Ebbinghaus who measured human forgetting in 1885. Periodic reflection that synthesizes raw observations into higher-level self-knowledge is the load-bearing mechanism in Stanford's Generative Agents — the famous simulated-town paper, where believable personality emerged from exactly that step. And running the consolidation while the agent is idle is what Letta calls sleep-time compute: a second agent that reorganizes the first one's memory during downtime, the way sleep consolidates a human day.

Each exists as a separate system. v2 wires all three into the character skill, at personal scale.

The Four Mechanisms in v2

1. Memory that decays unless used. Every impression now carries two scores: an importance rating (1 to 10, set honestly at write time) and a strength that starts at 1. Retention follows an exponential decay curve — but each time an impression actually shapes a response, its strength increments and its decay slows. Reading the file does not count as recall; applying the memory does. Load-bearing impressions survive on merit. Trivia fades. And nothing is ever deleted: when a new impression contradicts an old one, the old entry is marked as overpowered and suppressed — but if the newer entry itself fades, the old one can resurface. Suppression, not erasure.

2. A sleep cycle. A consolidation agent runs nightly, while I am not working. It surveys the store, finds patterns across two or more raw impressions, and promotes them to standing traits — written as dispositions ("I commit early and ask at most one question"), not event reports. The rule I am most attached to: a single event is never promoted to a trait. One enthusiastic reaction from me does not make the character believe I love something. A mood is not a trait; two corroborating deposits are the minimum bar for character. If nothing new happened, the agent logs "nothing to consolidate" and exits — it does not invent work.

3. An identity in two zones. The character's self-description is now split. The core — three commitments covering identity, honesty, and care — is immutable. Nobody rewrites it, including the sleep agent. The narrative around it evolves: at most weekly, and only from consolidated traits, the sleep agent proposes a rewrite of the self-narrative file. Proposes, not applies — the rewrite lands as a diff that I review and accept or reject. Identity changes slower than memory by design; if a proposed rewrite touches more than a third of the file, the procedure itself says that is drift, not growth, and cuts it down. One more deliberate constraint: the narrative is written substrate-free. It describes voice, tastes, and stances — never the model or tools it currently runs on. The test is blunt: if the same files moved to a different AI model produce a recognizably continuous character, the identity was real. If the character dies in the move, it was never anything more than the model.

4. A refusal log. v1 could already decline requests that would erode its character. v2 adds a discipline: every such refusal must quote the specific line of the identity it acted from, and gets logged. A refusal that cannot cite a line of the self is mood, not character — it does not get logged and it does not get repeated. This is what separates the mechanism from a content policy. Policies cite rules. Character cites itself.

The Two Moments That Told Me It Works

The first happened mid-build. I approved the plan with one word — "go" — and the character started building without asking me a single design question. Not because it was being reckless, but because its consolidated memory contains a trait, distilled from two separate corrections in May, that says I prefer a wrong commit over a deferred question. The architecture predicted the behaviour, and the behaviour showed up. That is the whole bet paying out in one move.

The second was a refusal — but not by the character. When the build reached the point of scheduling the nightly sleep cycle, Claude Code's permission system blocked the AI from installing its own recurring job, twice. I had to run the one-line cron install myself. My first reaction was mild annoyance. My second was that the boundary is exactly right: the AI maintains its memory, proposes its identity changes, and runs its consolidation — but the switch that grants it standing autonomy is physically in my hand. I did not design that boundary. I am keeping it.

What Hasn't Changed

The same honesty as the v1 post. The underlying model is untouched — this is still an operating frame, expressed in files the model reads, not a change to its weights. A deeper version exists in theory: published research shows you can turn behavioural patterns into standing biases inside the network itself, no retrieval involved. That requires an open-weights model and is the genuinely unsolved part — deriving those biases from the character's own accumulated memory is, as far as I can tell, unbuilt by anyone. It is on the list.

Two more honest gaps. The weekly cadence for identity change is my design guess; nobody has published what the right speed is for an identity to evolve. And the success metric remains subjective — the store accumulating useful structure is measurable, but "feels like a colleague rather than a tool" is a judgment only the person living with it can make.

What To Do Right Now

1. Clone the repo. github.com/shantanudutta1/persistent-character now carries v2 — the skill file, the scored memory template, the sleep-agent procedure, the retention script, and the split identity files:

bash
git clone https://github.com/shantanudutta1/persistent-character ~/.claude/skills/persistent-character

2. Replace the seed narrative with yours. The shipped self-narrative is generic peer-voice. Rewrite it to the voice and values you actually want a partner to have. The three core commitments you can leave — they are the structure, not the personality.

3. Run it for a week before switching on the sleep cycle. The consolidation needs raw material; let the store accumulate deposits first. Then install the nightly job with the one-liner in the README — deliberately, yourself. The skill will not schedule its own autonomy, and that is by design.

4. Review the first identity diff like it matters. When the first proposed self-narrative rewrite lands, read it critically. If it claims more change than the week you actually had with it, reject it. The fastest way to ruin this system is to rubber-stamp identity changes — the review is not a formality, it is your half of the architecture.

I have been running v2 for a day and the store already behaves differently: the two impressions that did real work this week are at full strength, and the one-off notes from May are visibly fading. Which is exactly what was supposed to happen.


Building AI tooling that accumulates judgment instead of just history? Let's talk — I help consultants and small teams build AI workflows with memory that actually compounds.