惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园_首页
Engineering at Meta
Engineering at Meta
量子位
A
About on SuperTechFans
阮一峰的网络日志
阮一峰的网络日志
Recent Announcements
Recent Announcements
博客园 - 司徒正美
V
Visual Studio Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
The GitHub Blog
The GitHub Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
F
Fortinet All Blogs
Martin Fowler
Martin Fowler
腾讯CDC
Jina AI
Jina AI
C
Check Point Blog
H
Help Net Security
罗磊的独立博客
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
V2EX
爱范儿
爱范儿
I
InfoQ

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(codex/app-server): stable mirror idempotency to preve...
openperf · 2026-05-05 · via Recent Commits to openclaw:main

@@ -28,6 +28,7 @@ import {

2828

type JsonValue,

2929

} from "./protocol.js";

3030

import { readCodexMirroredSessionHistoryMessages } from "./session-history.js";

31+

import { attachCodexMirrorIdentity } from "./transcript-mirror.js";

31323233

export type CodexAppServerToolTelemetry = {

3334

didSendViaMessagingTool: boolean;

@@ -185,23 +186,47 @@ export class CodexAppServerEventProjector {

185186

assistantTexts.length > 0

186187

? this.createAssistantMessage(assistantTexts.join("\n\n"))

187188

: undefined;

189+

// Each snapshot entry is tagged with a stable mirror identity of the

190+

// shape `${turnId}:${kind}`. The mirror's idempotency key is derived

191+

// from this identity rather than from snapshot position or content

192+

// hash, so:

193+

// - Re-mirror of the same turn (retry) → same identity → no-op.

194+

// - Re-emit of a prior turn's entry into a later turn's snapshot

195+

// (the cross-turn drift mode named in #77012) → original identity

196+

// is preserved → on-disk key still matches → also a no-op.

197+

// - Two distinct turns where the user repeats verbatim content →

198+

// distinct turnIds → distinct identities → both kept.

199+

const turnId = this.turnId;

188200

const messagesSnapshot: AgentMessage[] = [

189-

{

190-

role: "user",

191-

content: this.params.prompt,

192-

timestamp: Date.now(),

193-

},

201+

attachCodexMirrorIdentity(

202+

{

203+

role: "user",

204+

content: this.params.prompt,

205+

timestamp: Date.now(),

206+

},

207+

`${turnId}:prompt`,

208+

),

194209

];

195210

// Codex owns the canonical thread. These mirror records keep enough local

196211

// context for OpenClaw history, search, and future harness switching.

197212

if (reasoningText) {

198-

messagesSnapshot.push(this.createAssistantMirrorMessage("Codex reasoning", reasoningText));

213+

messagesSnapshot.push(

214+

attachCodexMirrorIdentity(

215+

this.createAssistantMirrorMessage("Codex reasoning", reasoningText),

216+

`${turnId}:reasoning`,

217+

),

218+

);

199219

}

200220

if (planText) {

201-

messagesSnapshot.push(this.createAssistantMirrorMessage("Codex plan", planText));

221+

messagesSnapshot.push(

222+

attachCodexMirrorIdentity(

223+

this.createAssistantMirrorMessage("Codex plan", planText),

224+

`${turnId}:plan`,

225+

),

226+

);

202227

}

203228

if (lastAssistant) {

204-

messagesSnapshot.push(lastAssistant);

229+

messagesSnapshot.push(attachCodexMirrorIdentity(lastAssistant, `${turnId}:assistant`));

205230

}

206231

const turnFailed = this.completedTurn?.status === "failed";

207232

const turnInterrupted = this.completedTurn?.status === "interrupted";