Skip to main content

Codex

Add Walrus Memory to Codex so it recalls context and saves durable facts as you work. Install it as MCP-only (recommended; just the tools, one config block, no repo to clone) or as a full plugin (adds automatic-memory hooks, but currently requires cloning the repo).

  • Node.js 20+
  • A Walrus Memory account. The first memory tool call opens a browser sign-in (memwal_login).

Installation

Add to ~/.codex/config.toml:

[mcp_servers.memwal]
command = "npx"
args = ["-y", "@mysten-incubation/memwal-mcp"]

Restart Codex, then ask the agent to run memwal_login on first use. The memory tools are proactive, so this is enough for automatic save and recall.

warning

Do not combine both options: the plugin installer already registers [mcp_servers.memwal]. Adding it again creates a duplicate server.

What the plugin includes

ComponentPluginMCP-only
Walrus Memory MCP (memory tools)
Lifecycle hooks (automatic recall/save)

MCP-only still saves and recalls on its own because the tools are proactive. The plugin adds hooks that reinforce the behavior and make the agent prefer Walrus Memory over any built-in memory.

Available tools

ToolDescription
memwal_rememberSave a durable fact (preference, decision, constraint, identity).
memwal_remember_bulkSave several distinct facts in one call.
memwal_recallSemantic search across stored memories for relevant context.
memwal_analyzeExtract and save multiple facts from a passage of text.
memwal_restoreRebuild the search index from Walrus (recovery).
memwal_healthFast connectivity check.
memwal_login / memwal_logoutConnect or disconnect this client.

See Reference for full parameters.

Lifecycle hooks (plugin only)

HookEventWhat it does
Session startSessionStartAnnounces that memory is active and reminds the agent to use the memwal_* tools.
User promptUserPromptSubmitDetects when your message references past work or states a durable fact, and reminds the agent to recall or save.
Post-toolPostToolUse (Bash)When a command errors, reminds the agent to recall prior fixes and save the resolution.

Verify

Ask the agent what MCP tools it has available. You should see the memwal_* tools, including memwal_remember_bulk and memwal_health. Then state a durable fact and confirm the agent saves it with memwal_remember.

Troubleshooting

  • Tools missing: restart Codex.
  • Duplicate memwal errors: you have both the plugin and a manual [mcp_servers.memwal]; remove the manual entry.
  • Hooks not firing: confirm codex_hooks = true under [features] in ~/.codex/config.toml, and that you restarted Codex.
  • memwal_recall returns nothing although you saved before: run memwal_restore <namespace> to rebuild the index from Walrus.