Skip to content

Commit 966e09a

Browse files
LEON-gittechsa-buc
authored andcommitted
Update README with 0.125.4 memory features: compaction protocol, directive priority, bounded overlay, file locking, merge-write
1 parent ef6d65e commit 966e09a

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

README.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,17 @@ This is a correctness-focused patch: the UI should not render output from the wr
6868

6969
### 3. Consolidated memory subsystem
7070

71-
From commits `9f800e44`, `a46f1e68`:
71+
From commits `9f800e44`, `a46f1e68`, `f8987ce`:
7272

73-
Three new subsystems inspired by Claude Code and oh-my-codex:
73+
Four new subsystems inspired by Claude Code and oh-my-codex:
7474

7575
- **AGENTS.md Hierarchical Loading** — Loads instruction files from four scopes (Managed → User → Project → Local), with `@include` directive expansion (10-depth limit, circular detection), YAML frontmatter parsing, and mtime-based caching. Injected into user instructions at session start.
7676

77-
- **Notepad Section System** — A structured scratchpad (`~/.codex/memories/notepad.md`) with three sections: PRIORITY (auto-injected into developer context, ≤500 chars), WORKING MEMORY (timestamped session notes, auto-prunable), and MANUAL (permanent notes). Uses atomic writes for crash safety.
77+
- **Notepad Section System** — A structured scratchpad (`~/.codex/memories/notepad.md`) with three sections: PRIORITY (auto-injected into developer context, ≤500 chars), WORKING MEMORY (timestamped session notes, auto-prunable), and MANUAL (permanent notes). Uses atomic writes with directory-based file locking (PID stale detection) for crash safety and concurrent access safety.
7878

79-
- **Memory CRUD Tools** — Eight built-in tools (`memory_read/write/add_note/search`, `notepad_read/write_priority/write_working/prune`) that let the agent actively read and write its own memory during a session. Gated behind the `MemoryTool` feature flag. TUI integration via `/memories list|add|edit|clear`.
79+
- **Memory CRUD Tools** — Eight built-in tools (`memory_read/write/add_note/search`, `notepad_read/write_priority/write_working/prune`) that let the agent actively read and write its own memory during a session. Enabled by default. TUI integration via `/memories list|add|edit|clear`. `memory_write` supports `merge: true` to append content while preserving existing frontmatter.
80+
81+
- **Memory Overlay & Reliability** — Directive priority (`priority: high` in topic frontmatter) auto-injects up to 3 high-priority directives into the agent's context. Bounded overlay caps developer instructions at 3500 chars. Compaction survival protocol instructs the agent to checkpoint key state before context compression.
8082

8183
This directly addresses roadmap item 3 (better memory mechanics).
8284

@@ -248,15 +250,17 @@ Codex CLI 是开源的,但上游仓库当前对外部代码贡献采用 invita
248250

249251
### 3. 合并 memory 子系统
250252

251-
来自 commits `9f800e44``a46f1e68`
253+
来自 commits `9f800e44``a46f1e68``f8987ce`
252254

253-
借鉴 Claude Code 和 oh-my-codex,新增三个子系统
255+
借鉴 Claude Code 和 oh-my-codex,新增四个子系统
254256

255257
- **AGENTS.md 层级加载** — 从四个作用域加载指令文件(Managed → User → Project → Local),支持 `@include` 指令展开(10 层深度限制、循环检测)、YAML frontmatter 解析、mtime 缓存。在 session 启动时注入 user instructions。
256258

257-
- **Notepad 分区系统** — 结构化草稿本(`~/.codex/memories/notepad.md`),三个分区:PRIORITY(自动注入 developer 上下文,≤500 字)、WORKING MEMORY(时间戳条目,可自动修剪)、MANUAL(永久笔记)。使用原子写入保证崩溃安全。
259+
- **Notepad 分区系统** — 结构化草稿本(`~/.codex/memories/notepad.md`),三个分区:PRIORITY(自动注入 developer 上下文,≤500 字)、WORKING MEMORY(时间戳条目,可自动修剪)、MANUAL(永久笔记)。使用原子写入 + 目录锁(PID 过期检测)保证崩溃安全和并发安全。
260+
261+
- **Memory CRUD 内置工具** — 8 个内置工具(`memory_read/write/add_note/search``notepad_read/write_priority/write_working/prune`),让 agent 在 session 中主动读写自己的 memory。默认启用。TUI 集成通过 `/memories list|add|edit|clear` 使用。`memory_write` 支持 `merge: true` 追加内容不覆盖已有记录。
258262

259-
- **Memory CRUD 内置工具**8 个内置工具(`memory_read/write/add_note/search``notepad_read/write_priority/write_working/prune`),让 agent 在 session 中主动读写自己的 memory。通过 `MemoryTool` feature flag 控制。TUI 集成通过 `/memories list|add|edit|clear` 使用
263+
- **Memory Overlay 与可靠性**指令优先级(topic frontmatter 中 `priority: high`)自动注入最多 3 条高优先级指令到 agent 上下文。Bounded overlay 限制 developer instructions 上限 3500 字符。上下文压缩生存协议指示 agent 在压缩前主动保存关键状态
260264

261265
直接完成了路线图第 3 项(更好的 memory 机制)。
262266

0 commit comments

Comments
 (0)