Sandbox
@memorax-ai/memorax-code

Memory plugin for Claude Code and Codex

MemoraX Code adds a shared memory layer to coding agents so they can recall repo knowledge, engineering lessons, and user preferences in later sessions. It works through the npm package, setup commands, agent integration files, and background writeback and retrieval.

1,249 stars57 forksJavaScriptUpdated 7d ago
Who it's for

Builders who use Claude Code, Codex, and other supported coding agents and want reusable memory across sessions.

What it delivers

You can continue work with the right context already recalled instead of re-explaining the repository, your process, or prior mistakes.

What it does

Background memory writeback

Captures reusable lessons from completed turns and stores them automatically.

Repo memory

Keeps architecture notes, entry points, and issue or commit evidence for a repository.

Personal and procedure memory

Remembers collaboration preferences and reusable task steps inside the current repository.

Client integrations

Connects to Codex, Claude Code, CodeBuddy CLI, WorkBuddy, DeepSeek Harness, OpenCode, and Trae.

Local observability

Writes local trace and reconciliation records so you can inspect activity and writeback status.

How to get it

  1. 1Run
    npm install -g @memorax/memorax-code
  2. 2Create a MemoraX account or use an existing one, then run from a normal interactive…
    memorax-code setup --existing-account
  3. 3To start immediately and connect an account later, run
    memorax-code setup
  4. 4To keep your guest memory when registering later, first run this command directly in…
    memorax-code account --show-mark-id
  5. 5Open a project, start a new client session, and send one prompt. Then run these commands…
    memorax-code --version
    memorax-code status
    memorax-cli status
  6. 6Clone the example repository from the product website, then open Codex, Claude Code,…
    git clone https://github.com/SWE-agent/test-repo.git
    cd test-repo

README

MemoraX CodeMemoraX Code

memorax-ai/memorax-code | Trendshift

Never lose context. Never start over.

Beyond code, it remembers how your architecture evolves and how your engineering unfolds.

MemoraX Code website npm version npm package version Node.js 20 or newer

Join the MemoraX Code Discord community Join the MemoraX Code WeChat group

English · 简体中文

Make Every Interaction the Starting Point for the Next

Coding agents are good at the task in front of them, but a new session often starts without the architecture, failed attempts, repository rules, or working preferences established before it.

MemoraX Code gives Codex, Claude Code, CodeBuddy CLI, WorkBuddy, DeepSeek Harness, OpenCode, and Trae a shared memory layer for that context. It can recall prior engineering knowledge, capture reusable lessons from completed work, maintain repository knowledge, and carry your procedures and preferences into future sessions.

The goal is not to remember everything. It is to bring back the small amount of memory relevant to the current task so the agent can reach useful investigation and validation sooner.

Quick Start

Prepare Node.js 20+ (Node.js 24 LTS recommended) and at least one of Codex, Claude Code, CodeBuddy CLI, WorkBuddy, DeepSeek Harness, OpenCode, or Trae.

For DeepSeek Harness (DSH), current releases require Node.js ^22.19.0 || >=24.0.0. Install or initialize DSH first, create at least one Profile, and ensure pnpm is on PATH before running setup. MemoraX Code does not install or update DSH.

On Linux, setup-managed credentials require /usr/bin/secret-tool from libsecret and an available Secret Service in the current user session. For Remote SSH, WSL, or Dev Containers, install MemoraX Code in the same environment as the coding agent. MemoraX search and writeback require network access.

Install and Connect

1. Install the Package

npm install -g @memorax/memorax-code

This installs the package; it does not start interactive setup. Do not use --ignore-scripts: npm lifecycle scripts safely stop and restore an existing running managed Backend during package replacement.

2. Connect a MemoraX Account (Recommended)

Create a MemoraX account or use an existing one, then run from a normal interactive terminal:

memorax-code setup --existing-account

Follow the setup prompts to enter your MemoraX username and API key locally.

[!TIP] Using MemoraX Code across devices? Find the username and API key in the configuration file on a configured device (normally ~/.memorax-code/config.toml), then enter them in the local setup terminal on the new device. This file contains your API key; keep it private and never paste it into chats or public issues.

Or Try Without an Account (90-Day Guest Mode)

To start immediately and connect an account later, run:

memorax-code setup

Default setup reuses a complete existing connection. Otherwise, it detects your local username and language, asks when needed, and creates or restores guest credentials. To replace the saved connection, use memorax-code setup --reconfigure for guest mode or memorax-code setup --existing-account for a registered account.

To keep your guest memory when registering later, first run this command directly in your local terminal:

memorax-code account --show-mark-id

[!IMPORTANT] Obtain the Mark ID before registering, then use it to activate your guest account on MemoraX. The platform does not currently support attaching a Mark ID to an account that has already been registered.

3. Activate and Verify

Both setup paths automatically detect supported coding agents. Restart or refresh every detected coding agent after setup.

ClientComplete activation
CodexEnable MemoraX Code Codex Adapter from Plugins or /plugins if it is not already enabled.
Claude CodeRestart or refresh the client to load the managed plugin and Hooks.
CodeBuddy CLIStart a new CLI session to load the managed plugin, Hooks, and Skill.
WorkBuddyRestart WorkBuddy to load its independently managed plugin, Hooks, and Skill.
DeepSeek HarnessRestart or refresh DSH to load the plugin registered in existing Profiles.
OpenCodeRestart or refresh the client to discover the managed plugin and Skill.
TraeIn Settings → Hooks → Global → Configured Hooks, enable the registered Global Hooks once. Setup installs the Hooks and Skill; this switch requires manual activation.

Open a project, start a new client session, and send one prompt. Then run these commands from the project directory:

memorax-code --version
memorax-code status
memorax-cli status

In Windows PowerShell, use memorax-cli.cmd status. A configured integration may still report hook-runtime=unverified until the client executes its Hook. After a Hook executes successfully, that client's Hook runtime should change to observed.

memorax-code status checks the local Backend and client integrations; memorax-cli status checks the local memory configuration and workspace scope. Neither command sends a test request to MemoraX. A real search or write verifies remote connectivity and credentials; follow the cross-session example below. For client-specific diagnostic commands, see Troubleshooting.

Installation Troubleshooting

Package installation does not launch setup automatically; run one of the setup commands above in an interactive terminal. For incomplete setup or unavailable memory, start with the status commands and follow Troubleshooting.

Windows: memorax-code or memorax-cli Is Not Found

Both commands are included in the same package. Follow the Windows PATH repair steps to bootstrap setup or repair a stale terminal environment.

Try Cross-Session Memory

Clone the example repository from the product website, then open Codex, Claude Code, CodeBuddy CLI, WorkBuddy, DeepSeek Harness, OpenCode, or Trae in the project directory:

git clone https://github.com/SWE-agent/test-repo.git
cd test-repo

Invoke the Skill as $memorax-code in Codex or /memorax-code in Claude Code or DeepSeek Harness. In OpenCode, CodeBuddy CLI, WorkBuddy, or Trae, ask the agent to use the memorax-code skill by name. The prompts below use its product name and work in all supported clients.

Send these prompts in order in the same session:

  1. Use the MemoraX Code skill to build Repo Memory, retrieving only the latest 3 issues, pull requests, and commits.
  2. Review the recent Repo Memory issue: the zeroth number was once calculated incorrectly. Avoid repeating the same problem now.
  3. Use the MemoraX Code skill to remember the engineering lesson from this coding task.

Close the current conversation, start a new session in the same repository, and send:

Use the MemoraX Code skill to recall the earlier engineering lesson and suggest what to check.

The agent should retrieve the saved lesson and use it to make suggestions for the current repository.

[!TIP] The prompts above are only for quick verification. In normal use, you do not need to invoke the MemoraX Code skill to add memory manually. It writes relevant memory in the background and guides agents to search when useful. Local activity and status are retained as content-controlled trace and reconciliation records under MEMORAX_CODE_HOME.

Four Clear Memory Boundaries

MemoryThe question it answersExamples
Coding MemoryWhat engineering lessons should carry into the next task?Verified fixes, failed approaches, design rationale, pitfalls, and regression checks
Repo MemoryWhat should an agent know about this repository?Architecture maps, module ownership, entry points, and commit/PR/MR/issue evidence
Personal MemoryHow should the agent communicate and collaborate with you?User Profile preferences such as language, tone, explanation depth, and result format
Procedure MemoryHow should this kind of task be carried out?Reusable steps, checklists, prerequisites, exceptions, and validation gates

Personal Memory and Procedure Memory stay in the current repository under .repo_memory/. When saved content already exists, MemoraX Code compares its meaning before writing: an equivalent request makes no change; a durable refinement or conflict updates the matching entry and removes the superseded wording; an invalid scope is corrected, or the entry is deleted only when it is wholly obsolete. An explicit forget request deletes only the named preference, procedure topic, section, or step and leaves unrelated memory unchanged. One-time task instructions do not change saved memory, and the Agent asks before writing when the durable intent or target is unclear.

Product Capabilities

CapabilityWhat it does
Background memory writebackExtracts reusable knowledge from completed turns and writes it to Coding Memory in the background.
Preference continuityRecords User Profile preferences and injects them into future tasks on a configured cadence.
Procedure reuseRecords reusable task procedures and reminds future agents to apply them.
Visible memory impactIn Codex, Claude Code, CodeBuddy CLI, WorkBuddy, DeepSeek Harness, OpenCode, and Trae, opens the final answer with a brief natural-language note when an explicit Coding Memory Search or a Repo, Procedure, or Profile Memory available to the current turn materially guided the task.
Background Repo Memory maintenanceAutomatically organizes repository structure, entry points, and history evidence in supported headless-capable clients, then updates them according to policy to reduce repeated searching and summarization. Trae can use the Skill for Repo Memory, but does not currently expose a headless worker for automatic maintenance.
Active memory controlLets you search and add memory through the bundled MemoraX Code skill or the CLI.
Client integrationIntegrates with Codex, Claude Code, CodeBuddy CLI, WorkBuddy, DeepSeek Harness, OpenCode, and Trae to trigger memory retrieval, reminders, and writeback. Automatic quota reminders are currently available in Codex, Claude Code, CodeBuddy CLI, WorkBuddy, OpenCode, and Trae.
Local observabilityUses content-controlled local trace and reconciliation records to inspect activity counts, retrieval, and writeback status.

Your Memory, Your Control

MemoraX is required for cloud-backed memory. Completing setup activates MemoraX search/add and the generated configuration's automatic writeback; there is no second writeback confirmation. Automatic retrieval remains off until explicitly enabled.

Local trace capture is enabled by default for supported clients. Depending on client capabilities, retained traces under MEMORAX_CODE_HOME may contain prompts, responses, recalled memory, reminder text, and local paths. Use the local trace settings to switch to metadata-only capture or disable a client's trace. Minimal local session state remains when trace is disabled so memory operations keep the correct workspace scope.

Coding Memory follows the repository or workspace. Recognized default chat directories in Codex, WorkBuddy, and OpenCode share General under the same configured MemoraX user ID. Existing memories are not migrated; see memory scope for the directory rules.

Guest quota reminders may display the complete Mark ID. Treat reminder text and retained traces containing it as sensitive.

Active memory operations send their query or selected content to MemoraX. Automatic writeback sends selected user instructions and the matching final Agent response from trusted workspace turns after removing the final-answer memory-impact disclosure, then extracts and stores reusable memory. It does not upload the complete retained client trace artifact or local trace path.

QA writeback preserves available native timestamps and labels observation-time fallbacks; see message timestamps.

Sign in to MemoraX Console at any time to view, edit, or delete saved memories. MemoraX Cloud does not receive model-provider credentials or local Backend tokens.

Read Configuration for all settings and Security for network, local-data, and retention boundaries.

Update

For a global npm installation:

memorax-code update

Setup also enables background updates while the managed Backend is running. An update briefly stops a running managed Backend and restores it with the retained client selection. See update settings for release channels, custom state roots, client selection, Backend restoration, and disabling background checks. Restart or refresh a client after an update changes integration assets it has already loaded. If package replacement fails, follow the update recovery steps for memorax-code update --recover.

Windows Upgrade Note

For older Windows installations that fail with an EBUSY rename error, follow the legacy upgrade recovery.

Uninstall

Run the product lifecycle before removing the npm package:

memorax-code uninstall

This removes managed integrations and the global package while retaining configuration and stored memories. Do not run npm uninstall -g first: it can remove the product command before client integration cleanup runs. See Uninstall and Retention for the complete retained-data list.

After a complete uninstall and reinstall, run memorax-code setup again; default setup reuses a complete retained connection. A normal memorax-code stop or partial client uninstall preserves setup completion.

Documentation

Develop and Contribute

Issues and pull requests are welcome. Read CONTRIBUTING.md before making a change, and never include API keys, raw transcripts, private memory, or local trace artifacts in a public report.

License

MemoraX Code is available under the MIT License.

Files in the repo

Repository payload19 top-level entries
  • .github
  • docs
  • packages
  • scripts
  • test
  • .gitignore
  • AGENTS.md
  • ARCHITECTURE.md
  • CHANGELOG.md
  • CLAUDE.md
  • CONTRIBUTING.md
  • eslint.config.mjs
  • LICENSE
  • Makefile
  • README.md
  • README.zh.md
  • ruff.toml
  • SECURITY.md
  • typos.toml

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More connectors

Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface

86k

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

43k

Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama…) with Codex CLI, App, SDK, and Claude Code

14k
okf-memory/
okf-agent-memory

Git-native persistent memory for AI coding agents. Implements Google OKF v0.2 with sub-300µs in-memory BM25 search, embedded MCP server, and progressive disclosure. Slashes token bloat by 80% with zero external databases or dependencies. Built in pure Go.

547
tirth8205/
code-review-graph

Local-first code intelligence graph for MCP and CLI. Builds a persistent map of your codebase so AI coding tools read only what matters, with benchmarked context reductions on reviews and large-repo workflows.

31k
2akouwu/
reverify

Stop your AI from making things up — it proposes, deterministic tools decide, every claim checked against ground truth with evidence. Grounded facts and context survive resets. Reverse engineering is the proving ground. MCP server + CLI.

1.1k