Closes #350 - Add plugins/codex/ with complete plugin structure: - .codex-plugin/plugin.json: Codex plugin manifest - reme/.mcp.json: MCP server connection config - reme/hooks/hooks.json: Stop hook configuration - reme/hooks/auto_memory.py: Session recording hook - reme/skills/reme-memory/SKILL.md: Memory recall skill - README.md: Installation and troubleshooting guide - Plugin follows the same architecture as the Claude Code plugin: - Connects to a shared ReMe MCP server (streamable-http) - Stop hook auto-records sessions via auto_memory_cc - SKILL.md provides recall patterns (semantic, topological, state) - Best-effort recording with daemonized execution - Uses CODEX_PLUGIN_ROOT env var (vs CLAUDE_PLUGIN_ROOT) - Supports REME_HOST/REME_PORT env overrides Test: not run (requires Codex runtime for integration testing) |
||
|---|---|---|
| .. | ||
| .codex-plugin | ||
| reme | ||
| README.md | ||
ReMe Plugin for Codex
Connect Codex to ReMe — file-native long-term memory for AI agents. The plugin gives Codex recall (read long-term memory) and records every session automatically via a Stop hook.
What you get
- MCP tools from the
remeserver:search,traverse,daily_list,frontmatter_read,read,auto_memory_cc, and more. - Stop hook (
hooks/auto_memory.py) — when a session ends it calls ReMe's server-sideauto_memory_cctool in a detached background process. Recording is fully automatic and asynchronous. - Skill
reme-memory— recall long-term memory before answering (semanticsearch, topologicaltraverse, statedaily_list/frontmatter_read, thenreadwith citations), plus a server status check.
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 sessions.
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
Copy the plugins/codex/ directory to your Codex plugins location and install:
# Clone or copy the plugin directory
cp -r plugins/codex/ ~/.codex/plugins/reme/
# Configure MCP connection
# The .mcp.json is already bundled with the plugin
Restart Codex, then verify the reme server and its tools are connected. The reme-memory skill can then recall memory and report server health.
Plugin Structure
plugins/codex/
├── .codex-plugin/
│ └── plugin.json # Codex plugin manifest
├── hooks/
│ ├── hooks.json # Stop hook configuration
│ └── auto_memory.py # Session recording hook
├── skills/
│ └── reme-memory/
│ └── SKILL.md # Memory recall skill
├── .mcp.json # MCP server connection
└── README.md # This file
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). Override withREME_HOST/REME_PORTenv vars. - The Stop hook needs
python3onPATH. It logs toplugins/codex/hooks/auto_memory_hook.log. - The MCP tool-name prefix may include the server segment depending on your Codex version; the skill uses the wildcard pattern so it works either way.
- Recording is best-effort: if the server is down, the hook logs and gives up silently without blocking the session.
Troubleshooting
Tools not showing up
- Verify ReMe is running:
curl -s http://127.0.0.1:2333/health_check - Check the MCP server URL in
.mcp.jsonmatches your ReMe port - Restart Codex after installing the plugin
Stop hook not recording
- Check the log:
cat plugins/codex/hooks/auto_memory_hook.log - Verify
python3is on PATH - Ensure the ReMe server is running when you end a session
Connection refused
The MCP server may not be running. Start it with:
reme start service.backend=mcp service.transport=streamable-http
Then retry.