neuralmind.uk / NeuralMind vs. the Codex CLI memory ecosystem — Hindsight, Mem0, and Basic Memory Edit this page on GitHub ↗

NeuralMind vs. the Codex CLI memory ecosystem

TL;DR — Codex CLI has no native persistent memory: AGENTS.md is static and capped at 32KiB, and its auto-generated session summaries are markdown files recalled by grep, not search. Three MCP memory servers have moved into that gap — Hindsight, Mem0, and Basic Memory — and all three share the same shape: LLM-extracted facts/entities/notes, not source-code structure. None of them parse an AST, build a call graph, or rank files against a def-site oracle. NeuralMind is the only tool in this set that does. The honest caveat that matters most here: neuralmind-mcp is confirmed to register with Codex CLI and speak the MCP protocol correctly, but no one has watched Codex’s own agent call it mid-conversation. codex mcp add neuralmind -- neuralmind-mcp writes the expected [mcp_servers.neuralmind] stdio entry and codex doctor reports it as a valid, enabled server; a direct MCP-protocol probe against the same binary confirms initialize, tools/list (25 tools), and real tool calls all work. What’s still unverified is Codex’s own Rust MCP client actually driving those tools inside a live turn, which needs an OpenAI API key this environment doesn’t have. Assessed September 2026 — re-check before relying on specifics; this space is moving fast.

The gap: what Codex does and doesn’t remember natively

Codex CLI (OpenAI, latest stable v0.155.0, GPT-6-Astra as of September 2026) has two native context layers, and neither is a memory system in the sense NeuralMind or its competitors mean it:

Codex does support arbitrary MCP servers — codex mcp add, or a [mcp_servers.<name>] block in ~/.codex/config.toml, stdio or HTTP transport, shared across the CLI, IDE extension, and desktop app. That’s the seam every tool below (and NeuralMind, in principle) plugs into.

The three tools that filled it

Hindsight (vectorize-io, MIT, 23.9k stars) is the most coding-CLI-native of the three. It builds a per-repo memory bank two ways at once: mining git history automatically and accumulating live session context, with no setup command — install the npm package and ingestion starts. Its three operations are retain (LLM extracts facts, entities, relationships, and temporal data, then embeds them), recall (four parallel strategies — semantic, BM25, graph-based, temporal — merged and reranked), and reflect (an LLM synthesis pass that finds connections across memories, e.g. for risk assessment or pattern recognition). It exposes an MCP endpoint per memory bank and explicitly supports Codex CLI, Claude Code, Cursor CLI, GitHub Copilot CLI, opencode, and Cline CLI. Storage is PostgreSQL with pgvector (or Oracle AI Database 23ai) — a real database server, not an embedded file. Nothing in its documentation describes AST parsing or call-graph extraction; it operates entirely at the fact/entity level.

Mem0 for Codex is not a separate product — it’s Mem0 (the same conversational-memory layer compared elsewhere on this site), reachable from Codex via a hosted MCP endpoint ([mcp_servers.mem0], url = "https://mcp.mem0.ai/mcp") exposing nine tools (add_memory, search_memories, etc.). What it adds over Codex’s native memories: cross-machine sync, semantic (embedding) search instead of grep, no 32KiB ceiling, and one memory backend shared across Codex and other MCP clients. It is general user/fact memory wired into a new host, not a new architecture.

Basic Memory takes a different shape: plain markdown files as the source of truth, organized by project, with semantic search across notes. It runs as a local MCP subprocess or a hosted cloud endpoint. Notes Codex creates are “immediately available in Claude Code, Cursor, Claude Desktop, or any MCP client” — the interoperability angle is its main pitch. Its public docs don’t describe code-structure analysis either; it reads as a persistent notes/knowledge-base layer an agent (or a human) writes into, closer in spirit to Graft’s “folder of plain-English markdown nodes” than to a retrieval index, but without Graft’s tree-sitter structural pass underneath it.

How NeuralMind differs from all three

The pattern across Hindsight, Mem0, and Basic Memory is the same one this site’s Mem0/Zep comparison already names: they remember facts, entities, and notes, extracted or written by an LLM (or a human, for Basic Memory), not code structure. None of them:

Where NeuralMind’s synapse layer and Memory Layer sit relative to this group:

Dimension Hindsight Mem0 (Codex) Basic Memory NeuralMind
Parses source code / builds a call graph No No No Yes — tree-sitter, 10 languages
Ranked-file retrieval against a gold-file oracle No No No Yes — CI-gated, reproducible
Extraction mechanism LLM (retain), LLM synthesis (reflect) LLM (single-pass extraction) Manual / agent-written notes Explicit record; local ONNX embeddings, no LLM
Storage PostgreSQL + pgvector (or Oracle AI DB) Hosted (Mem0 platform) or self-hosted Local markdown files, or hosted cloud Local SQLite + files (.neuralmind/)
Requires a database server Yes No (hosted) / Yes (self-hosted) No No
Bootstraps from git history automatically Yes No No No — static graph from current tree; usage-learning starts at zero
Setup on Codex npm package, zero-config ingestion One [mcp_servers] block One [mcp_servers] block One [mcp_servers] block — config + protocol confirmed working; a live Codex agent turn is not
Cross-agent portability Yes (multi-CLI MCP) Yes (multi-CLI MCP) Yes (multi-CLI MCP) Yes (.neuralmind-team-memory.json, git-portable)
License MIT Apache 2.0 Not publicly specified in docs MIT (core); source-available commercial modules for Team tier
GitHub stars (point-in-time) 23.9k 65k+ (Mem0 overall) Not found in docs —

When to pick which

Pick Hindsight if: you want a memory layer built specifically for coding-agent CLIs, with git-history mining giving you something useful immediately, and you’re fine running Postgres to get four-strategy recall and an LLM-driven “reflect” synthesis step. It’s the most direct answer to “give my coding agent memory” available today, and it’s MIT-licensed and self-hostable — no lock-in.

Pick Mem0 for Codex if: you already use Mem0 elsewhere (a product with a conversational agent, say) and want the same user/fact memory reachable from your coding CLI too. Not a reason to choose it for coding specifically.

Pick Basic Memory if: what you actually want is a shared, human- and agent-editable notes layer — a wiki your agent can read and write — rather than an automatically-built index of anything.

Pick NeuralMind if: the problem is “the agent doesn’t know this codebase’s structure and re-explores it every session,” not “the agent doesn’t remember facts about me or past conversations.” None of the three above touch that problem at all — they’re all note/fact layers wearing coding-CLI integrations, not code-structure engines.

On Codex specifically, today: codex mcp add neuralmind -- neuralmind-mcp produces the correct config.toml entry, codex doctor reports the server as configured and enabled, and speaking the MCP protocol directly to the same binary (the official mcp Python SDK’s stdio client — the same class of client Codex’s own Rust MCP client implements against the identical spec) confirms initialize, a 25-tool tools/list, and real tool calls all succeed, Memory Layer tools included. That’s real evidence, not speculation — but it stops short of watching Codex’s own agent invoke a tool mid-conversation, which needs a live OpenAI API key. Still listed as “Theoretical” in the host table) for that reason, but this is a materially stronger “Theoretical” than an unregistered guess.

The honest caveats

See also