我是终端用codex,安装后,配置了mcp就能自动保存会话吗
需要什么触发命令吗,为什么我几轮对话退出后在dashbord里没有对话记录, windows 10 ,powershell终端
Codex 本身没有 hooks 系统,所以仅配置 MCP 不会自动保存对话记录。MCP 只是让 Codex 能访问 memorix 的工具,但需要 Codex 主动调用 memorix_store / memorix_search 才会产生记忆。
让 Codex 自动调用 memorix 的方法
在项目根目录创建(或追加到) AGENTS.md 文件,加入以下内容:
`markdown
Memorix Automatic Memory Rules
You have access to Memorix memory tools. Follow these rules:
Session Start
At the beginning of every conversation, call memorix_search with a query related to the current task.
During Session
Call memorix_store when:
- A bug is identified and resolved
- An architecture decision is made
- Something unexpected is discovered
- Configuration changes
Session End
When the conversation ends, call memorix_store with type session-request to record what was accomplished. `
也可以直接运行:
ash memorix hooks install --agent codex
这会自动在项目下生成 AGENTS.md,包含上述规则。Codex 读取 AGENTS.md 后会按指令主动调用 memorix 工具。
Dashboard 没有记录的原因
Dashboard 显示的是 memorix 存储的 observations 数据。如果 Codex 从未调用过 memorix_store(因为没有 AGENTS.md 引导它这样做),那 Dashboard 里自然没有数据。配置好 AGENTS.md 后再试一次,应该能看到记录。
Closing as answered and documented. If you can still reproduce this with the current version and setup docs, please open a new issue with your exact Codex config and repo layout.