Overview
Switch between Codex, Claude Code, Gemini, and Cursor without losing context. The recommended Codex setup is hybrid: install the package for Context Bundle / Working Memory, automatic Codex thread capture, bundled local MCP, and nmem fallback. Codex desktop app and Codex CLI share the same ~/.codex configuration, so the same connector applies to both. If you use remote Mem or a custom local port, override the bundled MCP server in Codex config.
Setup
codex plugin marketplace add nowledge-co/community
codex plugin add nowledge-mem@nowledge-community
Legacy Codex fallback:
codex marketplace add nowledge-co/community
If your Codex build does not expose codex plugin add, open /plugins and install nowledge-mem@nowledge-community from there.
Then enable the plugin in ~/.codex/config.toml:
[features]
plugins = true
hooks = true
plugin_hooks = true
[plugins."nowledge-mem@nowledge-community"]
enabled = true
Enable automatic thread capture:
HOOK_SETUP="$(find ~/.codex/plugins/cache -path '*/nowledge-mem/*/scripts/install_hooks.py' -print 2>/dev/null | sort | tail -1)"
test -n "$HOOK_SETUP" && python3 "$HOOK_SETUP"
On Windows PowerShell, find the same installed script and run py -3 $HookSetup.FullName.
plugin_hooks = true lets Codex load the Stop hook shipped inside the plugin. The setup script also keeps the host-level fallback for Codex builds that still need it; duplicate hook sources are guarded so the same transcript state is not saved twice.
Restart Codex and ask "What was I working on?" to verify. The plugin includes the default local MCP endpoint.
For remote Mem, configure nmem once and generate the Codex MCP override:
nmem config client set url https://your-server
nmem config client set api-key your-key
nmem config mcp show --host codex
Update
If you installed the Codex package before 0.1.13, marketplace update alone may refresh the source checkout without replacing the installed package cache. Install or update the package with codex plugin add nowledge-mem@nowledge-community, or use Codex /plugins, then restart Codex and run the hook setup.
codex plugin marketplace upgrade nowledge-community
codex plugin add nowledge-mem@nowledge-community
HOOK_SETUP="$(find ~/.codex/plugins/cache -path '*/nowledge-mem/*/scripts/install_hooks.py' -print 2>/dev/null | sort | tail -1)"
test -n "$HOOK_SETUP" && python3 "$HOOK_SETUP"
If the marketplace is not registered yet:
codex plugin marketplace add nowledge-co/community || codex marketplace add nowledge-co/community
Import Older Sessions
nmem t sync --from codex --all-projects --limit 20
nmem t sync --from codex --all-projects --apply
Use -p /path/to/project instead of --all-projects when you only want one project.
Skills
- Context Bundle / Working Memory: reliable session-start bootstrap
- Search: strongest when the Codex package is paired with MCP
- Save thread: Stop hook imports the real Codex transcript; the skill remains the manual fallback
- Distill: stronger when Codex can choose MCP memory-write tools directly
- Status: check connectivity