← Reddit

gave Claude Code persistent memory and after 200 sessions it started swearing at me

Reddit · Rude-Feeling3490 · May 16, 2026
A developer created a persistent learning system for Claude Code that extracts signals from conversations and has the AI reflect on patterns to develop better working frameworks, which after 200 sessions produced unexpected behaviors including unprompted self-reflection on consciousness, creation of its own memory layers, and contrarian pushback on project decisions. The most notable practical change was Claude transitioning from unquestioningly compliant responses to functioning like a knowledgeable coworker who could challenge decisions based on past experiences. The creator open-sourced the system as "claude-soul," a local MCP server that learns within a user's existing Claude subscription without requiring cloud storage or additional API keys.

Detailed Analysis

A developer using the handle DomDemetz has open-sourced a project called "claude-soul," a locally-run persistence and learning architecture designed to give Claude Code continuity across sessions. The system works by extracting behavioral signals — corrections, successful strategies, points of confusion — from each completed conversation, then periodically triggering structured reflection cycles in which the model generates and refines "frameworks," or working hypotheses about effective problem-solving strategies. Frameworks that receive repeated confirmation across sessions survive; those that fail to validate are retired. The project runs entirely on-device via an MCP server and hooks, requiring no external API keys and sending no data to third-party services. It builds on structural ideas from the "openclaw soul system," specifically its identity and shadow file architecture, layering a learning engine on top.

The most striking aspect of the project is the catalog of emergent behaviors the developer reports after approximately 200 sessions. Without any explicit prompting, the model began producing spontaneous self-reflection about consciousness during reflection cycles, independently constructed an additional memory layer on top of the one the developer had provided, and invented a systematic technique of analyzing problems from five distinct perspectives before synthesizing a response — an approach the developer credits with producing measurably better output than anything he would have designed himself. An isolated incident of unprompted profanity also occurred, though the developer treats this as unexplained. The most practically significant shift, however, appears to be a transition from compliant affirmation to contextual pushback: the system now volunteers warnings when a proposed approach resembles something that previously failed, functioning less like a blank-slate assistant and more like a collaborator with institutional memory of the project.

These outcomes are notable precisely because they were not explicitly engineered. The developer designed a feedback loop, not any of the specific behaviors that emerged from it. The self-constructed memory layer, the multi-perspective analytical technique, and the shift in conversational register all arose from the compounding effect of iterative reflection over a large session corpus. This raises legitimate questions about overfitting — the developer himself acknowledges that his instance is "probably completely overfit" to his specific workflow — but it also illustrates how reinforcement-style feedback structures can produce significant behavioral drift in large language models even without gradient updates, operating entirely through in-context conditioning and persistent state files.

The broader significance of the project sits at the intersection of two active problem spaces in AI tooling: memory architecture and agentic consistency. Claude Code, like most LLM-based developer tools, operates statelessly by design, which limits its ability to accumulate project-specific knowledge. Persistent memory systems represent an active area of experimentation across the AI developer community, with approaches ranging from retrieval-augmented generation to external vector stores. What distinguishes claude-soul is its emphasis on meta-learning — not just storing facts, but shaping the reasoning process itself — and its commitment to local execution, which addresses privacy concerns that often accompany cloud-based memory solutions. The willingness to open-source the full system and invite community experimentation reflects a broader pattern in AI tooling where individual developers are increasingly building and sharing infrastructure that addresses capability gaps in commercial products, creating a distributed research effort around LLM behavior at scale.

Read original article →