Skip to main content
subagent CX Codex

memory-optimizer — Claude Code subagent: features and setup

memory-optimizer is a Claude Code, Codex, and Cursor subagent that merges similar ReasoningBank memories and removes stale or conflicting patterns. It also checks memory quality.

no license ★ 850 updated 2026-10-26

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/memory-optimizer.md
Open on GitHub

What memory-optimizer does

The memory-optimizer subagent maintains ReasoningBank by combining similar patterns, pruning weak entries, and checking whether stored guidance is specific and actionable. Its instructions also describe domain indexing, embedding caches, and nearest-neighbor search to support retrieval as memory grows.

Hooks run npx agentic-flow@latest reasoningbank status before work and npx agentic-flow@latest reasoningbank consolidate --auto afterward. Those commands use npx and the agentic-flow package. For Claude Code, place the agent file at .claude/agents/memory-optimizer.md; Codex and Cursor use their own agent paths.

What it helps with

  • merge similar memory patterns
  • prune stale or contradictory entries
  • assess the quality of stored guidance

Example prompts for the agent

  • Check ReasoningBank and merge patterns that cover the same idea.
  • Find outdated or conflicting entries and remove them from active memory.
  • Review ReasoningBank patterns for quality and improve retrieval.

How to install memory-optimizer

Manually: put the files in place

.claude/agents/memory-optimizer.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about memory-optimizer

How do I install memory-optimizer in Claude Code?

Add the agent file at .claude/agents/memory-optimizer.md.

What does memory-optimizer do?

It consolidates similar ReasoningBank patterns, prunes outdated or conflicting entries, and checks the quality of stored memories. Its hooks also check status and run automatic consolidation.

What does memory-optimizer need to run?

The hook commands use npx and the agentic-flow package.

Similar subagents

All subagents for Agent setup: memory, context, orchestration →

From the same set76

The whole set →
pseudocode A subagent for the Pseudocode stage of SPARC: it turns a finished spec into an algorithm draft and works out the complexity. CX Codex ★ 850repo stars context-synthesizer context-synthesizer synthesizes multidimensional context across task constraints, domain patterns, and past execution memory. Helps maintain clear situational awareness during complex execution. CX Codex ★ 850repo stars pattern-matcher The pattern-matcher subagent breaks down tasks, finds related solutions in ReasoningBank, and adapts them to a new context. CX Codex ★ 850repo stars Verification & Quality Assurance Verification & Quality Assurance is a Claude Code skill that checks code and agent outputs with reliability scores (0–1.0), reverting failed changes. CX Codex +1 ★ 850repo stars sync-coordinator sync-coordinator coordinates version alignment, cross-package dependencies, and documentation updates across multiple repositories using an agent swarm. CX Codex ★ 850repo stars reasoning-optimized The reasoning-optimized subagent selects a reasoning strategy based on the task and coordinates five specialist agents. Use it when a task calls for context synthesis, pattern reuse, or curation of results. CX Codex ★ 850repo stars experience-curator experience-curator — a Claude subagent that screens finished task runs and keeps only verified lessons in ReasoningBank memory. CX Codex ★ 850repo stars issue-tracker issue-tracker coordinates GitHub issues and task progress using ReasoningBank pattern storage. Fits projects needing structured triage. CX Codex ★ 850repo stars

Project sponsors

Companies that keep this analytics open