mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-18 17:17:26 +00:00
fix: preserve inter-session input provenance (thanks @anbecker)
This commit is contained in:
@@ -94,6 +94,7 @@ Behavior:
|
||||
- Announce delivery runs after the primary run completes and is best-effort; `status: "ok"` does not guarantee the announce was delivered.
|
||||
- Waits via gateway `agent.wait` (server-side) so reconnects don't drop the wait.
|
||||
- Agent-to-agent message context is injected for the primary run.
|
||||
- Inter-session messages are persisted with `message.provenance.kind = "inter_session"` so transcript readers can distinguish routed agent instructions from external user input.
|
||||
- After the primary run completes, OpenClaw runs a **reply-back loop**:
|
||||
- Round 2+ alternates between requester and target agents.
|
||||
- Reply exactly `REPLY_SKIP` to stop the ping‑pong.
|
||||
|
||||
@@ -24,6 +24,7 @@ Scope includes:
|
||||
- Turn validation / ordering
|
||||
- Thought signature cleanup
|
||||
- Image payload sanitization
|
||||
- User-input provenance tagging (for inter-session routed prompts)
|
||||
|
||||
If you need transcript storage details, see:
|
||||
|
||||
@@ -72,6 +73,23 @@ Implementation:
|
||||
|
||||
---
|
||||
|
||||
## Global rule: inter-session input provenance
|
||||
|
||||
When an agent sends a prompt into another session via `sessions_send` (including
|
||||
agent-to-agent reply/announce steps), OpenClaw persists the created user turn with:
|
||||
|
||||
- `message.provenance.kind = "inter_session"`
|
||||
|
||||
This metadata is written at transcript append time and does not change role
|
||||
(`role: "user"` remains for provider compatibility). Transcript readers can use
|
||||
this to avoid treating routed internal prompts as end-user-authored instructions.
|
||||
|
||||
During context rebuild, OpenClaw also prepends a short `[Inter-session message]`
|
||||
marker to those user turns in-memory so the model can distinguish them from
|
||||
external end-user instructions.
|
||||
|
||||
---
|
||||
|
||||
## Provider matrix (current behavior)
|
||||
|
||||
**OpenAI / OpenAI Codex**
|
||||
|
||||
Reference in New Issue
Block a user