fix(chat): preserve persisted tool activity details - #1111
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 9, 2026, 8:33 PM ET / August 10, 2026, 00:33 UTC. ClawSweeper reviewWhat this changesThe PR preserves failed tool rows, result correlation, message-level errors, and safely displayable arguments when persisted chat history is reopened. Merge readinessKeep open. Current main still omits the persisted Priority: P2 Review scores
Verification
How this fits togetherGateway chat-history responses are parsed into structured tool calls and results, then replayed into the tray chat timeline. The timeline presentation groups successful activity while rendering failures and allowlisted tool details for operators. flowchart LR
A[Persisted Gateway history] --> B[History parser]
B --> C[Tool call and result records]
C --> D[Tray timeline replay]
D --> E[Activity grouping decision]
E --> F[Inspectable chat rows]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the focused parser, safe-projection, and presentation changes so old Gateway transcripts retain truthful, inspectable tool outcomes without exposing arbitrary argument payloads. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main's parser and replay paths omit the exact aliases and string-argument form covered by this PR, and the contributor supplied a final-head persisted Gateway-to-WinUI replay. Is this the best way to solve the issue? Yes. The patch extends the existing parser and authoritative safe projector rather than adding a parallel history path, with focused coverage for each persisted shape. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 582a44713860. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (16 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. |
be50098 to
919ec7c
Compare
Current-head persisted replay proof (
|
|
🦞🧹 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
./build.ps1passed for Shared, CLI, WinNodeCLI, SetupEngine, and WinUI.patch is correct: 0.98).win-x64candidate started successfully in a network-disabled disposable Windows Sandbox and was promoted locally with rollback preserved.agent:main:mainconversation was reopened on exact head8d0f5480: the failedLcm Grepremained an individually inspectablefailedrow, neighboring successful tools remained grouped, and safe projected arguments were visible forMemory Search,Lcm Grep,Session Search, andSession History.Change Type
Scope
winnodeValidation
./build.ps1- passdotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore- 3,413 passed, 0 failed, 32 skippeddotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore- 2,168 passed, 0 faileddotnet publish src/OpenClaw.Tray.WinUI -c Release -r win-x64 --self-contained --no-restore- passsetup-connectjob did not reach checkout or execute repository code: GitHub Actions failed while resolving action download metadata withService Unavailable/Internal Server Error. Contributor rerun is unavailable; a maintainer rerun is needed.Real Behavior Proof
8d0f5480win-x64publish, disposable Sandbox launch, guarded local promotion, then reopen and expand a real persisted conversationYes/No/N/A): No public media uploaded; redacted captures were reviewed locally to avoid repository bloat and private-path disclosuresetup-connectrerun requires maintainer permission because its current infrastructure failure occurred before repository checkoutSecurity 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