mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 11:30:43 +00:00
fix(webchat): keep runtime context out of visible transcripts
Keep WebChat runtime context available to the model while persisting only the transcript-facing user prompt across gateway, CLI, queued follow-up, and embedded Pi paths. Adds regression coverage for history sanitization, CLI transcript persistence, media-only auto-reply prompts, and embedded Pi prompt rewrite against a real SessionManager file. Co-authored-by: 91wan <91wan@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
b20208fa4c
commit
6e985a421d
@@ -16,6 +16,7 @@ file is backed up alongside the session file.
|
||||
|
||||
Scope includes:
|
||||
|
||||
- Runtime-only prompt context staying out of user-visible transcript turns
|
||||
- Tool call id sanitization
|
||||
- Tool call input validation
|
||||
- Tool result pairing repair
|
||||
@@ -30,6 +31,20 @@ If you need transcript storage details, see:
|
||||
|
||||
---
|
||||
|
||||
## Global rule: runtime context is not user transcript
|
||||
|
||||
Runtime/system context can be added to the model prompt for a turn, but it is
|
||||
not end-user-authored content. OpenClaw keeps a separate transcript-facing
|
||||
prompt body for Gateway replies, queued followups, ACP, CLI, and embedded Pi
|
||||
runs. Stored visible user turns use that transcript body instead of the
|
||||
runtime-enriched prompt.
|
||||
|
||||
For legacy sessions that already persisted runtime wrappers, Gateway history
|
||||
surfaces apply a display projection before returning messages to WebChat,
|
||||
TUI, REST, or SSE clients.
|
||||
|
||||
---
|
||||
|
||||
## Where this runs
|
||||
|
||||
All transcript hygiene is centralized in the embedded runner:
|
||||
|
||||
Reference in New Issue
Block a user