You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prevent reproducible duplicate item.started emissions at their Adapter sources. The shared projector still throws on every duplicate Item ID; this does not introduce projector-level deduplication, automatic recovery, new packages, or public contract changes.
Changes
Qoder / Qoder CN: ignore non-root assistant, stream_event, and user messages (parent_tool_use_id is neither null nor undefined), including their effect on parent usage/checkpoints. Result-level usage totals retain their existing semantics. Track named native tool IDs for the active Turn, including tools whose results have already arrived. Deduplicate identical text/thinking block snapshots by message UUID and block position without discarding newly added tools. Preserve anonymous/blank-ID result matching and keep repeated tools from cutting off subsequent streaming text.
CodeBuddy / WorkBuddy: retain the first-started ledger's ownership of tool-${callId} when Agent metadata arrives late. Preserve child-message filtering and the existing Agent-first routing. Exclude already-started Agent Items from command history replay and avoid duplicate Items within a command replay batch.
Diagnostics: retain Host Item started more than once and append Item ID plus existing/incoming Item types. Add Harness/Thread IDs to the external-output failure log without adding prompt or tool-argument logging. Fault/close behavior remains unchanged.
Validation performed
Installed dependencies with npm ci --no-audit --no-fund.
Changed-file prettier --check and eslint; node tools/check-boundaries.mjs; git diff --check.
New regression tests were first run against the unmodified implementations and reproduced duplicate-start exceptions and missing diagnostic context. An existing blank-ID compatibility test caught a result-matching regression during implementation; its behavior was restored before the final Qoder run.
Checked added comments for reasoning-transcript leakage.
No full-repository lint/format/test suites, Rust checks, Desktop restart, or live-model tests were run.
Scope / remaining uncertainty
The production logs in #844 lack Harness/Thread/Item attribution, so they cannot establish that these are all external sources of the reported failure. These deterministic paths are covered by regression tests; the added identifiers support investigation of any remaining sources. This PR uses Refs #844; the issue remains open for further attribution.
This change stops duplicate item-start events from the Qoder, CodeBuddy and WorkBuddy adapters and adds Harness, Thread and Item context to failure diagnostics. No concrete merge-blocking defect was established. The shared projector still throws on duplicate IDs, so issue #844 is only partly addressed.
Diagnostics(app-server-host.ts、codex-ui-projector.ts 及相关测试):在错误信息中增加 Item ID、类型、Harness ID、Thread ID,并保留 Host Item started more than once 文本。此项支持 #844 的问题定位,且未记录提示词或工具参数。
未发现与 #844 无关的功能变更。
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 5 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Refs #844
Prevent reproducible duplicate
item.startedemissions at their Adapter sources. The shared projector still throws on every duplicate Item ID; this does not introduce projector-level deduplication, automatic recovery, new packages, or public contract changes.Changes
assistant,stream_event, andusermessages (parent_tool_use_idis neither null nor undefined), including their effect on parent usage/checkpoints. Result-level usage totals retain their existing semantics. Track named native tool IDs for the active Turn, including tools whose results have already arrived. Deduplicate identical text/thinking block snapshots by message UUID and block position without discarding newly added tools. Preserve anonymous/blank-ID result matching and keep repeated tools from cutting off subsequent streaming text.tool-${callId}when Agent metadata arrives late. Preserve child-message filtering and the existing Agent-first routing. Exclude already-started Agent Items from command history replay and avoid duplicate Items within a command replay batch.Host Item started more than onceand append Item ID plus existing/incoming Item types. Add Harness/Thread IDs to the external-output failure log without adding prompt or tool-argument logging. Fault/close behavior remains unchanged.Validation performed
npm ci --no-audit --no-fund.prettier --checkandeslint;node tools/check-boundaries.mjs;git diff --check.build(tsc -b):adapter-qoder,adapter-qoder-cn,adapter-codebuddy,adapter-workbuddy,protocol-core, andhost-runtime(plus required project references).tests/tsconfig.json.tests/vitest.config.js: 224 tests across 17 files passed, comprising:qoder-stream-dedup,qoder-tool-items,qoder-adapter,qoder-sdk58-compat,qoder-lifecycle,qoder-history).duplicate-tool-start,turn-output,subagents,codebuddy-adapter,slash-commands; WorkBuddy:streaming-boundaries; protocol-core:codex-ui-projector,codex-ui-projector-failure,codex-ui-projector-pending,codex-ui-projector-detached; Host:app-server-host.output-failure— 111 tests / 11 files.No full-repository lint/format/test suites, Rust checks, Desktop restart, or live-model tests were run.
Scope / remaining uncertainty
The production logs in #844 lack Harness/Thread/Item attribution, so they cannot establish that these are all external sources of the reported failure. These deterministic paths are covered by regression tests; the added identifiers support investigation of any remaining sources. This PR uses
Refs #844; the issue remains open for further attribution.