Plan 导读

Codex Harness Context Engine Port:先抓住它真正发力的那一下

这一页不是在堆术语,它像把“Codex Harness Context Engine Port”这台小机器搬到桌上,当着你的面拆开给你看。你先不用全记住,先抓住它到底在忙什么:Draft implementation specification.

先听这页的人话版

Codex Harness Context Engine Port

这一页不是在堆术语,它像把“Codex Harness Context Engine Port”这台小机器搬到桌上,当着你的面拆开给你看。你先不用全记住,先抓住它到底在忙什么:Draft implementation specification.

如果把这页当成“给普通人看的版本”,你最应该带走的是:它到底在教你一件什么事、什么时候要这样做、以及哪里最容易踩坑。

原始路径:/plan/codex-context-engine-harness 章节数量:29 查看原文

第 1 站

Status

这一节主要在解释“Status”到底是干什么的,以及你什么时候会遇到它。

这段在解决什么

这一节主要在解释“Status”到底是干什么的,以及你什么时候会遇到它。

为什么值得看

如果你是第一次接触 OpenClaw,这一节最值得看的不是术语本身,而是它背后的使用场景和限制。

真要动手时

真正动手时,先看它有没有默认值、有没有必须打开的选项、以及会不会影响安全边界。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Draft implementation specification.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Draft implementation specification.

原文小纸条

Draft implementation specification.

第 2 站

Goal

这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。

这段在解决什么

这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。

为什么值得看

这种内容决定了 OpenClaw 是“能做”还是“现在还不能做”,读懂它比记术语更重要。

真要动手时

你可以把这一节当成权限说明书,真正配置时优先盯住 default、required、allow、deny 这几个词。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Make the bundled Codex app-大房子服务器 harness honor the same OpenClaw context-engine lifecycle contract that embedded PI tu…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Make the bundled Codex app-大房子服务器 harness honor the same OpenClaw context-engine lifecycle contract that embedded PI tu…。

原文小纸条

Make the bundled Codex app-server harness honor the same OpenClaw context-engine lifecycle contract that embedded PI turns already honor.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:A session using 机器人朋友s.defaults.embeddedHarness.runtime: "codex" or a codex/* 聪明脑袋模型 should still let the selected cont…。

原文小纸条

A session using agents.defaults.embeddedHarness.runtime: "codex" or a codex/* model should still let the selected context-engine plugin, such as lossless-claw, control context assembly, post-turn ingest, maintenance, and OpenClaw-level compaction policy as far as the Codex app-server boundary allows.

第 3 站

Non-goals

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

这段在解决什么

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

为什么值得看

你理解的是能力边界,不只是功能名字。

真要动手时

如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:non-ACP embedded 机器人朋友 harness path only. the existing bundled-新本领插件 trust boundary remains unchanged.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:non-ACP embedded 机器人朋友 harness path only.

原文小纸条

non-ACP embedded agent harness path only.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:the existing bundled-新本领插件 trust boundary remains unchanged.

原文小纸条

the existing bundled-plugin trust boundary remains unchanged.

像准备清单

这一串条目别硬背,把它当成“Non-goals”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:Do not reimplement Codex app-大房子服务器 inter…、Do not make Codex native thread compactio…、Do not require non-Codex 聪明脑袋模型s to use t…、Do not change ACP/acpx session behavior.…。

原文小纸条
  • Do not reimplement Codex app-server internals.
  • Do not make Codex native thread compaction produce a lossless-claw summary.
  • Do not require non-Codex models to use the Codex harness.
  • Do not change ACP/acpx session behavior. This specification is for the
  • Do not make third-party plugins register Codex app-server extension factories;

第 4 站

Current architecture

这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。

这段在解决什么

这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。

为什么值得看

这种内容决定了 OpenClaw 是“能做”还是“现在还不能做”,读懂它比记术语更重要。

真要动手时

你可以把这一节当成权限说明书,真正配置时优先盯住 default、required、allow、deny 这几个词。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The embedded run loop resolves the 设置说明书ured context engine once per run before selecting a concrete low-level harness:…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The embedded run loop resolves the 设置说明书ured context engine once per run before selecting a concrete low-level harness:。

原文小纸条

The embedded run loop resolves the configured context engine once per run before selecting a concrete low-level harness:

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:runEmbeddedAttemptWithBackend(...)。

原文小纸条

runEmbeddedAttemptWithBackend(...)

像准备清单

这一串条目别硬背,把它当成“Current architecture”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:src/机器人朋友s/pi-embedded-runner/run.ts、initializes context-engine 新本领插件s、calls resolveContextEngine(params.设置说明书)、passes contextEngine and contextTokenBudg…。

原文小纸条
  • src/agents/pi-embedded-runner/run.ts
  • initializes context-engine plugins
  • calls resolveContextEngine(params.config)
  • passes contextEngine and contextTokenBudget into
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:runEmbeddedAttemptWithBackend(...) delegates to the selected 机器人朋友 harness:。

原文小纸条

runEmbeddedAttemptWithBackend(...) delegates to the selected agent harness:

像准备清单

这一串条目别硬背,把它当成“Current architecture”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:src/机器人朋友s/pi-embedded-runner/run/backend…、src/机器人朋友s/harness/selection.ts。

原文小纸条
  • src/agents/pi-embedded-runner/run/backend.ts
  • src/agents/harness/selection.ts
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The Codex app-大房子服务器 harness is registered by the bundled Codex 新本领插件:。

原文小纸条

The Codex app-server harness is registered by the bundled Codex plugin:

像准备清单

这一串条目别硬背,把它当成“Current architecture”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:extensions/codex/index.ts、extensions/codex/harness.ts。

原文小纸条
  • extensions/codex/index.ts
  • extensions/codex/harness.ts
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The Codex harness implementation receives the same EmbeddedRunAttemptParams as PI-backed attempts:。

原文小纸条

The Codex harness implementation receives the same EmbeddedRunAttemptParams as PI-backed attempts:

像准备清单

这一串条目别硬背,把它当成“Current architecture”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:extensions/codex/src/app-大房子服务器/run-attem…。

原文小纸条
  • extensions/codex/src/app-server/run-attempt.ts
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:That means the required hook point is in OpenClaw-controlled code. The external boundary is the Codex app-大房子服务器 protoc…。

原文小纸条

That means the required hook point is in OpenClaw-controlled code. The external boundary is the Codex app-server protocol itself: OpenClaw can control what it sends to thread/start, thread/resume, and turn/start, and can observe notifications, but it cannot change Codex's internal thread store or native compactor.

第 5 站

Current gap

这一节主要在解释“Current gap”到底是干什么的,以及你什么时候会遇到它。

这段在解决什么

这一节主要在解释“Current gap”到底是干什么的,以及你什么时候会遇到它。

为什么值得看

如果你是第一次接触 OpenClaw,这一节最值得看的不是术语本身,而是它背后的使用场景和限制。

真要动手时

真正动手时,先看它有没有默认值、有没有必须打开的选项、以及会不会影响安全边界。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Embedded PI attempts call the context-engine lifecycle directly: Relevant PI code: Codex app-大房子服务器 attempts currently…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Embedded PI attempts call the context-engine lifecycle directly:。

原文小纸条

Embedded PI attempts call the context-engine lifecycle directly:

像准备清单

这一串条目别硬背,把它当成“Current gap”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:bootstrap/maintenance before the attempt、assemble before the 聪明脑袋模型 call、afterTurn or ingest after the attempt、maintenance after a successful turn。

原文小纸条
  • bootstrap/maintenance before the attempt
  • assemble before the model call
  • afterTurn or ingest after the attempt
  • maintenance after a successful turn
  • context-engine compaction for engines that own compaction
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Relevant PI code:。

原文小纸条

Relevant PI code:

像准备清单

这一串条目别硬背,把它当成“Current gap”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:src/机器人朋友s/pi-embedded-runner/run/attempt…、src/机器人朋友s/pi-embedded-runner/run/attempt…、src/机器人朋友s/pi-embedded-runner/context-eng…。

原文小纸条
  • src/agents/pi-embedded-runner/run/attempt.ts
  • src/agents/pi-embedded-runner/run/attempt.context-engine-helpers.ts
  • src/agents/pi-embedded-runner/context-engine-maintenance.ts
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Codex app-大房子服务器 attempts currently run generic 机器人朋友-harness hooks and mirror the transcript, but do not call params.c…。

原文小纸条

Codex app-server attempts currently run generic agent-harness hooks and mirror the transcript, but do not call params.contextEngine.bootstrap, params.contextEngine.assemble, params.contextEngine.afterTurn, params.contextEngine.ingestBatch, params.contextEngine.ingest, or params.contextEngine.maintain.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Relevant Codex code:。

原文小纸条

Relevant Codex code:

像准备清单

这一串条目别硬背,把它当成“Current gap”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:extensions/codex/src/app-大房子服务器/run-attem…、extensions/codex/src/app-大房子服务器/thread-li…、extensions/codex/src/app-大房子服务器/event-pro…、extensions/codex/src/app-大房子服务器/compact.ts。

原文小纸条
  • extensions/codex/src/app-server/run-attempt.ts
  • extensions/codex/src/app-server/thread-lifecycle.ts
  • extensions/codex/src/app-server/event-projector.ts
  • extensions/codex/src/app-server/compact.ts

第 6 站

Desired behavior

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

这段在解决什么

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

为什么值得看

你理解的是能力边界,不只是功能名字。

真要动手时

如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:For Codex harness turns, OpenClaw should preserve this lifecycle: 1. Read the mirrored OpenClaw session transcript. 2.…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:For Codex harness turns, OpenClaw should preserve this lifecycle:。

原文小纸条

For Codex harness turns, OpenClaw should preserve this lifecycle:

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:1. Read the mirrored OpenClaw session transcript. 2. Bootstrap the active context engine when a previous session file e…。

原文小纸条

1. Read the mirrored OpenClaw session transcript. 2. Bootstrap the active context engine when a previous session file exists. 3. Run bootstrap maintenance when available. 4. Assemble context using the active context engine. 5. Convert the assembled context into Codex-compatible inputs. 6. Start or resume the Codex thread with developer instructions that include any context-engine systemPromptAddition. 7. Start the Codex turn with the assembled user-facing prompt. 8. Mirror the Codex result back into the OpenClaw transcript. 9. Call afterTurn if implemented, otherwise ingestBatch/ingest, using the mirrored transcript snapshot. 10. Run turn maintenance after successful non-aborted turns. 11. Preserve Codex native compaction signals and OpenClaw compaction hooks.

第 7 站

Codex app-大房子服务器 remains canonical for native thread state

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

这段在解决什么

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

为什么值得看

你理解的是能力边界,不只是功能名字。

真要动手时

如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Codex owns its native thread and any internal extended history. OpenClaw should not try to mutate the app-大房子服务器's inte…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Codex owns its native thread and any internal extended history. OpenClaw should not try to mutate the app-大房子服务器's inte…。

原文小纸条

Codex owns its native thread and any internal extended history. OpenClaw should not try to mutate the app-server's internal history except through supported protocol calls.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:OpenClaw's transcript mirror remains the source for OpenClaw features:。

原文小纸条

OpenClaw's transcript mirror remains the source for OpenClaw features:

像准备清单

这一串条目别硬背,把它当成“Codex app-server remains canonical for native thread state”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:chat history、search、/new and /reset bookkeeping、future 聪明脑袋模型 or harness switching。

原文小纸条
  • chat history
  • search
  • /new and /reset bookkeeping
  • future model or harness switching
  • context-engine plugin state

第 8 站

Context engine assembly must be projected into Codex inputs

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

这段在解决什么

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

为什么值得看

你理解的是能力边界,不只是功能名字。

真要动手时

如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The context-engine interface returns OpenClaw 机器人朋友小纸条消息[], not a Codex thread patch. Codex app-大房子服务器 turn/start accep…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The context-engine interface returns OpenClaw 机器人朋友小纸条消息[], not a Codex thread patch. Codex app-大房子服务器 turn/start accep…。

原文小纸条

The context-engine interface returns OpenClaw AgentMessage[], not a Codex thread patch. Codex app-server turn/start accepts a current user input, while thread/start and thread/resume accept developer instructions.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Therefore the implementation needs a projection layer. The safe first version should avoid pretending it can replace Co…。

原文小纸条

Therefore the implementation needs a projection layer. The safe first version should avoid pretending it can replace Codex internal history. It should inject assembled context as deterministic prompt/developer-instruction material around the current turn.

第 9 站

Prompt-cache stability matters

这一节主要在解释“Prompt-cache stability matters”到底是干什么的,以及你什么时候会遇到它。

这段在解决什么

这一节主要在解释“Prompt-cache stability matters”到底是干什么的,以及你什么时候会遇到它。

为什么值得看

如果你是第一次接触 OpenClaw,这一节最值得看的不是术语本身,而是它背后的使用场景和限制。

真要动手时

真正动手时,先看它有没有默认值、有没有必须打开的选项、以及会不会影响安全边界。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:For engines like lossless-claw, the assembled context should be deterministic for unchanged inputs. Do not add timestam…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:For engines like lossless-claw, the assembled context should be deterministic for unchanged inputs. Do not add timestam…。

原文小纸条

For engines like lossless-claw, the assembled context should be deterministic for unchanged inputs. Do not add timestamps, random ids, or nondeterministic ordering to generated context text.

第 10 站

Runtime selection semantics do not change

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

这段在解决什么

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

为什么值得看

你理解的是能力边界,不只是功能名字。

真要动手时

如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Harness selection remains as-is: This work changes what happens after the Codex harness is selected.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Harness selection remains as-is:。

原文小纸条

Harness selection remains as-is:

像准备清单

这一串条目别硬背,把它当成“Runtime selection semantics do not change”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:runtime: "pi" forces PI、runtime: "codex" selects the registered C…、runtime: "auto" lets 新本领插件 harnesses clai…、unmatched auto runs use PI。

原文小纸条
  • runtime: "pi" forces PI
  • runtime: "codex" selects the registered Codex harness
  • runtime: "auto" lets plugin harnesses claim supported providers
  • unmatched auto runs use PI
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:This work changes what happens after the Codex harness is selected.

原文小纸条

This work changes what happens after the Codex harness is selected.

第 11 站

1. Export or relocate reusable context-engine attempt helpers

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

这段在解决什么

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

为什么值得看

你理解的是能力边界,不只是功能名字。

真要动手时

如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Today the reusable lifecycle helpers live under the PI runner: Codex should not import from an implementation path whos…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Today the reusable lifecycle helpers live under the PI runner:。

原文小纸条

Today the reusable lifecycle helpers live under the PI runner:

像准备清单

这一串条目别硬背,把它当成“1. Export or relocate reusable context-engine attempt helpers”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:src/机器人朋友s/pi-embedded-runner/run/attempt…、src/机器人朋友s/pi-embedded-runner/run/attempt…、src/机器人朋友s/pi-embedded-runner/context-eng…。

原文小纸条
  • src/agents/pi-embedded-runner/run/attempt.context-engine-helpers.ts
  • src/agents/pi-embedded-runner/run/attempt.prompt-helpers.ts
  • src/agents/pi-embedded-runner/context-engine-maintenance.ts
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Codex should not import from an implementation path whose name implies PI if we can avoid it.

原文小纸条

Codex should not import from an implementation path whose name implies PI if we can avoid it.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Create a harness-neutral module, for example:。

原文小纸条

Create a harness-neutral module, for example:

像准备清单

这一串条目别硬背,把它当成“1. Export or relocate reusable context-engine attempt helpers”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:src/机器人朋友s/harness/context-engine-lifecyc…。

原文小纸条
  • src/agents/harness/context-engine-lifecycle.ts
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Move or re-export:。

原文小纸条

Move or re-export:

像准备清单

这一串条目别硬背,把它当成“1. Export or relocate reusable context-engine attempt helpers”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:runAttemptContextEngineBootstrap、assembleAttemptContextEngine、finalizeAttemptContextEngineTurn、buildAfterTurnRuntimeContext。

原文小纸条
  • runAttemptContextEngineBootstrap
  • assembleAttemptContextEngine
  • finalizeAttemptContextEngineTurn
  • buildAfterTurnRuntimeContext
  • buildAfterTurnRuntimeContextFromUsage
  • a small wrapper around runContextEngineMaintenance
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Keep PI imports working either by re-exporting from the old files or updating PI call sites in the same PR.

原文小纸条

Keep PI imports working either by re-exporting from the old files or updating PI call sites in the same PR.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The neutral helper names should not mention PI.

原文小纸条

The neutral helper names should not mention PI.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Suggested names:。

原文小纸条

Suggested names:

像准备清单

这一串条目别硬背,把它当成“1. Export or relocate reusable context-engine attempt helpers”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:bootstrapHarnessContextEngine、assembleHarnessContextEngine、finalizeHarnessContextEngineTurn、buildHarnessContextEngineRuntimeContext。

原文小纸条
  • bootstrapHarnessContextEngine
  • assembleHarnessContextEngine
  • finalizeHarnessContextEngineTurn
  • buildHarnessContextEngineRuntimeContext
  • runHarnessContextEngineMaintenance

第 12 站

2. Add a Codex context projection helper

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

这段在解决什么

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

为什么值得看

你理解的是能力边界,不只是功能名字。

真要动手时

如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Add a new module: Responsibilities: prompt. input. Proposed 对话接口: Recommended first projection: Example prompt shape: T…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Add a new module:。

原文小纸条

Add a new module:

像准备清单

这一串条目别硬背,把它当成“2. Add a Codex context projection helper”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:extensions/codex/src/app-大房子服务器/context-e…。

原文小纸条
  • extensions/codex/src/app-server/context-engine-projection.ts
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Responsibilities:。

原文小纸条

Responsibilities:

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:prompt.

原文小纸条

prompt.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:input.

原文小纸条

input.

像准备清单

这一串条目别硬背,把它当成“2. Add a Codex context projection helper”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:Accept the assembled 机器人朋友小纸条消息[], origin…、Determine which context belongs in develo…、Preserve the current user prompt as the f…、Render prior 小纸条消息s in a stable, explicit…。

原文小纸条
  • Accept the assembled AgentMessage[], original mirrored history, and current
  • Determine which context belongs in developer instructions vs current user
  • Preserve the current user prompt as the final actionable request.
  • Render prior messages in a stable, explicit format.
  • Avoid volatile metadata.
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Proposed 对话接口:。

原文小纸条

Proposed API:

像魔法口令拆解

这段像放在桌上的操作卡,谁来照着做,现场就会动起来。

  • 这一行“export type CodexContextProjection = {”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
  • 这里在给“developerInstructionAddition?”挂牌子,告诉系统它该指向“string;”。
  • 这里在给“promptText”挂牌子,告诉系统它该指向“string;”。
原文代码块
export type CodexContextProjection = {
  developerInstructionAddition?: string;
  promptText: string;
  assembledMessages: AgentMessage[];
  prePromptMessageCount: number;
};

export function projectContextEngineAssemblyForCodex(params: {
  assembledMessages: AgentMessage[];
  originalHistoryMessages: AgentMessage[];
  prompt: string;
  systemPromptAddition?: string;
}): CodexContextProjection;
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Recommended first projection:。

原文小纸条

Recommended first projection:

像准备清单

这一串条目别硬背,把它当成“2. Add a Codex context projection helper”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:Put systemPromptAddition into developer i…、Put the assembled transcript context befo…、Label it clearly as OpenClaw assembled co…、Keep current prompt last.

原文小纸条
  • Put systemPromptAddition into developer instructions.
  • Put the assembled transcript context before the current prompt in promptText.
  • Label it clearly as OpenClaw assembled context.
  • Keep current prompt last.
  • Exclude duplicate current user prompt if it already appears at the tail.
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Example prompt shape:。

原文小纸条

Example prompt shape:

像魔法口令拆解

这是一句直接对 OpenClaw 说的话,像你把任务清清楚楚塞到它手里。

  • 这里在给“OpenClaw assembled context for this turn”挂牌子,告诉系统它该指向“”。
  • 这个尖括号标签“<conversation_context>”像一块结构积木,专门拿来把页面骨架卡稳。
  • 这一行“[user]”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
原文代码块
OpenClaw assembled context for this turn:

<conversation_context>
[user]
...

[assistant]
...
</conversation_context>

Current user request:
...
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:This is less elegant than native Codex history surgery, but it is implementable inside OpenClaw and preserves context-e…。

原文小纸条

This is less elegant than native Codex history surgery, but it is implementable inside OpenClaw and preserves context-engine semantics.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Future improvement: if Codex app-大房子服务器 exposes a protocol for replacing or supplementing thread history, swap this pro…。

原文小纸条

Future improvement: if Codex app-server exposes a protocol for replacing or supplementing thread history, swap this projection layer to use that API.

第 13 站

3. Wire bootstrap before Codex thread startup

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

这段在解决什么

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

为什么值得看

你理解的是能力边界,不只是功能名字。

真要动手时

如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:In extensions/codex/src/app-大房子服务器/run-attempt.ts: that checks fs.stat(params.sessionFile) before mirroring writes. req…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:In extensions/codex/src/app-大房子服务器/run-attempt.ts:。

原文小纸条

In extensions/codex/src/app-server/run-attempt.ts:

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:that checks fs.stat(params.sessionFile) before mirroring writes.

原文小纸条

that checks fs.stat(params.sessionFile) before mirroring writes.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:requires it.

原文小纸条

requires it.

像准备清单

这一串条目别硬背,把它当成“3. Wire bootstrap before Codex thread startup”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:Read mirrored session history as today.、Determine whether the session file existe…、Open a SessionManager or use a narrow ses…、Call the neutral bootstrap helper when pa…。

原文小纸条
  • Read mirrored session history as today.
  • Determine whether the session file existed before this run. Prefer a helper
  • Open a SessionManager or use a narrow session manager adapter if the helper
  • Call the neutral bootstrap helper when params.contextEngine exists.
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Pseudo-flow:。

原文小纸条

Pseudo-flow:

像魔法口令拆解

这段像放在桌上的操作卡,谁来照着做,现场就会动起来。

  • 这一行“const hadSessionFile = await fileExists(params.sessionFile);”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
  • 这一行“const sessionManager = SessionManager.open(params.sessionFile);”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
  • 这一行“const historyMessages = sessionManager.buildSessionContext().messages;”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
原文代码块
const hadSessionFile = await fileExists(params.sessionFile);
const sessionManager = SessionManager.open(params.sessionFile);
const historyMessages = sessionManager.buildSessionContext().messages;

await bootstrapHarnessContextEngine({
  hadSessionFile,
  contextEngine: params.contextEngine,
  sessionId: params.sessionId,
  sessionKey: sandboxSessionKey,
  sessionFile: params.sessionFile,
  sessionManager,
  runtimeContext: buildHarnessContextEngineRuntimeContext(...),
  runMaintenance: runHarnessContextEngineMaintenance,
  warn,
});
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Use the same sessionKey convention as the Codex 工具小帮手 bridge and transcript mirror. Today Codex computes sandboxSession…。

原文小纸条

Use the same sessionKey convention as the Codex tool bridge and transcript mirror. Today Codex computes sandboxSessionKey from params.sessionKey or params.sessionId; use that consistently unless there is a reason to preserve raw params.sessionKey.

第 14 站

4. Wire assemble before `thread/start` / `thread/resume` and `turn/start`

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

这段在解决什么

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

为什么值得看

你理解的是能力边界,不只是功能名字。

真要动手时

如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:In runCodexApp大房子服务器Attempt: 1. Build dynamic 工具小帮手s first, so the context engine sees the actual available 工具小帮手 names…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:In runCodexApp大房子服务器Attempt:。

原文小纸条

In runCodexAppServerAttempt:

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:1. Build dynamic 工具小帮手s first, so the context engine sees the actual available 工具小帮手 names. 2. Read mirrored session hi…。

原文小纸条

1. Build dynamic tools first, so the context engine sees the actual available tool names. 2. Read mirrored session history. 3. Run context-engine assemble(...) when params.contextEngine exists. 4. Project the assembled result into:

像准备清单

这一串条目别硬背,把它当成“4. Wire assemble before `thread/start` / `thread/resume` and `turn/start`”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:developer instruction addition、prompt text for turn/start。

原文小纸条
  • developer instruction addition
  • prompt text for turn/start
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The existing hook call:。

原文小纸条

The existing hook call:

像魔法口令拆解

这段像放在桌上的操作卡,谁来照着做,现场就会动起来。

  • 这一行“resolveAgentHarnessBeforePromptBuildResult({”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
  • 这里在给“prompt”挂牌子,告诉系统它该指向“params.prompt”。
  • 这里在给“developerInstructions”挂牌子,告诉系统它该指向“buildDeveloperInstructions(params)”。
原文代码块
resolveAgentHarnessBeforePromptBuildResult({
  prompt: params.prompt,
  developerInstructions: buildDeveloperInstructions(params),
  messages: historyMessages,
  ctx: hookContext,
});
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:should become context-aware:。

原文小纸条

should become context-aware:

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:1. compute base developer instructions with buildDeveloperInstructions(params) 2. apply context-engine assembly/project…。

原文小纸条

1. compute base developer instructions with buildDeveloperInstructions(params) 2. apply context-engine assembly/projection 3. run before_prompt_build with the projected prompt/developer instructions

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:This order lets generic prompt hooks see the same prompt Codex will receive. If we need strict PI parity, run context-e…。

原文小纸条

This order lets generic prompt hooks see the same prompt Codex will receive. If we need strict PI parity, run context-engine assembly before hook composition, because PI applies context-engine systemPromptAddition to the final system prompt after its prompt pipeline. The important invariant is that both context engine and hooks get a deterministic, documented order.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Recommended order for first implementation:。

原文小纸条

Recommended order for first implementation:

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:1. buildDeveloperInstructions(params) 2. context-engine assemble() 3. append/prepend systemPromptAddition to developer…。

原文小纸条

1. buildDeveloperInstructions(params) 2. context-engine assemble() 3. append/prepend systemPromptAddition to developer instructions 4. project assembled messages into prompt text 5. resolveAgentHarnessBeforePromptBuildResult(...) 6. pass final developer instructions to startOrResumeThread(...) 7. pass final prompt text to buildTurnStartParams(...)

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The spec should be encoded in tests so future changes do not reorder it by accident.

原文小纸条

The spec should be encoded in tests so future changes do not reorder it by accident.

第 15 站

5. Preserve prompt-cache stable formatting

这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。

这段在解决什么

这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。

为什么值得看

这种内容决定了 OpenClaw 是“能做”还是“现在还不能做”,读懂它比记术语更重要。

真要动手时

你可以把这一节当成权限说明书,真正配置时优先盯住 default、required、allow、deny 这几个词。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The projection helper must produce byte-stable output for identical inputs: Use fixed delimiters and explicit sections.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The projection helper must produce byte-stable output for identical inputs:。

原文小纸条

The projection helper must produce byte-stable output for identical inputs:

像准备清单

这一串条目别硬背,把它当成“5. Preserve prompt-cache stable formatting”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:stable 小纸条消息 order、stable role labels、no generated timestamps、no object key order leakage。

原文小纸条
  • stable message order
  • stable role labels
  • no generated timestamps
  • no object key order leakage
  • no random delimiters
  • no per-run ids
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Use fixed delimiters and explicit sections.

原文小纸条

Use fixed delimiters and explicit sections.

第 16 站

6. Wire post-turn after transcript mirroring

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

这段在解决什么

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

为什么值得看

你理解的是能力边界,不只是功能名字。

真要动手时

如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Codex's CodexApp大房子服务器EventProjector builds a local 小纸条消息sSnapshot for the current turn. mirrorTranscriptBestEffort(...…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Codex's CodexApp大房子服务器EventProjector builds a local 小纸条消息sSnapshot for the current turn. mirrorTranscriptBestEffort(...…。

原文小纸条

Codex's CodexAppServerEventProjector builds a local messagesSnapshot for the current turn. mirrorTranscriptBestEffort(...) writes that snapshot into the OpenClaw transcript mirror.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:After mirroring succeeds or fails, call the context-engine finalizer with the best available 小纸条消息 snapshot:。

原文小纸条

After mirroring succeeds or fails, call the context-engine finalizer with the best available message snapshot:

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:expects the session snapshot, not only the current turn.

原文小纸条

expects the session snapshot, not only the current turn.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:cannot be reopened.

原文小纸条

cannot be reopened.

像准备清单

这一串条目别硬背,把它当成“6. Wire post-turn after transcript mirroring”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:Prefer full mirrored session context afte…、Fall back to history小纸条消息s + result.小纸条消息…。

原文小纸条
  • Prefer full mirrored session context after the write, because afterTurn
  • Fall back to historyMessages + result.messagesSnapshot if the session file
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Pseudo-flow:。

原文小纸条

Pseudo-flow:

像魔法口令拆解

这段像放在桌上的操作卡,谁来照着做,现场就会动起来。

  • 这一行“const prePromptMessageCount = historyMessages.length;”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
  • 这一行“await mirrorTranscriptBestEffort(...);”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
  • 这一行“const finalMessages = readMirroredSessionHistoryMessages(params.sessionFile)”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
原文代码块
const prePromptMessageCount = historyMessages.length;
await mirrorTranscriptBestEffort(...);
const finalMessages = readMirroredSessionHistoryMessages(params.sessionFile)
  ?? [...historyMessages, ...result.messagesSnapshot];

await finalizeHarnessContextEngineTurn({
  contextEngine: params.contextEngine,
  promptError: Boolean(finalPromptError),
  aborted: finalAborted,
  yieldAborted,
  sessionIdUsed: params.sessionId,
  sessionKey: sandboxSessionKey,
  sessionFile: params.sessionFile,
  messagesSnapshot: finalMessages,
  prePromptMessageCount,
  tokenBudget: params.contextTokenBudget,
  runtimeContext: buildHarnessContextEngineRuntimeContextFromUsage({
    attempt: params,
    workspaceDir: effectiveWorkspace,
    agentDir,
    tokenBudget: params.contextTokenBudget,
    lastCallUsage: result.attemptUsage,
    promptCache: result.promptCache,
  }),
  runMaintenance: runHarnessContextEngineMaintenance,
  sessionManager,
  warn,
});
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:If mirroring fails, still call afterTurn with the fallback snapshot, but log that the context engine is ingesting from…。

原文小纸条

If mirroring fails, still call afterTurn with the fallback snapshot, but log that the context engine is ingesting from fallback turn data.

第 17 站

7. Normalize usage and prompt-cache runtime context

这一节主要在解释“7. Normalize usage and prompt-cache runtime context”到底是干什么的,以及你什么时候会遇到它。

这段在解决什么

这一节主要在解释“7. Normalize usage and prompt-cache runtime context”到底是干什么的,以及你什么时候会遇到它。

为什么值得看

如果你是第一次接触 OpenClaw,这一节最值得看的不是术语本身,而是它背后的使用场景和限制。

真要动手时

真正动手时,先看它有没有默认值、有没有必须打开的选项、以及会不会影响安全边界。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Codex results include normalized usage from app-大房子服务器 token notifications when available. Pass that usage into the con…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Codex results include normalized usage from app-大房子服务器 token notifications when available. Pass that usage into the con…。

原文小纸条

Codex results include normalized usage from app-server token notifications when available. Pass that usage into the context-engine runtime context.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:If Codex app-大房子服务器 eventually exposes cache read/write details, map them into ContextEnginePromptCacheInfo. Until then…。

原文小纸条

If Codex app-server eventually exposes cache read/write details, map them into ContextEnginePromptCacheInfo. Until then, omit promptCache rather than inventing zeros.

第 18 站

8. Compaction policy

这一节主要在解释“8. Compaction policy”到底是干什么的,以及你什么时候会遇到它。

这段在解决什么

这一节主要在解释“8. Compaction policy”到底是干什么的,以及你什么时候会遇到它。

为什么值得看

如果你是第一次接触 OpenClaw,这一节最值得看的不是术语本身,而是它背后的使用场景和限制。

真要动手时

真正动手时,先看它有没有默认值、有没有必须打开的选项、以及会不会影响安全边界。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:There are two compaction systems: 1. OpenClaw context-engine compact() 2. Codex app-大房子服务器 native thread/compact/start…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:There are two compaction systems:。

原文小纸条

There are two compaction systems:

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:1. OpenClaw context-engine compact() 2. Codex app-大房子服务器 native thread/compact/start。

原文小纸条

1. OpenClaw context-engine compact() 2. Codex app-server native thread/compact/start

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Do not silently conflate them.

原文小纸条

Do not silently conflate them.

第 19 站

`/compact` and explicit OpenClaw compaction

这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。

这段在解决什么

这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。

为什么值得看

这种内容决定了 OpenClaw 是“能做”还是“现在还不能做”,读懂它比记术语更重要。

真要动手时

你可以把这一节当成权限说明书,真正配置时优先盯住 default、required、allow、deny 这几个词。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:When the selected context engine has info.ownsCompaction === true, explicit OpenClaw compaction should prefer the conte…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:When the selected context engine has info.ownsCompaction === true, explicit OpenClaw compaction should prefer the conte…。

原文小纸条

When the selected context engine has info.ownsCompaction === true, explicit OpenClaw compaction should prefer the context engine's compact() result for the OpenClaw transcript mirror and plugin state.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:When the selected Codex harness has a native thread binding, we may additionally request Codex native compaction to kee…。

原文小纸条

When the selected Codex harness has a native thread binding, we may additionally request Codex native compaction to keep the app-server thread healthy, but this must be reported as a separate backend action in details.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Recommended behavior:。

原文小纸条

Recommended behavior:

像准备清单

这一串条目别硬背,把它当成“`/compact` and explicit OpenClaw compaction”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:If contextEngine.info.ownsCompaction ===…、call context-engine compact() first、then best-effort call Codex native compac…、return the context-engine result as the p…。

原文小纸条
  • If contextEngine.info.ownsCompaction === true:
  • call context-engine compact() first
  • then best-effort call Codex native compaction when a thread binding exists
  • return the context-engine result as the primary result
  • include Codex native compaction status in details.codexNativeCompaction
  • If the active context engine does not own compaction:
  • preserve current Codex native compaction behavior
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:This likely requires changing extensions/codex/src/app-大房子服务器/compact.ts or wrapping it from the generic compaction pat…。

原文小纸条

This likely requires changing extensions/codex/src/app-server/compact.ts or wrapping it from the generic compaction path, depending on where maybeCompactAgentHarnessSession(...) is invoked.

第 20 站

In-turn Codex native contextCompaction events

这一节主要在解释“In-turn Codex native contextCompaction events”到底是干什么的,以及你什么时候会遇到它。

这段在解决什么

这一节主要在解释“In-turn Codex native contextCompaction events”到底是干什么的,以及你什么时候会遇到它。

为什么值得看

如果你是第一次接触 OpenClaw,这一节最值得看的不是术语本身,而是它背后的使用场景和限制。

真要动手时

真正动手时,先看它有没有默认值、有没有必须打开的选项、以及会不会影响安全边界。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Codex may emit contextCompaction item events during a turn. Keep the current before/after compaction hook emission in e…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Codex may emit contextCompaction item events during a turn. Keep the current before/after compaction hook emission in e…。

原文小纸条

Codex may emit contextCompaction item events during a turn. Keep the current before/after compaction hook emission in event-projector.ts, but do not treat that as a completed context-engine compaction.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:For engines that own compaction, emit an explicit diagnostic when Codex performs native compaction anyway:。

原文小纸条

For engines that own compaction, emit an explicit diagnostic when Codex performs native compaction anyway:

像准备清单

这一串条目别硬背,把它当成“In-turn Codex native contextCompaction events”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:一边说一边送/event name: existing compaction 一边…、details: { backend: "codex-app-大房子服务器", o…。

原文小纸条
  • stream/event name: existing compaction stream is acceptable
  • details: { backend: "codex-app-server", ownsCompaction: true }
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:This makes the split auditable.

原文小纸条

This makes the split auditable.

第 21 站

9. Session reset and binding behavior

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

这段在解决什么

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

为什么值得看

你理解的是能力边界,不只是功能名字。

真要动手时

如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The existing Codex harness reset(...) clears the Codex app-大房子服务器 binding from the OpenClaw session file. Preserve that…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The existing Codex harness reset(...) clears the Codex app-大房子服务器 binding from the OpenClaw session file. Preserve that…。

原文小纸条

The existing Codex harness reset(...) clears the Codex app-server binding from the OpenClaw session file. Preserve that behavior.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Also ensure context-engine state cleanup continues to happen through existing OpenClaw session lifecycle paths. Do not…。

原文小纸条

Also ensure context-engine state cleanup continues to happen through existing OpenClaw session lifecycle paths. Do not add Codex-specific cleanup unless the context-engine lifecycle currently misses reset/delete events for all harnesses.

第 22 站

10. Error handling

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

这段在解决什么

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

为什么值得看

你理解的是能力边界,不只是功能名字。

真要动手时

如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Follow PI semantics: Codex-specific additions: fallback 小纸条消息s. do not fail the whole OpenClaw compaction when the cont…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Follow PI semantics:。

原文小纸条

Follow PI semantics:

像准备清单

这一串条目别硬背,把它当成“10. Error handling”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:bootstrap failures warn and continue、assemble failures warn and fall back to u…、afterTurn/ingest failures warn and mark p…、maintenance runs only after successful, n…。

原文小纸条
  • bootstrap failures warn and continue
  • assemble failures warn and fall back to unassembled pipeline messages/prompt
  • afterTurn/ingest failures warn and mark post-turn finalization unsuccessful
  • maintenance runs only after successful, non-aborted, non-yield turns
  • compaction errors should not be retried as fresh prompts
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Codex-specific additions:。

原文小纸条

Codex-specific additions:

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:fallback 小纸条消息s.

原文小纸条

fallback messages.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:do not fail the whole OpenClaw compaction when the context engine is primary.

原文小纸条

do not fail the whole OpenClaw compaction when the context engine is primary.

像准备清单

这一串条目别硬背,把它当成“10. Error handling”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:If context projection fails, warn and fal…、If transcript mirror fails, still attempt…、If Codex native compaction fails after co…。

原文小纸条
  • If context projection fails, warn and fall back to the original prompt.
  • If transcript mirror fails, still attempt context-engine finalization with
  • If Codex native compaction fails after context-engine compaction succeeds,

第 23 站

Unit tests

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

这段在解决什么

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

为什么值得看

你理解的是能力边界,不只是功能名字。

真要动手时

如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Add tests under extensions/codex/src/app-大房子服务器: 1. run-attempt.context-engine.test.ts citations mode, 聪明脑袋模型 id, and p…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Add tests under extensions/codex/src/app-大房子服务器:。

原文小纸条

Add tests under extensions/codex/src/app-server:

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:1. run-attempt.context-engine.test.ts。

原文小纸条

1. run-attempt.context-engine.test.ts

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:citations mode, 聪明脑袋模型 id, and prompt.

原文小纸条

citations mode, model id, and prompt.

像准备清单

这一串条目别硬背,把它当成“Unit tests”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:Codex calls bootstrap when a session file…、Codex calls assemble with mirrored 小纸条消息s…、systemPromptAddition is included in devel…、Assembled 小纸条消息s are projected into the p…。

原文小纸条
  • Codex calls bootstrap when a session file exists.
  • Codex calls assemble with mirrored messages, token budget, tool names,
  • systemPromptAddition is included in developer instructions.
  • Assembled messages are projected into the prompt before current request.
  • Codex calls afterTurn after transcript mirroring.
  • Without afterTurn, Codex calls ingestBatch or per-message ingest.
  • Turn maintenance runs after successful turns.
  • Turn maintenance does not run on prompt error, abort, or yield abort.
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:2. context-engine-projection.test.ts。

原文小纸条

2. context-engine-projection.test.ts

像准备清单

这一串条目别硬背,把它当成“Unit tests”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:stable output for identical inputs、no duplicate current prompt when assemble…、handles empty history、preserves role order。

原文小纸条
  • stable output for identical inputs
  • no duplicate current prompt when assembled history includes it
  • handles empty history
  • preserves role order
  • includes system prompt addition only in developer instructions
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:3. compact.context-engine.test.ts。

原文小纸条

3. compact.context-engine.test.ts

像准备清单

这一串条目别硬背,把它当成“Unit tests”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:owning context engine primary result wins、Codex native compaction status appears in…、Codex native failure does not fail owning…、non-owning context engine preserves curre…。

原文小纸条
  • owning context engine primary result wins
  • Codex native compaction status appears in details when also attempted
  • Codex native failure does not fail owning context-engine compaction
  • non-owning context engine preserves current native compaction behavior

第 24 站

Existing tests to update

这一节主要在解释“Existing tests to update”到底是干什么的,以及你什么时候会遇到它。

这段在解决什么

这一节主要在解释“Existing tests to update”到底是干什么的,以及你什么时候会遇到它。

为什么值得看

如果你是第一次接触 OpenClaw,这一节最值得看的不是术语本身,而是它背后的使用场景和限制。

真要动手时

真正动手时,先看它有没有默认值、有没有必须打开的选项、以及会不会影响安全边界。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:nearest Codex app-大房子服务器 run tests. event details change. behavior changes; it should remain stable.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:nearest Codex app-大房子服务器 run tests.

原文小纸条

nearest Codex app-server run tests.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:event details change.

原文小纸条

event details change.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:behavior changes; it should remain stable.

原文小纸条

behavior changes; it should remain stable.

像准备清单

这一串条目别硬背,把它当成“Existing tests to update”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:extensions/codex/src/app-大房子服务器/run-attem…、extensions/codex/src/app-大房子服务器/event-pro…、src/机器人朋友s/harness/selection.test.ts shou…、PI context-engine tests should continue t…。

原文小纸条
  • extensions/codex/src/app-server/run-attempt.test.ts if present, otherwise
  • extensions/codex/src/app-server/event-projector.test.ts only if compaction
  • src/agents/harness/selection.test.ts should not need changes unless config
  • PI context-engine tests should continue to pass unchanged.

第 25 站

Integration / live tests

这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。

这段在解决什么

这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。

为什么值得看

这种内容决定了 OpenClaw 是“能做”还是“现在还不能做”,读懂它比记术语更重要。

真要动手时

你可以把这一节当成权限说明书,真正配置时优先盯住 default、required、allow、deny 这几个词。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Add or extend live Codex harness smoke tests: Avoid requiring lossless-claw in OpenClaw core tests. Use a small in-repo…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Add or extend live Codex harness smoke tests:。

原文小纸条

Add or extend live Codex harness smoke tests:

像准备清单

这一串条目别硬背,把它当成“Integration / live tests”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:设置说明书ure 新本领插件s.slots.contextEngine to a…、设置说明书ure 机器人朋友s.defaults.聪明脑袋模型 to a code…、设置说明书ure 机器人朋友s.defaults.embeddedHarness.…、assert test engine observed:。

原文小纸条
  • configure plugins.slots.contextEngine to a test engine
  • configure agents.defaults.model to a codex/* model
  • configure agents.defaults.embeddedHarness.runtime = "codex"
  • assert test engine observed:
  • bootstrap
  • assemble
  • afterTurn or ingest
  • maintenance
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Avoid requiring lossless-claw in OpenClaw core tests. Use a small in-repo fake context engine 新本领插件.

原文小纸条

Avoid requiring lossless-claw in OpenClaw core tests. Use a small in-repo fake context engine plugin.

第 26 站

Observability

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

这段在解决什么

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

为什么值得看

你理解的是能力边界,不只是功能名字。

真要动手时

如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Add debug logs around Codex context-engine lifecycle calls: Avoid logging full prompts or transcript contents. Add stru…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Add debug logs around Codex context-engine lifecycle calls:。

原文小纸条

Add debug logs around Codex context-engine lifecycle calls:

像准备清单

这一串条目别硬背,把它当成“Observability”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:codex context engine bootstrap started/co…、codex context engine assemble applied、codex context engine finalize completed/f…、codex context engine maintenance skipped…。

原文小纸条
  • codex context engine bootstrap started/completed/failed
  • codex context engine assemble applied
  • codex context engine finalize completed/failed
  • codex context engine maintenance skipped with reason
  • codex native compaction completed alongside context-engine compaction
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Avoid logging full prompts or transcript contents.

原文小纸条

Avoid logging full prompts or transcript contents.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Add structured fields where useful:。

原文小纸条

Add structured fields where useful:

像准备清单

这一串条目别硬背,把它当成“Observability”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:sessionId、sessionKey redacted or omitted according…、engineId、threadId。

原文小纸条
  • sessionId
  • sessionKey redacted or omitted according to existing logging practice
  • engineId
  • threadId
  • turnId
  • assembledMessageCount
  • estimatedTokens
  • hasSystemPromptAddition

第 27 站

Migration / compatibility

这一节更像安装或配置步骤,重点不是概念,而是“按什么顺序做才不会卡住”。

这段在解决什么

这一节更像安装或配置步骤,重点不是概念,而是“按什么顺序做才不会卡住”。

为什么值得看

很多文档看起来长,其实是在防你漏掉前置条件。

真要动手时

真正照做时,先找前置条件,再找必填项,最后看验证方法。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:This should be backward-compatible: equivalent to today's Codex harness behavior. prompt path. every context change cou…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:This should be backward-compatible:。

原文小纸条

This should be backward-compatible:

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:equivalent to today's Codex harness behavior.

原文小纸条

equivalent to today's Codex harness behavior.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:prompt path.

原文小纸条

prompt path.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:every context change could force a new Codex thread. Only the 工具小帮手 catalog should affect the dynamic 工具小帮手 fingerprint.

原文小纸条

every context change could force a new Codex thread. Only the tool catalog should affect the dynamic tool fingerprint.

像准备清单

这一串条目别硬背,把它当成“Migration / compatibility”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:If no context engine is 设置说明书ured, legacy…、If context-engine assemble fails, Codex s…、Existing Codex thread bindings should rem…、Dynamic 工具小帮手 fingerprinting should not i…。

原文小纸条
  • If no context engine is configured, legacy context engine behavior should be
  • If context-engine assemble fails, Codex should continue with the original
  • Existing Codex thread bindings should remain valid.
  • Dynamic tool fingerprinting should not include context-engine output; otherwise

第 28 站

Open questions

这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。

这段在解决什么

这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。

为什么值得看

这种内容决定了 OpenClaw 是“能做”还是“现在还不能做”,读懂它比记术语更重要。

真要动手时

你可以把这一节当成权限说明书,真正配置时优先盯住 default、required、allow、deny 这几个词。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:1. Should assembled context be injected entirely into the user prompt, entirely into developer instructions, or split?…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:1. Should assembled context be injected entirely into the user prompt, entirely into developer instructions, or split?

原文小纸条

1. Should assembled context be injected entirely into the user prompt, entirely into developer instructions, or split?

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Recommendation: split. Put systemPromptAddition in developer instructions; put assembled transcript context in the user…。

原文小纸条

Recommendation: split. Put systemPromptAddition in developer instructions; put assembled transcript context in the user prompt wrapper. This best matches the current Codex protocol without mutating native thread history.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:2. Should Codex native compaction be disabled when a context engine owns compaction?

原文小纸条

2. Should Codex native compaction be disabled when a context engine owns compaction?

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Recommendation: no, not initially. Codex native compaction may still be necessary to keep the app-大房子服务器 thread alive.…。

原文小纸条

Recommendation: no, not initially. Codex native compaction may still be necessary to keep the app-server thread alive. But it must be reported as native Codex compaction, not as context-engine compaction.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:3. Should before_prompt_build run before or after context-engine assembly?

原文小纸条

3. Should before_prompt_build run before or after context-engine assembly?

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Recommendation: after context-engine projection for Codex, so generic harness hooks see the actual prompt/developer ins…。

原文小纸条

Recommendation: after context-engine projection for Codex, so generic harness hooks see the actual prompt/developer instructions Codex will receive. If PI parity requires the opposite, encode the chosen order in tests and document it here.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:4. Can Codex app-大房子服务器 accept a future structured context/history override?

原文小纸条

4. Can Codex app-server accept a future structured context/history override?

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Unknown. If it can, replace the text projection layer with that protocol and keep the lifecycle calls unchanged.

原文小纸条

Unknown. If it can, replace the text projection layer with that protocol and keep the lifecycle calls unchanged.

第 29 站

Acceptance criteria

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

这段在解决什么

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

为什么值得看

你理解的是能力边界,不只是功能名字。

真要动手时

如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:assemble lifecycle. is selected or when assembly fails. ---。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:assemble lifecycle.

原文小纸条

assemble lifecycle.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:is selected or when assembly fails.

原文小纸条

is selected or when assembly fails.

像准备清单

这一串条目别硬背,把它当成“Acceptance criteria”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:A codex/* embedded harness turn invokes t…、A context-engine systemPromptAddition aff…、Assembled context affects the Codex turn…、Successful Codex turns call afterTurn or…。

原文小纸条
  • A codex/* embedded harness turn invokes the selected context engine's
  • A context-engine systemPromptAddition affects Codex developer instructions.
  • Assembled context affects the Codex turn input deterministically.
  • Successful Codex turns call afterTurn or ingest fallback.
  • Successful Codex turns run context-engine turn maintenance.
  • Failed/aborted/yield-aborted turns do not run turn maintenance.
  • Context-engine-owned compaction remains primary for OpenClaw/plugin state.
  • Codex native compaction remains auditable as native Codex behavior.
  • Existing PI context-engine behavior is unchanged.
  • Existing Codex harness behavior is unchanged when no non-legacy context engine
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:---。

原文小纸条

---

AdSense 连接验证已经放在页面头部;广告单元等站点审批通过后再启用。

google-adsense-account: ca-pub-3833673520933536