fix(codex): skip native web search transcript mirroring (#85346) · openclaw/openclaw@c3531fc
steipete
·
2026-05-22
·
via Recent Commits to openclaw:main
File tree
extensions/codex/src/app-server
| Original file line number | Diff line number | Diff line change |
|---|
@@ -44,6 +44,7 @@ Docs: https://docs.openclaw.ai
|
44 | 44 | - Cron: honor `cron.retry.retryOn: ["network"]` for common network error codes such as `EAI_AGAIN`, `EHOSTUNREACH`, and `ENETUNREACH`. |
45 | 45 | - Gateway chat: broadcast returned agent-run error payloads after an agent starts so ACP/WebChat clients receive terminal idle-timeout errors. Fixes #84945. |
46 | 46 | - Dashboard/CLI: allow macOS browser launching through `open` even when SSH environment variables are present, while preserving Linux SSH no-display protection. Fixes #67088. Thanks @theglove44. |
| 47 | +- Codex app-server: keep native web search observations out of mirrored chat transcripts while preserving tool progress telemetry. Fixes #85109. Thanks @ugitmebaby. |
47 | 48 | - Agents/OpenAI: preserve structured provider error code, type, and redacted body metadata on boundary-aware transport failures. |
48 | 49 | - Doctor/Codex: point native Codex asset warnings at the canonical `openclaw migrate plan codex` preview command. Fixes #84948. Thanks @markoa. |
49 | 50 | - CLI/models: make `capability model auth logout --agent` remove auth profiles from the selected non-default agent store. Fixes #85092. Thanks @islandpreneur007. |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -2031,6 +2031,40 @@ describe("CodexAppServerEventProjector", () => {
|
2031 | 2031 | expect(toolResultContent.content).toBe("opened"); |
2032 | 2032 | }); |
2033 | 2033 | |
| 2034 | +it("does not mirror Codex-native web searches into transcript snapshots", async () => { |
| 2035 | +const projector = await createProjector(); |
| 2036 | + |
| 2037 | +await projector.handleNotification( |
| 2038 | +forCurrentTurn("item/completed", { |
| 2039 | +item: { |
| 2040 | +type: "webSearch", |
| 2041 | +id: "search-observed", |
| 2042 | +status: "completed", |
| 2043 | +durationMs: 5, |
| 2044 | +}, |
| 2045 | +}), |
| 2046 | +); |
| 2047 | + |
| 2048 | +const result = projector.buildResult(buildEmptyToolTelemetry()); |
| 2049 | + |
| 2050 | +expect( |
| 2051 | +result.messagesSnapshot.some((message) => { |
| 2052 | +const record = message as unknown as Record<string, unknown>; |
| 2053 | +if (record.role === "toolResult") { |
| 2054 | +return true; |
| 2055 | +} |
| 2056 | +const content = Array.isArray(record.content) ? record.content : []; |
| 2057 | +return content.some((entry) => { |
| 2058 | +return ( |
| 2059 | +typeof entry === "object" && |
| 2060 | +entry !== null && |
| 2061 | +(entry as Record<string, unknown>).type === "toolCall" |
| 2062 | +); |
| 2063 | +}); |
| 2064 | +}), |
| 2065 | +).toBe(false); |
| 2066 | +}); |
| 2067 | + |
2034 | 2068 | it("emits verbose summaries for transcript-recorded dynamic tool calls", async () => { |
2035 | 2069 | const onAgentEvent = vi.fn(); |
2036 | 2070 | const onToolResult = vi.fn(); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1234,7 +1234,7 @@ export class CodexAppServerEventProjector {
|
1234 | 1234 | } |
1235 | 1235 | |
1236 | 1236 | private recordNativeToolTranscriptCall(item: CodexThreadItem | undefined): void { |
1237 | | -if (!item || !shouldSynthesizeToolProgressForItem(item)) { |
| 1237 | +if (!item || !shouldRecordNativeToolTranscript(item)) { |
1238 | 1238 | return; |
1239 | 1239 | } |
1240 | 1240 | const name = itemName(item); |
@@ -1249,7 +1249,7 @@ export class CodexAppServerEventProjector {
|
1249 | 1249 | } |
1250 | 1250 | |
1251 | 1251 | private recordNativeToolTranscriptResult(item: CodexThreadItem | undefined): void { |
1252 | | -if (!item || !shouldSynthesizeToolProgressForItem(item)) { |
| 1252 | +if (!item || !shouldRecordNativeToolTranscript(item)) { |
1253 | 1253 | return; |
1254 | 1254 | } |
1255 | 1255 | const name = itemName(item); |
@@ -1776,6 +1776,10 @@ function shouldSynthesizeToolProgressForItem(item: CodexThreadItem): boolean {
|
1776 | 1776 | } |
1777 | 1777 | } |
1778 | 1778 | |
| 1779 | +function shouldRecordNativeToolTranscript(item: CodexThreadItem): boolean { |
| 1780 | +return shouldSynthesizeToolProgressForItem(item) && item.type !== "webSearch"; |
| 1781 | +} |
| 1782 | + |
1779 | 1783 | function isMutatingNativeToolItem(item: CodexThreadItem): boolean { |
1780 | 1784 | return item.type === "commandExecution" || item.type === "fileChange"; |
1781 | 1785 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。