fix(agents): skip A2A announce flow for isolated cron sessions_send#93826
fix(agents): skip A2A announce flow for isolated cron sessions_send#93826LiLan0125 wants to merge 3 commits into
Conversation
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded: current main still has the isolated-cron sessions_send A2A requester-injection bug, but the same remaining fix is now owned by a stronger open, mergeable sibling with baseline handling, regression tests, and sufficient runtime proof. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Use #92283 as the single canonical fix, then close the linked bug after that PR lands. So I’m closing this here and keeping the remaining discussion on #92283. Review detailsBest possible solution: Use #92283 as the single canonical fix, then close the linked bug after that PR lands. Do we have a high-confidence way to reproduce the issue? Yes, at source level. Current main passes positive A2A turns into a callee that can step the requester session, and the linked issue provides matching observed isolated-cron feedback-loop logs. Is this the best way to solve the issue? No. This branch is a plausible partial fix, but the sibling PR is the better landing path because it adds the missing baseline handling, targeted tests, and real runtime proof. Security review: Security review cleared: The diff changes in-repo agent control flow only and adds no dependency, workflow, secret, permission, package, or third-party code-execution surface. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 190ca52882bf. |
|
@clawsweeper re-review Updated the detector to use the canonical parser instead of raw substring matching (per P1 finding). Added production-function verification showing the classifier correctly rejects non-canonical keys like while matching real cron run keys. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
ec4a009 to
bb0a8db
Compare
|
@clawsweeper re-review Narrowed the fix per review feedback: instead of skipping the entire A2A flow (which also suppressed target announce delivery), the fix now sets for isolated cron requesters. The target announce path still runs normally, but the requester ping-pong feedback loop is suppressed. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
8039686 to
4b3194e
Compare
008c2ad to
a30c5df
Compare
1eb9980 to
c80e876
Compare
9e694e5 to
c47723e
Compare
c47723e to
f8c3c92
Compare
f8c3c92 to
492e6dd
Compare
492e6dd to
a2948a3
Compare
Isolated cron sessions calling sessions_send had the target's reply injected back into the cron run via the A2A ping-pong loop, causing feedback loops and corrupted session state. Skip the A2A flow when the requester session key contains the :cron: marker, matching the pattern used by subagent-registry. Closes openclaw#92257
Replace the raw :cron: substring check with isCronRunSessionKey, which parses the canonical agent session key format and does not match non-cron keys that happen to contain :cron: (e.g. agent:main:slack:cron:job:run:uuid). Refs openclaw#92257
…e announce Per ClawSweeper review: skipping the entire A2A flow for isolated cron sessions_send also suppressed target announce delivery. Narrow the fix to only set maxPingPongTurns=0 for cron requesters, so the target announce path still runs but the requester feedback loop is prevented. Refs openclaw#92257
|
ClawSweeper applied the proposed close for this PR.
|
Summary
sessions_sendhad the target agent's reply injected back into the cron run via the A2A ping-pong loop ([Bug]: sessions_send with announce delivery injects Argus reply context into isolated cron session, causing agent feedback loop #92257).maxPingPongTurns=0for isolated cron requesters.Changes from previous iteration
skipCronA2AFlowfrom theskipA2AFlowgatecronPingPongTurnsvariable: 0 for cron requesters,maxPingPongTurnsfor normal callersstartA2AFlowcallback now passesmaxPingPongTurns: cronPingPongTurnsVerification
node scripts/run-vitest.mjs run src/agents/tools/sessions-send-tool.a2a.test.ts sessions-send-helpers.test.ts→ 27/27 passedisCronRunSessionKey(canonical parsed classifier), correctly rejecting non-canonical:cron:keysImpact Assessment
src/agents/tools/sessions-send-tool.ts— modifiesmaxPingPongTurnsfor cron requesters only"pending"and the announce path runs normallycronPingPongTurnsfalls back tomaxPingPongTurnsReal behavior proof
Behavior addressed: Narrowed fix that only suppresses the ping-pong requester feedback loop for isolated cron
sessions_send, while preserving the target announce delivery path.Environment tested: Node 22.x on Linux, vitest test suite.
Steps run after the patch: Ran sessions-send A2A and helpers test suites.
Evidence after fix:
Observed result: All 27 tests pass. The cron ping-pong suppression is parameterized through
maxPingPongTurns=0rather than skipping the entire A2A flow.Not tested: Live gateway with a cron job triggering sessions_send was not exercised.
Closes #92257