fix(chat): preserve persisted tool activity details - #1111
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 21, 2026, 7:50 AM ET / 11:50 UTC. ClawSweeper reviewWhat this changesThe PR preserves tool correlation, error details, and safely projected persisted arguments when a tray-chat conversation is reopened. Merge readinessKeep open. Current main still omits the persisted Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — execution before step 1 Assertions:
How this fits togetherGateway flowchart LR
A[Persisted Gateway history] --> B[Shared history parser]
B --> C[Tool correlation and error state]
C --> D[Tray replay projection]
D --> E[Activity grouping]
E --> F[WinUI chat cards]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Merge the focused replay repair while retaining its parser, projection, and failed-tool presentation regressions as the compatibility contract. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible with high confidence: current main rejects the persisted shapes exercised by the new parser and replay tests, and the contributor supplied exact-head after-fix Gateway-to-WinUI replay diagnostics. Is this the best way to solve the issue? Yes. The repair extends the shared parser and the existing authoritative safe-display projector instead of adding a parallel history or rendering path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d3ed6c78bf14. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (24 earlier review cycles; latest 8 shown)
|
Exact-head proof (
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Current-main reconciliation proofExact head: The branch was merged normally with current Fresh exact-head validation:
The PR is now mergeable and remains draft while exact-head CI and automatic review run. Existing redacted behavior captures remain the supported-path evidence; this reconciliation adds no new architecture, protocol, dependency, or ownership surface. |
Current-head persisted replay proof (
|
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: fbba7380-93e7-44a4-bd0b-d0ac1ebba543
e05d86c to
5049e5a
Compare
Exact-head persisted replay proof (
|
|
🦞👀 Re-review progress:
|
Inspectable redacted exact-head diagnostics (
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|


Related: #1092
What Problem This Solves
Fixes an issue where users reopening persisted chat history could lose important tool activity details: failed tool calls could be hidden inside a successful activity group, tool results using
callIdcould lose their correlation, message-level errors could be ignored, and JSON-string-encoded tool arguments could render without their safe display fields.Why This Change Was Made
The history parser now accepts the persisted aliases and shapes already emitted by the Gateway, while the existing
NativeToolProjectorremains authoritative for decoding and safe argument projection. Failed tools remain individually visible; only neighboring successful tools are compacted into activity groups. This is a narrow follow-up to the compact tool activity work in #1092.User Impact
Users can reopen older conversations and still inspect failed tools, correlated results, and safe command arguments without losing the compact presentation for successful activity.
Evidence
callId, message-level errors, JSON-string arguments, result correlation, and failure presentation.Change Type
Scope
winnodeValidation
./build.ps1- passed all 5 projects on exact heade05d86c5151bae9e6aa286231975c99616c577cedotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore- 3,632 passed, 0 failed, 32 skippeddotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore- 2,250 passed, 0 failed6CFA0FC0616FF77956461B71B6CAB4C83F3C88A8A495F9217F4D81E91CC95691git diff --check- passed; source worktree remained cleanReal Behavior Proof
2026.7.2-beta.6profile in WSLe05d86c5151bae9e6aa286231975c99616c577cechat.historymessages containing a JSON-stringreadcall and success result, plus an object-formexeccall and error resultConnected;read · Donewith safepath: proof/success.txt;exec · Errorwith safecommand: proof-command; correlated success/error result text visible9551A52E5D2A953E76C0BC99E5276AE718E1D847B1095E9402707F9B23BE2B91; post-reopenAD787822369BAD8A9FD352F08A181286B633FB5B745055E79C33FE39B996D72Cruntime_provenfor current-head persisted Gateway-to-WinUI replay and post-reopen persistence; not claimed as provider or real tool-execution proofYes/No/N/A): accessibility/live diagnostic evidence is copied into the PR discussion; no token, endpoint, device/request identifier, private transcript, or raw filesystem path is includedSecurity Impact
Yes/No): NoYes/No): NoYes/No): NoYes/No): NoYes/No): NoYes, explain the risk and mitigation: N/ACompatibility and Migration
Yes/No): YesYes/No): NoYes/No): NoReview Conversations