* feat(plugin): add ReMe integration for Codex * fix(plugin): fix Codex plugin port, transcript ingestion, and Windows support * fix(plugin): correct Codex transcript schema, path validation, and hook fixes * test(plugin): add MCP round-trip tests * fix(plugin): rewrite parser and tests. * fix(plugin): reserve id-less messages, cover marketplace manifest, error handling, path fixes, and main sync Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| reme | ||
| README.md | ||
ReMe plugin for Codex
Connect Codex to ReMe — file-native long-term memory
for AI agents. The plugin gives the agent recall (read long-term memory) and records every
session automatically via a Stop hook. Consolidation of daily notes into long-term digest/
knowledge runs server-side in ReMe.
What you get
- MCP tools from the
remeserver:search,traverse,daily_list,frontmatter_read,read,auto_memory_codex, and more. - Stop hook (
hooks/auto_memory.py) — when a session ends it calls ReMe's server-sideauto_memory_codextool in a detached background process, passing the session id and transcript path from Codex's hook payload. The server reads the transcript JSONL and records the durable facts into today's daily note. Recording is fully automatic and asynchronous — the agent never records by hand, and stopping is never delayed. Best-effort: if the server is down it logs and gives up silently. - Skill
reme-memory— recall long-term memory before answering (semanticsearch, topologicaltraverse, statedaily_list/frontmatter_read, thenreadwith citations), plus a server status check. Recording is handled silently by the Stop hook.
Deployment model
The plugin connects to a shared HTTP MCP server you start once — it does not spawn ReMe. One server means one set of background watchers / dream cron across all your Codex windows.
Prerequisites
-
Install ReMe (Python 3.11+):
pip install "reme-ai[core]" -
Configure model credentials in a
.env(seeexample.env):EMBEDDING_API_KEY=sk-xxx EMBEDDING_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1 LLM_API_KEY=sk-xxx LLM_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1 -
Start the ReMe MCP server (one time, leave it running):
reme start service.backend=mcp service.transport=streamable-httpIt serves
http://127.0.0.1:2333/mcp. To use a different port, start withservice.port=<port>and update theurlin.mcp.jsonto match.
Install the plugin
codex plugin marketplace add agentscope-ai/ReMe
Then start a Codex session, type /plugins, find "ReMe Memory" in the marketplace tab, and install
it. Restart Codex, then confirm the reme MCP server tools are available (e.g. search,
traverse). The reme-memory skill can then recall memory and report server health.
Trust the plugin hook
Codex skips hooks from non-managed plugins until you explicitly trust them. After installing,
open /hooks in Codex, find the ReMe Stop hook, review it, and mark it as trusted. Without
this step the automatic background recording is silently disabled — the skill will still be able
to recall memory, but new sessions will not be recorded.
Supported platforms
- macOS / Linux: full support. The Stop hook double-forks so recording never blocks shutdown.
- Windows: supported with Python 3 on
PATH. The hook re-spawns itself as a detached subprocess (CREATE_NEW_PROCESS_GROUP) to avoid blocking.
Notes
- The plugin's MCP server URL lives in
plugins/codex/reme/.mcp.json. Keep it in sync with how you start ReMe (host/port). The Stop hook reads this same file to find the server (override withREME_HOST/REME_PORTenv vars). - The Stop hook needs
python3onPATH(usepythonon Windows). The hook receivesPLUGIN_ROOT(andCLAUDE_PLUGIN_ROOTas a compat alias). It logs toplugins/codex/reme/logs/auto_memory_hook.log. - The MCP tool-name prefix (
mcp__reme__…) may include the server segment depending on your Codex version; the skill uses themcp__reme__*wildcard so it works either way.