























@@ -183,18 +183,23 @@ in every user turn. Codex loads `AGENTS.md` through its own project-doc
183183discovery. `SOUL.md`, `IDENTITY.md`, `TOOLS.md`, and `USER.md` are forwarded as
184184Codex developer instructions. `HEARTBEAT.md` content is not injected; heartbeat
185185turns get a collaboration-mode note pointing to the file when it exists and is
186-non-empty. `MEMORY.md` and active `BOOTSTRAP.md` content keep the normal
187-turn-context role for now.
186+non-empty. `MEMORY.md` content from the configured agent workspace is not pasted
187+into every native Codex turn; when memory tools are available for that workspace,
188+Codex turns get a small workspace-memory note and should use `memory_search` or
189+`memory_get` when durable memory is relevant. If tools are disabled, memory
190+search is unavailable, or the active workspace differs from the agent memory
191+workspace, `MEMORY.md` falls back to the normal bounded turn-context path. Active
192+`BOOTSTRAP.md` content keeps the normal turn-context role for now.
188193189194On non-Codex harnesses, bootstrap files continue to be composed into the
190195OpenClaw prompt according to their existing gates. `HEARTBEAT.md` is omitted on
191196normal runs when heartbeats are disabled for the default agent or
192197`agents.defaults.heartbeat.includeSystemPromptSection` is false. Keep injected
193-files concise, especially `MEMORY.md`. `MEMORY.md` is intended to stay a curated
194-long-term summary; detailed daily notes belong in `memory/*.md` where
198+files concise, especially non-Codex `MEMORY.md`. `MEMORY.md` is intended to stay
199+a curated long-term summary; detailed daily notes belong in `memory/*.md` where
195200`memory_search` and `memory_get` can retrieve them on demand. Oversized
196-`MEMORY.md` files increase prompt usage and can be partially injected because of
197-the bootstrap file limits below.
201+non-Codex `MEMORY.md` files increase prompt usage and can be partially injected
202+because of the bootstrap file limits below.
198203199204<Note>
200205`memory/*.md` daily files are **not** part of the normal bootstrap Project Context. On ordinary turns they are accessed on demand via the `memory_search` and `memory_get` tools, so they do not count against the context window unless the model explicitly reads them. Bare `/new` and `/reset` turns are the exception: the runtime can prepend recent daily memory as a one-shot startup-context block for that first turn.
@@ -209,11 +214,13 @@ occurs, OpenClaw can inject a concise system-prompt warning notice; control this
209214default: `always`). Detailed raw/injected counts stay in diagnostics such as
210215`/context`, `/status`, doctor, and logs.
211216212-For memory files, truncation is not data loss: the file remains intact on disk,
213-but the model only sees the shortened injected copy until it reads or searches
214-memory directly. If `MEMORY.md` is repeatedly truncated, distill it into a
215-shorter durable summary and move detailed history into `memory/*.md`, or
216-intentionally raise the bootstrap limits.
217+For memory files, truncation is not data loss: the file remains intact on disk.
218+On native Codex, `MEMORY.md` is read on demand through memory tools when
219+available, with bounded prompt fallback when tools cannot run. On other
220+harnesses, the model only sees the shortened injected copy until it reads or
221+searches memory directly. If `MEMORY.md` is repeatedly truncated there, distill
222+it into a shorter durable summary and move detailed history into `memory/*.md`,
223+or intentionally raise the bootstrap limits.
217224218225Sub-agent sessions only inject `AGENTS.md` and `TOOLS.md` (other bootstrap files
219226are filtered out to keep the sub-agent context small).
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。