Clear chat history after session reset#740
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Codex review: needs maintainer review before merge. Reviewed June 10, 2026, 1:38 PM ET / 17:38 UTC. Summary Reproducibility: yes. Current main has no Chat-provider reset-completion handling, and the inspected screenshots plus source path show the timeline remaining populated until this branch clears it. Review metrics: 3 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the provider-owned reset handling with its generation-safe first-turn gates and retain the focused race tests as the compatibility contract for local and remote post-reset delivery. Do we have a high-confidence way to reproduce the issue? Yes. Current main has no Chat-provider reset-completion handling, and the inspected screenshots plus source path show the timeline remaining populated until this branch clears it. Is this the best way to solve the issue? Yes. Handling successful reset completion in the provider that owns the native timeline is the narrowest maintainable boundary, and the follow-up closes the identified timestamp-less remote-turn gap without introducing a parallel reset mechanism. AGENTS.md: found and applied where relevant. Codex review notes: reasoning high; reviewed against 0e61fa287afb. Label changesLabel changes:
Label justifications:
Evidence reviewedAcceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Follow-up on the stale post-reset agent-event risk: I have a local surgical patch ready in this worktree. Root cause: Local fix:
Local validation:
Bundled autoreview note: the default Codex engine is not installed in this environment, and the available Copilot helper path requires an explicit unsandboxed-tools opt-in, so I did not override that safety gate here. |
Continue applying the reset timestamp cutoff to agent events even after the post-reset gate has reopened. This matches the chat-message path and prevents late pre-reset agent frames without tracked run IDs from rendering into a cleared timeline. Add regression coverage for a late pre-reset assistant delta arriving after a fresh post-reset turn has opened the gate. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Summary
Validation
./build.ps1dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore— 2200 passed, 29 skippeddotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore— 1005 passedReview
Proof Screenshots
Before the session reset:

After the session reset:
