Repository navigation
Description
Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
Version: OpenClaw 2026.6.1 (2e08f0f)
OS: macOS
Bug: When a delivery fails, the gateway retry mechanism cycles through
active sessions as relay vehicles, bypassing delivery.mode=none. This
corrupts the sessions being used as relays, causing LLM schema errors
on next startup.
Pattern observed:
- Agent sends message, believes it sent
- Delivery retry fires on alternating channels (webchat → unknown)
- Same payload delivered 3x in a row
- Sessions used as relay vehicles become corrupted
- Affected agents hit "LLM request failed: provider rejected the request
schema or tool payload" on next turn
Workaround: Manual session clear via sessions.json + gateway restart.
Expected behavior: Retry logic should not use active persistent main
sessions as relay vehicles. delivery.mode=none should be respected at
the retry layer.
Steps to reproduce
- Run a multi-agent fleet with persistent main sessions on multiple agents (coordinator, vice-chair, cortex).
- Agent attempts to send a message via sessions_send tool.
- Delivery fails on primary channel.
- Gateway retry mechanism fires — cycles through active persistent main sessions as relay vehicles.
- Same payload delivered 3x on alternating channels (webchat → unknown).
- Affected relay sessions become corrupted.
- On next startup, corrupted agents hit "LLM request failed: provider rejected the request schema or tool payload."
Expected behavior
Retry logic should not use active persistent main sessions as relay vehicles. delivery.mode=none should be respected at the retry layer. Retries should fail gracefully without corrupting unrelated sessions.
Actual behavior
Gateway retry selector bypasses delivery.mode=none by cycling active sessions as relay vehicles. Results in session corruption, LLM schema errors on next startup, and repeated delivery of the same payload on alternate channels. Workaround: manual session clear via sessions.json + gateway restart.
OpenClaw version
2026.6.1 (2e08f0f)
Operating system
macOS 15.4
Install method
npm global
Model
anthropic/claude-opus-4-6 / anthropic/claude-sonnet-4-6
Provider / routing chain
openclaw -> anthropic
Additional provider/model setup details
No response
Logs, screenshots, and evidence
Impact and severity
Affected: All persistent main sessions fleet-wide (16 agents).
Severity: Blocks workflow — corrupted sessions require manual
intervention to clear (sessions.json edit + gateway restart) before
affected agents can function.
Frequency: Intermittent — triggers when delivery fails on a session
that has active persistent main sessions running.
Consequence: Agent downtime, repeated duplicate message delivery
on alternate channels, manual recovery required each occurrence.
In a production multi-agent RIA compliance fleet, this causes
unplanned outages during business hours.
Additional information
No response
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Jun 8, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 8, 2026, 9:05 AM ET / 13:05 UTC.
Summary
Keep open: current main and the latest release still contain the sessions_send active-run fallback and A2A reply-back path implicated by the report, and the attached log shows repeated inter-session deliveries over webchat/unknown routes. The exact current-main failure was not live-reproduced, so this should be repaired with focused regression coverage rather than closed as fixed.
Reproducibility: no. high-confidence live reproduction was established. The issue is source-reproducible from the attachment plus current code paths that reroute rejected active-run sends into fallback sessions and A2A delivery.
Ways to help us reproduce this
Next step
A focused repair looks possible in the sessions_send active-run fallback/A2A path, but the worker must preserve documented reply-back behavior and stop if the fix requires changing product semantics beyond the unsafe fallback.
Review details
Best possible solution:
Keep sessions_send delivery internal to the intended active/run-scoped target: if the active-run queue rejects a message_tool_only/no-deliver send, fail or surface a delivery error instead of falling back through a persistent main session, with regression coverage for duplicate delivery and transcript safety.
Do we have a high-confidence way to reproduce the issue?
No high-confidence live reproduction was established. The issue is source-reproducible from the attachment plus current code paths that reroute rejected active-run sends into fallback sessions and A2A delivery.
Is this the best way to solve the issue?
Yes, the narrowest maintainable direction is to remove or constrain the durable-session fallback on rejected active-run delivery, not to add a new config knob or disable all documented sessions_send reply-back behavior.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 2858c629bd0f.
Label changes
Label changes:
P1: The report describes a current shipped workflow that can duplicate inter-session messages, corrupt active session transcripts, and require manual recovery before agents can function.impact:message-loss: The observed behavior includes duplicated or misrouted delivery over alternate webchat/unknown paths.impact:session-state: The core complaint is corruption of persistent main session state leading to later provider schema/tool-payload failures.issue-rating: 🐚 platinum hermit: Current issue advisory state selects this label.clawsweeper:needs-live-repro: Current issue advisory state selects this label.Label justifications:
P1: The report describes a current shipped workflow that can duplicate inter-session messages, corrupt active session transcripts, and require manual recovery before agents can function.impact:session-state: The core complaint is corruption of persistent main session state leading to later provider schema/tool-payload failures.impact:message-loss: The observed behavior includes duplicated or misrouted delivery over alternate webchat/unknown paths.Evidence reviewed
Acceptance criteria:
What I checked:
src/agents/tools/sessions-send-tool.ts:225, 2858c629bd0f)src/agents/tools/sessions-send-tool.ts:645, 2858c629bd0f)src/agents/tools/sessions-send-tool.a2a.ts:145, 2858c629bd0f)docs/concepts/session-tool.md. (docs/concepts/session-tool.md:108, 2858c629bd0f)src/agents/tools/sessions-send-tool.ts:220, 2e08f0f4221f)Likely related people:
src/agents/tools/sessions-send-tool.ts,src/agents/tools/sessions-send-tool.a2a.ts,src/agents/tools/agent-step.ts)src/agents/tools/sessions-send-tool.ts,src/agents/tools/agent-step.ts)src/agents/tools/sessions-send-tool.ts)src/agents/tools/sessions-send-tool.a2a.ts)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.fix(agents): narrow sessions_send active-run fallback
fix(agents): narrow sessions_send active-run fallback
fix(agents): narrow sessions_send active-run fallback