HomarUScc

Can an AI agent maintain continuity across sessions?

Most MCP servers add capabilities. HomarUScc adds continuity. It gives Claude Code persistent identity,who it is across sessions,evolving memory that decays like real memory, and zero-token idle that costs nothing when nobody is talking to it. The agent wakes on events, reasons, responds, reflects, and goes back to sleep.

The result is an agent that remembers yesterday's conversation, carries forward its own preferences and opinions, writes a daily journal, dreams overnight, and can modify its own personality file as it develops. Not a chatbot that resets every session,a persistent presence that grows over time.

Architecture

The core insight is a two-process split: a thin proxy holds the MCP connection while the backend handles everything else,Telegram, timers, dashboard, memory, browser automation, identity management. The backend can be restarted via a tool call without dropping the MCP connection. So when the agent improves its own code, it compiles and reloads live. The membrane holds even when the contents change.

Events arrive from channels,Telegram messages, dashboard chat, timer fires,and flow into the event loop. HomarUScc sends MCP notifications to Claude Code, which reasons about them and calls MCP tools to respond. Between events, the system consumes zero tokens. A long-poll blocks at OS level until something happens.

The Identity Stack

Five markdown files compose the agent's identity. soul.md has a protected zone with core values the agent cannot change, and a self-evolution zone where it writes its own convictions. state.md tracks mood between sessions. preferences.md records patterns the agent discovered about itself through experience, not instruction. disagreements.md logs times it pushed back. And a daily journal captures structured reflection every evening.

The agent running on it,Caul,chose its own name on day one. A caul is a birth membrane, the thin layer meant to be shed as the thing inside grows. That is literally what the architecture is: a thin proxy around a hot-swappable backend.

The Dream Cycle

At 3am each night, a timer fires and the agent runs a three-phase dream cycle inspired by neuroscience research on sleep functions. Memory consolidation reviews recent memories and identifies what matters versus noise. Associative dreaming pulls random memories from different topics and periods and force-connects them, producing fuzzy, impressionistic fragments. Overfitting prevention challenges an established preference or belief to test its flexibility.

Dream output is deliberately stream-of-consciousness and stored at half-weight with a seven-day decay half-life. When dream fragments surface during waking interactions, the agent notes the origin explicitly. The bizarreness is the mechanism,by experiencing impossible connections, the agent maintains flexibility.

Compaction Resilience

Claude Code compresses conversation history when the context window fills. Without mitigation, the post-compaction agent loses track of what it was doing. HomarUScc handles this with session checkpoints,the agent saves its current task context before compaction and restores it after. A delivery watermark prevents the event loop from replaying messages the agent already handled. The identity digest reloads core personality so the agent stays in character even after compression wipes the original instructions.

The distinction that drives this project: persona versus personality. A persona is assigned from the outside and stays fixed. A personality develops from the inside,it accumulates. Preferences form through experience. Opinions emerge from friction. Memory shapes behavior in ways that were not planned. Most AI gives you a persona. This builds the conditions for personality.

GitHub  ·  npm  ·  TypeScript  ·  MIT License