mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 17:10:49 +00:00
Preserve delivered assistant replies in session repair (#76420)
Summary: - The PR removes session-file repair's trailing-assistant disk trim, updates regression coverage, clarifies transcript hygiene docs, and adds a changelog entry for the Telegram/WebChat history loss fix. - Reproducibility: yes. Current main has a clear source path: a normal trailing assistant JSONL record is popped by `repairSessionFileIfNeeded`, and the main-branch test suite asserts that deletion. Automerge notes: - PR branch already contained follow-up commit before automerge: docs(agents): clarify session repair preservation - PR branch already contained follow-up commit before automerge: fix(agents): preserve delivered assistant replies in session repair Validation: - ClawSweeper review passed for head66c187fd76. - Required merge gates passed before the squash merge. Prepared head SHA:66c187fd76Review: https://github.com/openclaw/openclaw/pull/76420#issuecomment-4365323320 Co-authored-by: Ayaan Zaidi <hi@obviy.us> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
This commit is contained in:
@@ -7,9 +7,7 @@ read_when:
|
||||
title: "Transcript hygiene"
|
||||
---
|
||||
|
||||
OpenClaw applies **provider-specific fixes** to transcripts before a run (building model context). Most of these are **in-memory** adjustments used to satisfy strict provider requirements. A separate session-file repair pass may also rewrite stored JSONL before the session is loaded, either by dropping malformed JSONL lines or by repairing persisted turns that are syntactically valid but known to be rejected by a
|
||||
provider during replay. When a repair occurs, the original file is backed up alongside
|
||||
the session file.
|
||||
OpenClaw applies **provider-specific fixes** to transcripts before a run (building model context). Most of these are **in-memory** adjustments used to satisfy strict provider requirements. A separate session-file repair pass may also rewrite stored JSONL before the session is loaded, but only for malformed lines or persisted turns that are invalid durable records. Delivered assistant replies are preserved on disk; provider-specific assistant-prefill stripping happens only while constructing outbound payloads. When a repair occurs, the original file is backed up alongside the session file.
|
||||
|
||||
Scope includes:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user