这段时间重度用 codex ,从 cluade 迁移过来遇到一个小问题,没有 CLAUDE.local.md 这样的机制。 agents.override.md 会覆盖同目录的 agents.md 。
花了点时间研究了下 codex 的 hook 机制,弄了一个小工具,用了 2 天觉得还不错。
你只需要 uncommit 的内容写入到 AGENTS.local.md codex 会在 SessionStart 和 UserPromptSubmit 时候,检测对应目录下的 AGENTS.local.md 如果有就会合并为 AGENTS.override.md
代码在这里: https://github.com/samzong/codex-agents-local
Read https://github.com/samzong/codex-agents-local/blob/main/INSTALL_PROMPT.md
Follow that prompt in your Codex to install without changing your existing `codex` entry point.