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
{{ message }}
Repository navigation
Control UI shows duplicate messages when secret-redaction rewrites the local transcript copy but the CLI-imported copy keeps full text (exact-equality dedupe in cli-session-history) #112930
When an inbound webchat message contains a token that matches the default secret-redaction patterns (e.g. a long percent-encoded session URL like https://host.example/chat?session=agent%3Amain%3Adashboard%3A<uuid>), the Control UI renders the message twice.
Root cause
Two transcript copies of the same message legitimately diverge:
The gateway persists the redacted form to its local session transcript — maskToken keeps the leading chars + … + last 4 (agent%…d73b).
The bound claude-cli session file keeps the full text (the model needs it).
isEquivalentImportedMessage (src/gateway/cli-session-history.ts) dedupes local vs CLI-imported history by external identity, then exact text equality plus a timestamp window:
Redacted local ≠ full imported → the merge keeps both → double message in the UI. Reproduces on every message containing a redactable token; messages without such tokens dedupe fine.
In a Control UI chat bound to a claude-cli session, send a message containing a long secret-looking token (a percent-encoded URL query works).
Reload / let history re-render: the message appears twice — once with the token masked (…), once in full (imported from the CLI transcript).
Suggested fix
Either:
apply the same transcript redaction to CLI-imported messages before merge/display (also closes the inconsistency that the full "secret" is displayed via the import path despite being redacted in the local store), or
extend isEquivalentImportedMessage with an anchored elided-segment match: when one text contains … and is shorter, split it on … and require the segments to appear in order in the other text, anchored at start and end (role check retained). This dedupes redacted-vs-full copies without risking cross-message collisions.
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed July 25, 2026, 11:03 PM ET / July 26, 2026, 03:03 UTC.
Summary
Keep this issue open because the provided context identifies an open pull request with explicit closing syntax for this exact defect. The proposed fix needs normal PR review and merge before the issue can be closed as implemented.
Reproducibility: no. high-confidence live reproduction was run in this read-only review. The supplied report and linked fix describe a clear source-level path involving redacted local history and full Claude CLI imports.
Root-cause cluster
Relationship: canonical
Canonical: #112930
Summary: This is the canonical report for the redacted-local versus full-CLI-import equality mismatch; the linked open pull request is its candidate repair.
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.
Ways to help us reproduce this
Add a screenshot or short recording showing the behavior.
Add expected vs actual behavior.
Include redacted logs or terminal output.
Next step
An open linked pull request already owns the narrow implementation path, so a separate repair job would duplicate active work.
Review details
Best possible solution:
Land a focused, regression-tested history-merge repair that recognizes the local redacted form as equivalent to its full CLI-imported source while preserving distinct-message detection.
Do we have a high-confidence way to reproduce the issue?
No high-confidence live reproduction was run in this read-only review. The supplied report and linked fix describe a clear source-level path involving redacted local history and full Claude CLI imports.
Is this the best way to solve the issue?
Unclear until the linked PR’s exact comparison logic and regression cases are reviewed against current main. Its stated narrow direction is appropriate if it preserves deduplication for equivalent text without collapsing distinct edits.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
The linked repair changes session-history equivalence behavior, so it should prove that genuinely edited or distinct messages are not collapsed while redacted/full representations of one message are deduplicated.
Codex review notes: model internal, reasoning high; reviewed against 08138cabe0b3.
Label changes
Label changes:
add P2: This is a concrete Control UI session-history defect with limited, user-visible blast radius.
add impact:session-state: The duplicate results from merging two representations of the same session transcript message.
add impact:ux-friction: Users see confusing duplicate chat messages, but the report does not establish a blocked setup or recovery flow.
add issue-rating: 🐚 platinum hermit: Current issue advisory state selects this label.
add clawsweeper:needs-live-repro: Current issue advisory state selects this label.
add clawsweeper:linked-pr-open: Current issue advisory state selects this label.
add clawsweeper:no-new-fix-pr: Current issue advisory state selects this label.
Label justifications:
P2: This is a concrete Control UI session-history defect with limited, user-visible blast radius.
impact:session-state: The duplicate results from merging two representations of the same session transcript message.
impact:ux-friction: Users see confusing duplicate chat messages, but the report does not establish a blocked setup or recovery flow.
Evidence reviewed
What I checked:
Linked open fix: The supplied GitHub context contains an open pull request with explicit closing syntax and a matching stated root cause: redacted local transcript text versus full CLI-imported text fails exact-equality deduplication. (src/gateway/cli-session-history.ts, f7fc964fb7f3)
Issue reproduction report: The issue provides a concrete Claude CLI-bound Control UI path: send text containing a redactable token, then reload or re-render history and observe masked and full copies of the same message. (src/gateway/cli-session-history.ts, 08138cabe0b3)
Repository review policy: Root policy requires keeping an issue open while an open pull request explicitly references it with closing syntax; that PR is an implementation candidate, not closure evidence before merge. (AGENTS.md, 08138cabe0b3)
Likely related people:
he-yufeng: Authored the open focused repair for the exact CLI-import history-deduplication behavior described in this issue; broader current-main ownership could not be independently established in the read-only environment. (role: linked fix author; confidence: medium; commits: f7fc964fb7f3; files: src/gateway/cli-session-history.ts)
How this review workflow works
ClawSweeper keeps one durable marker-backed review comment per issue or PR.
Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
Maintainers can also comment @clawsweeper review to request a fresh review only.
Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
The imported Claude CLI copy now passes through the canonical transcript redactor before history merge. That prevents secrets present only in the imported transcript from reaching Control UI history and makes dedupe compare like-with-like: the imported and locally persisted copies have the same redacted display text before exact-text matching.
Focused proof covered full-vs-redacted and already-redacted dedupe, preserved distinct external identities, edited local identity matches, and imported-only secret suppression (44/44 tests). Exact-head hosted CI passed before merge.
Activity
clawsweeper commentedon Jul 26, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed July 25, 2026, 11:03 PM ET / July 26, 2026, 03:03 UTC.
Summary
Keep this issue open because the provided context identifies an open pull request with explicit closing syntax for this exact defect. The proposed fix needs normal PR review and merge before the issue can be closed as implemented.
Reproducibility: no. high-confidence live reproduction was run in this read-only review. The supplied report and linked fix describe a clear source-level path involving redacted local history and full Claude CLI imports.
Root-cause cluster
Relationship:
canonicalCanonical: #112930
Summary: This is the canonical report for the redacted-local versus full-CLI-import equality mismatch; the linked open pull request is its candidate repair.
Members:
fixed_by_candidate: fix(gateway): dedupe redacted local transcripts against full CLI imports #112934 - The PR directly targets this issue’s redacted local transcript versus full CLI-import deduplication mismatch.adjacent_distinct: [Bug]: ACP sessions in Control UI (webchat) show duplicate identical replies for each prompt #110368 - It concerns ACP duplicate assistant turns, not the CLI-import redaction comparison path.partial_overlap: Umbrella: duplicate transcript, replay, and context assembly across channels #69208 - It tracks a broader duplicate transcript and replay family but does not establish this exact CLI-import root cause.Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.
Ways to help us reproduce this
Next step
An open linked pull request already owns the narrow implementation path, so a separate repair job would duplicate active work.
Review details
Best possible solution:
Land a focused, regression-tested history-merge repair that recognizes the local redacted form as equivalent to its full CLI-imported source while preserving distinct-message detection.
Do we have a high-confidence way to reproduce the issue?
No high-confidence live reproduction was run in this read-only review. The supplied report and linked fix describe a clear source-level path involving redacted local history and full Claude CLI imports.
Is this the best way to solve the issue?
Unclear until the linked PR’s exact comparison logic and regression cases are reviewed against current main. Its stated narrow direction is appropriate if it preserves deduplication for equivalent text without collapsing distinct edits.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against 08138cabe0b3.
Label changes
Label changes:
P2: This is a concrete Control UI session-history defect with limited, user-visible blast radius.impact:session-state: The duplicate results from merging two representations of the same session transcript message.impact:ux-friction: Users see confusing duplicate chat messages, but the report does not establish a blocked setup or recovery flow.issue-rating: 🐚 platinum hermit: Current issue advisory state selects this label.clawsweeper:needs-live-repro: Current issue advisory state selects this label.clawsweeper:linked-pr-open: Current issue advisory state selects this label.clawsweeper:no-new-fix-pr: Current issue advisory state selects this label.Label justifications:
P2: This is a concrete Control UI session-history defect with limited, user-visible blast radius.impact:session-state: The duplicate results from merging two representations of the same session transcript message.impact:ux-friction: Users see confusing duplicate chat messages, but the report does not establish a blocked setup or recovery flow.Evidence reviewed
What I checked:
src/gateway/cli-session-history.ts, f7fc964fb7f3)src/gateway/cli-session-history.ts, 08138cabe0b3)AGENTS.md, 08138cabe0b3)Likely related people:
src/gateway/cli-session-history.ts)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.fix(gateway): redact CLI-imported history before dedupe (#115597)
steipete commentedon Jul 29, 2026
Fixed by #115597, landed as 95f62ee.
The imported Claude CLI copy now passes through the canonical transcript redactor before history merge. That prevents secrets present only in the imported transcript from reaching Control UI history and makes dedupe compare like-with-like: the imported and locally persisted copies have the same redacted display text before exact-text matching.
Focused proof covered full-vs-redacted and already-redacted dedupe, preserved distinct external identities, edited local identity matches, and imported-only secret suppression (44/44 tests). Exact-head hosted CI passed before merge.
fix(gateway): redact CLI-imported history before dedupe (openclaw#115597