Home / Blog / MuscleMemory: Skills learned by Codex, reused by Claude Code
Tech News

MuscleMemory: Skills learned by Codex, reused by Claude Code

TheWariend launched MuscleMemory under Apache-2.0, cutting agent input tokens by up to 43.5 percent by transferring learned procedural skills between models.

By Dillip Chowdary • Oct 26, 2026 • Source: github.com

MuscleMemory: Skills learned by Codex, reused by Claude Code

TheWariend released MuscleMemory, an open-source procedural memory engine published under the Apache-2.0 license designed to help coding agents learn from past successes and failures. According to github.com's report, the local-by-default architecture prevents AI assistants from repeatedly discovering project conventions across independent sessions. Instead of forcing agents to deduce test harnesses and file structures from scratch on every run, the platform records verified workflows and injects contextual procedural notes during subsequent operations.

This analysis details the engine's architectural mechanics, verification safeguards, multi-agent integration patterns, benchmark outcomes, and administrative controls. It is written for software engineers, systems architects, and engineering leads deploying autonomous coding assistants like Codex, Claude Code, Cursor, and CleanSlate across local development repositories.

What shipped in MuscleMemory

The core release delivers a background procedural memory daemon that observes agent sessions on local machines without requiring remote accounts. Operating by default on local port 8080 with SQLite storage and a compact search model, the software captures project requests, file edits, and execution evidence. Native capture hooks connect directly to Codex, Claude Code, Cursor, and CleanSlate. For custom workflows, five Model Context Protocol tools—recall, observe, learn, evaluate, and inspect—allow arbitrary agents and browser extensions to register operational workflows into designated project namespaces.

Safety and storage controls enforce strict user governance over shared procedural notes before they reach running tools. Discovered skills remain dormant until an operator approves them through the local dashboard interface, as agent API keys cannot self-authorize procedures. Developers can set an environment variable named MM_AUTO_APPROVE to true to bypass manual confirmation while preserving dual verification checks. Storage defaults to private local SQLite databases, though engineering teams can configure PostgreSQL backed by the pgvector extension for central workspace synchronization across shared enterprise codebases.

What improved in MuscleMemory

Controlled evaluation benchmarks demonstrate measurable drops in consumption metrics across multiple coding agents running automated tasks. When tested on real Codex sessions across three codebases, the procedural cache reduced input token consumption by 25.5 percent, eliminated 30.4 percent of extraneous tool calls, and reduced total execution time by 28.2 percent while retaining a 100 percent task completion rate. On realistic Django SWE-bench issues, Codex resolved problems at identical completion rates while consuming roughly half the standard token volume required by unassisted baseline runs.

Evaluation ScenarioObserved BaselineMuscleMemory ResultPerformance Delta
Codex Sessions Token LoadStandard context load25.5% reduction-25.5% input tokens
Codex Tool InvocationsUnassisted tool calls30.4% reduction-30.4% tool calls
Codex Task Wall TimeFull session duration28.2% reduction-28.2% elapsed time
Claude Code Sonnet 5.5Cold session baseline43.5% reduction-43.5% input tokens
Django SWE-bench IssuesFull token budget~50.0% reduction~50% fewer tokens
MuscleMemory: Skills learned by Codex, reused by Claude Code
Illustration · Pexels

Cross-agent transfer testing highlights notable efficiency gains when newer reasoning systems reuse procedural skills recorded by separate models. In early evaluations pairing Claude Code and Sonnet 5.5 with procedural skills originally captured during Codex runs, input token usage dropped by 43.5 percent and total tool calls fell by 30 percent. Verification routines ensure recorded guidance only surfaces when targeted repository files match existing disk states, recording skipped checks locally whenever directory structures diverge to prevent outdated instructions from polluting active agent prompts.

What you gain from MuscleMemory

Advertisement

Tech Pulse Daily

Get tomorrow's pulse first

Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.

Development teams gain reusable procedural intelligence that transfers across disparate command-line and editor agents without vendor lock-in. A testing sequence discovered while operating Codex can immediately guide Claude Code or Cursor inside the same namespace, treating file edits identically across environments. Teams can also export verified routines directly into repository markdown files as SKILL.md documents. Because the daemon remains silent when no recorded patterns match the current task, agents avoid paying token penalties for irrelevant guidance during novel programming tasks.

The platform also converts debugging regressions and failed attempts into protective warnings that prevent agents from repeating dead ends. When an execution fails, the engine logs specific error notes and watch-out instructions rather than discarding the history. Stringent eviction rules safeguard stability: if an agent applies a stored skill and the skill's own designated test fails as the final run, the hook immediately registers a failed check and pulls that procedure from circulation across all connected coding tools.

How to get MuscleMemory

Engineers can install the package through Python application installers or by building directly from the cloned repository before initializing system services. Running the initialization routine establishes configuration files inside the user home folder and prepares the compact on-device search model. Starting the daemon runs a persistent local server listening on port 8080, while the dashboard command opens the browser interface. Teams connect their existing coding agents by executing hook attachment commands directly within their repository working directories.

Command
pipx install thewariend-musclememory
musclememory init
musclememory start
cd your-project && musclememory connect claude
musclememory dashboard
Command
npm install -g @anthropic-ai/claude-code
claude update
claude --model sonnet
Command
/model sonnet

When pairing the engine with Claude Code or Codex, developers can maintain the underlying agent software using standard package managers and command updates. Claude Code updates through global package installations or by running the vendor update command directly in the shell. Operators launching sessions can pin specific foundation models using the command-line model parameter or adjust configurations during interactive work with in-app model switch directives. After connecting capture hooks, agents interact with project code as usual while the daemon handles procedural capture.

What to watch after MuscleMemory

Adopters should note several explicit architectural boundaries and verification requirements during early rollouts. The platform enforces a strict double-validation protocol where two subsequent sessions must execute the identical procedural sequence and pass stored test commands before a skill gains active status. Only recognized testing frameworks such as pytest, unittest, go test, cargo test, npm test, and make test satisfy verification criteria. Commands that merely reference tests without execution, such as build invocations or linting checks, are disqualified from validating captured procedures.

Operational scopes currently isolate procedural memories within shared namespaces rather than splitting storage across separate repositories, and cross-repository retrieval remains untested in active workloads. Native file-system hooks enforce strict path validation by requiring original files to exist and matching at least one stored edit state, while rejecting symbolic links. Furthermore, remote server and Model Context Protocol recall adapters operate without direct local file-system access, requiring developers to evaluate complex multi-repository setups carefully while the project advances its core roadmap.

Developer Action Items

  • ☐ Diff the official changelog for Claude / GitHub / Cursor 25.5 before you bump — APIs, defaults, and removed flags only.
  • ☐ Install through the vendor's documented channel in staging; keep a one-command rollback and time-box the canary.
  • ☐ Grep your repo for old flag names, lockfile pins, and plugin versions that the notes mark as breaking.
  • ☐ Prefer the first patch cut over the day-zero tag unless you have a reason to be on the leading edge.
  • ☐ If HN Claude/Codex/Fable did not name a region, plan, or SKU, screenshot the official availability line before you promise it to users.

MuscleMemory FAQ

What is MuscleMemory?

MuscleMemory is an open-source, local-by-default procedural memory engine licensed under Apache-2.0 that records successful agent workflows and hands them back as guidance notes in subsequent tasks.

How are procedural skills verified before being used?

Skills require two separate passing sessions that run actual test commands like pytest or npm test after code changes, followed by manual approval in the dashboard.

Can skills learned in OpenAI Codex be used by Claude Code?

Yes, procedural memories are agent-agnostic and can be shared across Codex, Claude Code, Cursor, and CleanSlate within the same workspace namespace.

What happens if a stored skill causes a test failure?

If an agent applies a skill and that skill's test fails on the final run, the hook immediately reports a failed check and pulls the skill from circulating to agents.

Sources

Dillip Chowdary

Author

Dillip Chowdary

Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.

Related on Tech Bytes

Advertisement

5-min tech signal

Weekday briefing for engineers who skip the noise.

No spam · Unsubscribe anytime

Advertisement

✈️ CareerPilot

Your AI job-search copilot

Match your resume against live Ashby, Greenhouse & Lever openings — fit scores, job-specific resume optimization and email alerts.

Find matching jobs →

Free Tools

Browse all tools →