fix: expose sessions_send requester return path#97311
fix: expose sessions_send requester return path#97311henryyuen168-ship-it wants to merge 3 commits into
Conversation
|
Codex review: needs changes before merge. Reviewed June 27, 2026, 9:47 PM ET / 01:47 UTC. Summary PR surface: Source +11, Tests +68. Total +79 across 3 files. Reproducibility: yes. at source level, with medium confidence: current main starts A2A target runs with placeholdered extra prompt context plus Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Keep the Do we have a high-confidence way to reproduce the issue? Yes at source level, with medium confidence: current main starts A2A target runs with placeholdered extra prompt context plus Is this the best way to solve the issue? No as written: adding explicit Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 78f7de01c1aa. Label changesLabel justifications:
Evidence reviewedPR surface: Source +11, Tests +68. Total +79 across 3 files. View PR surface stats
Security concerns:
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
This pull request has been automatically marked as stale due to inactivity. |
|
Closing due to inactivity. |
Summary
sessions_sendA2A target prompt as source-reply contextmessage(action="send"), matchingsourceReplyDeliveryMode: "message_tool_only"sessions_sendback to the requesterWhy
A WhatsApp group-originated Koro 2 request to Alfred lost its original return path. Alfred received placeholder context (
<REQUESTER_SESSION>) and sent the result toagent:koro:main/ internal UI instead of the originating WhatsApp group session (agent:koro:whatsapp:group:[email protected]).Verification
node scripts/test-projects.mjs src/agents/tools/sessions-send-helpers.test.tsfailed on the missing concrete requester session before the fix.node scripts/test-projects.mjs src/agents/tools/sessions-send-helpers.test.ts src/agents/openclaw-tools.sessions.test.ts src/agents/tools/sessions-send-tool.a2a.test.tspassed 3 files / 65 tests after the source-reply follow-up.node scripts/test-projects.mjs src/agents/tools/sessions-send-helpers.test.ts src/agents/tools/sessions-send-tool.a2a.test.ts src/agents/tools/sessions.test.ts src/agents/tools/agent-step.test.ts src/agents/openclaw-tools.sessions.test.tspassed 5 files / 108 tests after the source-reply follow-up.git diff --check -- src/agents/tools/sessions-send-helpers.ts src/agents/tools/sessions-send-helpers.test.ts src/agents/openclaw-tools.sessions.test.tspassed.Real Behavior Proof
Redacted live relay test on 2026-06-27:
agent:koro:whatsapp:group:[email protected].agent:alfred:main.[email protected], message id3EB02408D91490BA94EE86.agent:koro:mainwas observed in the relay closeout.Review
ClawSweeper first flagged concrete requester keys leaking through shared reply/announce contexts. Commit
962de1b78bscoped concrete requester context to the initial target prompt only.ClawSweeper then flagged the reverse
sessions_sendinstruction as conflicting with the existingmessage_tool_onlysource-reply contract and duplicate-delivery guard work. Commit883e75b0eereplaces the reverse-send instruction withmessage(action="send")guidance and adds regression expectations that the initial target prompt does not containsessions_send(sessionKey:).Risk
The requester session key is visible to the first A2A target run only as source context. Visible source-channel output stays on the message tool path, while reply and announce contexts remain placeholdered to reduce prompt churn and avoid requester-side self-routing hints.