Persistent agents for Claude Code as a plugin, not a harness. Memory, personality, messaging across WhatsApp, Telegram, and Discord, plus a service mode for 24/7 runs. Imports from OpenClaw.
$git clone https://github.com/crisandrews/clawcodeInstalls into the current project.
Install clawcode by running `git clone https://github.com/crisandrews/clawcode`, then use it for the current task and follow its documentation at https://github.com/crisandrews/clawcode.
| 1 | <h1 align="center">ClawCode</h1> |
| 2 | |
| 3 | <p align="center"> |
| 4 | <img src="assets/clawcode.png" alt="ClawCode mascot" width="120"> |
| 5 | </p> |
| 6 | |
| 7 | <p align="center"> |
| 8 | <strong>Turn Claude Code into a persistent agent — memory, personality, voice, messaging, and more.</strong> |
| 9 | </p> |
| 10 | |
| 11 | <p align="center"> |
| 12 | <a href="https://github.com/crisandrews/ClawCode/releases"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/crisandrews/ClawCode/main/.github/release.json&style=for-the-badge" alt="Release"></a> |
| 13 | <a href="https://github.com/crisandrews/ClawCode/stargazers"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/crisandrews/ClawCode/main/.github/stars-count.json&style=for-the-badge" alt="Stars"></a> |
| 14 | <img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/crisandrews/ClawCode/main/.github/clone-count.json&style=for-the-badge" alt="Clones"> |
| 15 | <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge" alt="MIT License"></a> |
| 16 | <img src="https://img.shields.io/badge/node-%E2%89%A5%2018-blue?style=for-the-badge&logo=node.js&logoColor=white" alt="Node ≥ 18"> |
| 17 | <img src="https://img.shields.io/badge/platform-macOS%20%7C%20Linux%20%7C%20Windows%20%28WSL2%29-blue?style=for-the-badge" alt="Platform"> |
| 18 | </p> |
| 19 | |
| 20 | <p align="center"> |
| 21 | <a href="#quick-setup">Quick Setup</a> · |
| 22 | <a href="#why-it-exists">Why</a> · |
| 23 | <a href="#features">Features</a> · |
| 24 | <a href="#skills">Skills</a> · |
| 25 | <a href="#going-further">Going further</a> · |
| 26 | <a href="#troubleshooting">Troubleshooting</a> · |
| 27 | <a href="https://github.com/crisandrews/ClawCode/issues">Issues</a> |
| 28 | </p> |
| 29 | |
| 30 | <p align="center"> |
| 31 | <a href="https://github.com/anthropics/claude-plugins-community"><img src="https://img.shields.io/badge/Listed%20on-Anthropic's%20claude--plugins--community-FF6B35?style=for-the-badge" alt="Listed on Anthropic's claude-plugins-community"></a> |
| 32 | </p> |
| 33 | |
| 34 | --- |
| 35 | |
| 36 | ## [What this is](#what-this-is) |
| 37 | |
| 38 | ClawCode is a plugin for Claude Code. Install it and Claude Code remembers you between sessions: your name, the agent's own name and personality, the notes you and the agent wrote together last week. It adds memory with bilingual recall (Spanish ↔ English), messaging through WhatsApp, Telegram, Discord, iMessage and Slack, a browser chat, nightly memory consolidation, and a background service for 24/7 runs. Everything lives inside Claude Code's plugin system. |
| 39 | |
| 40 | The agent remembers your dog's name, warns about allergies before suggesting food, and answers in 1 to 2 lines instead of paragraphs. |
| 41 | |
| 42 | ## [Why it exists](#why-it-exists) |
| 43 | |
| 44 | Claude Code is stateless by default. Open a new session and the agent starts from zero: no memory of what you were working on yesterday, no name, no feel for who it is. Good agents should not do that. That gap is what ClawCode fills. |
| 45 | |
| 46 | There are roughly two ways to build persistence on top of Claude. One is a *harness*: a separate runtime that wraps Claude's API with its own session, memory, and tool layer. OpenClaw is one example. Harnesses run on Claude's API directly; as of April 2026 they can no longer draw from a Claude subscription, so users need to pay for API usage separately. |
| 47 | |
| 48 | ClawCode takes the other route. It extends Claude Code from inside as a plugin, so there's no separate runtime and no separate billing. A ClawCode user is just a Claude Code user with an extra layer on top. ClawCode inherits what Claude Code already does well (its harness, tool system, skills, hooks, MCP plumbing) and adds only what a persistent agent needs. |
| 49 | |
| 50 | Coming from OpenClaw? `/agent:import` brings your agent's personality, memory, skills, and crons across. |
| 51 | |
| 52 | ## [Highlights](#highlights) |
| 53 | |
| 54 | - **[Persistent identity](#how-it-works)** — name, personality, emoji. The agent wakes up as itself on every session via lifecycle hooks that inject SOUL.md + IDENTITY.md at startup. |
| 55 | - **[Messaging channels](#messaging-channels)** — WhatsApp, Telegram, Discord, iMessage, Slack via MCP plugins. Same agent, every channel, no conflicts. |
| 56 | - **[Active memory](#memory)** — bilingual recall (ES ↔ EN) at the start of every turn. Ask "cómo se llama mi perro?" and it finds "Cookie" from English notes. Warns about allergies before suggesting food. |
| 57 | - **[Lifecycle hooks](#hooks)** — SessionStart injects identity + auto-creates crons. PreCompact flushes memory before context compression. Stop writes session summaries. SessionEnd tracks dream events. |
| 58 | - **[Dreaming](#dreaming)** — nightly 3-phase consolidation (Light → REM → Deep) with 6 weighted signals. Promotes important memories to long-term storage. |
| 59 | - **[Language adaptation](#how-it-works)** — detects the user's language and responds in kind. Switch mid-conversation and the agent switches too. Commands, status cards, and errors all adapt. |
| 60 | - **[Voice](#voice)** — TTS via sag, ElevenLabs, OpenAI, macOS `say`. STT via local Whisper or OpenAI API. |
| 61 | - **[WebChat](#webchat)** — browser chat UI with SSE real-time delivery. Conversation logs in JSONL + Markd |