-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
[Bug]: Queued/orphaned user-message merge can produce stale reply #76888
Copy link
Copy link
Open
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
A queued/merged user message run used the latest prompt text, but the model answered an earlier unresolved user turn from the same session, producing a stale visible reply.
Steps to reproduce
Expected behavior
The assistant should answer the latest triggering user instruction for the run. If session repair/merge removes an orphaned user message, earlier unresolved user turns should not remain capable of steering the next model response over the latest prompt.
Actual behavior
The trajectory for the affected run showed the final prompt was the latest instruction, but the assistant output answered an earlier user message. The message snapshot still contained the older user turn before the latest instruction, and the gateway logged an orphaned user-message merge immediately before the run.
OpenClaw version
OpenClaw 2026.5.2 (8b2a6e5)
Operating system
Ubuntu 24.04, Linux 6.17.0-23-generic x86_64
Install method
npm global, gateway launched under systemd/supervisor with loopback gateway
Model
openai-codex/gpt-5.5
Provider / routing chain
OpenClaw -> openai-codex provider
Additional provider/model setup details
Discord channel-backed main agent session. A subagent announcement/inter-session message was queued around the same time as the latest user instruction. Private channel IDs, session IDs, and user content have been redacted from this report.
Logs, screenshots, and evidence