Repository navigation
fix(claude-cli): deduplicate live and imported assistant turns - #118309
clawsweeper[bot] wants to merge 2 commits into
Conversation
|
Codex review: blocked before merge. What this changesThis PR records Claude assistant UUIDs on saved replies and suppresses imported history records with matching identities. Example: Claude session claude-session emits “leading text”, a Bash call, and “hello from Claude”.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Partial Merge readiness⛔ Blocked before merge - 3 items remain Keep this PR open: it targets a confirmed history-duplication bug, but the previously reported content-loss defect remains unfixed. Priority: P1 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe CLI runner persists assistant replies while Claude maintains native transcripts; Gateway history imports and merges those representations for chat clients. flowchart TD
A[Claude CLI turn] --> B[Output parser]
B --> C[Saved assistant reply]
A --> D[Native transcript]
D --> E[History importer]
C --> F[History merge]
E --> F
F --> G[Chat history]
Technical reviewBest possible solution: Record the native-turn relation at the producer and retain a complete representation before suppressing any matched content. Do we have a high-confidence way to reproduce the issue? Source and the added fixtures establish the failure: a final-only saved reply claims leading-text and tool UUIDs, then the merger drops those richer native rows; no runtime reproduction was executed in this read-only review. Is this the best way to solve the issue? This is not the best fix as written: producer correlation is the right boundary, but observed UUIDs cannot stand for content the saved reply omits; preserve the identified native turn or prove coverage before suppression. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ff908fed3f95. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +64, Tests +158. Total +222 across 6 files. Added test files: 0. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (14 earlier review cycles; latest 8 shown)
Reviewed October 17, 2026, 12:26 PM ET / 16:26 UTC (Revision 15). |
|
🦞🧹
This is fix-only; I will not merge this PR. Re-review progress:
|
7af0569 to
bb567cd
Compare
|
🦞✅ Source: Why human review is needed: What the maintainer can do as a next step: I added |
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
|
Thanks for the PR. We're closing older pull requests that have gone stale against current This automated fix has been blocked since August on a review finding that it would hide native content from history, with no further commits. The underlying duplicate-transcript issue stays open for a correct fix. If this change is still needed, please open a fresh PR against current |
Fixes #118185.
Summary
resumeCheckpointId) and bound Claude session id onto the durable CLI assistant transcript record.Regression coverage
(importedFrom, cliSessionId, externalId)tuple only when both existing parsed facts are available.Release-note context
This corrects a user-visible duplicate reply in Claude CLI WebChat history. Do not edit
CHANGELOG.md; release automation owns it.Required labels:
clawsweeper:autogenerated,clawsweeper:autofix.