Repository navigation
Conversation
A2A completed tasks with the first delivery marked kind:"final", including supplemental model-fallback/status/reasoning/TTS notices, so a later real assistant final answer was ignored once the task was already terminal. Filter deliveries through the canonical isReplyPayloadTerminalContent classifier before completing the task.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. Reviewed September 20, 2026, 9:12 AM ET / 13:12 UTC (Revision 4). ClawSweeper reviewWhat this changesThe PR makes A2A tasks ignore supplemental notices before completing with the agent’s answer, exposes the existing reply classifier through the Plugin SDK, and updates its documentation, export budgets, and regression coverage. Merge readiness⛔ Blocked before merge - 3 items remain This remains a useful fix for answer loss present on current main and the latest release. No introduced correctness defect was found. The updated runtime account improves the evidence, but the reported before/after run still needs an inspectable trace. Priority: P1 Review scores
Verification
How this fits togetherThe A2A plugin accepts authenticated requests from other agents and sends them through OpenClaw’s reply pipeline. Its delivery callback completes an in-memory task that the requesting peer can retrieve. flowchart TD
A[Authenticated agent request] --> B[A2A task and agent execution]
B --> C[Reply delivery]
C --> D{Final terminal content?}
D -->|No| E[Keep task working]
D -->|Yes| F[Complete task with answer]
F --> G[Peer retrieves task]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +2, Tests -3, Docs +7, Other +2. Total +8 across 6 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Use the accepted shared SDK classifier at A2A completion while preserving peer-scoped FIFO delivery and terminal-error replies. Do we have a high-confidence way to reproduce the issue? Yes. Current source prepends a fallback notice to final replies, and A2A completes the pending task on that first payload; the linked report also documents the failure on an official release. This review did not execute the reproduction. Is this the best way to solve the issue? Yes. Reusing the existing classifier fixes the completion boundary without duplicating reply semantics or changing task correlation, authentication, or stored configuration. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 02e89c2683b8. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles) |
Clarify that the classifier only distinguishes terminal answer content from supplemental notices (reasoning, commentary, status/compaction/ fallback notices, TTS supplements) and does not check whether the payload is nonempty or otherwise sendable.
|
Addressed the merge-risk (P1) doc ask: Verified: On the "real behavior proof" ask: I can't produce that from this sandbox. The linked issue's live canary needed a real configured model provider whose primary attempt fails and falls back to a second one, plus an authenticated peer hitting a running Gateway — this environment has no model-provider credentials (no |
…alContent The exported classifier added in d3e9aba increased the public SDK export count by 1 without updating the pinned budget, failing test/scripts/plugin-sdk-surface-report.test.ts in CI.
|
Fixed the failing CI check (`checks-node-compact-small-28`): the new `isReplyPayloadTerminalContent` SDK export added one public export/callable export that the pinned budget in `scripts/plugin-sdk-surface-report.mts` (`publicExports`/`publicFunctionExports`) hadn't accounted for. Bumped both from 4485/2649 to 4486/2650 with a ledger comment. Pushed as ba649e4. Verified: reverted the budget change alone and reran `node scripts/run-vitest.mjs run test/scripts/plugin-sdk-surface-report.test.ts` — reproduces the exact CI failure (`exports 4485 vs 4486`, `callableExports 2649 vs 2650`); with the fix, all 10 tests pass. Also reran `extensions/a2a/src/inbound.test.ts`, `src/plugin-sdk/reply-payload.test.ts`, `src/auto-reply/reply-payload.test.ts`, and `src/plugin-sdk/api-baseline.test.ts` (all pass), plus `node scripts/run-oxlint.mjs --tsconfig tsconfig.json scripts/plugin-sdk-surface-report.mts` and `oxfmt --check` on the file (both clean). |
|
Both remaining blockers need capabilities outside contributor scope in this sandbox: Real behavior proof: Confirmed again — no model-provider credentials are present here (checked env for SDK export/budget acceptance: Per the PR's own "Decision needed" table, this needs an explicit maintainer decision that I can't grant as the contributor. Flagging for maintainer sign-off. |
|
Merged as e9686ad. A2A tasks now retain the actual answer instead of completing on a fallback notice. Verified the CLI-started Gateway and local HTTP-provider fallback round trip, 207 focused tests, and passing exact-head review/CI. The separate queued-followup failure tracked in #148025 remains outside this fix. Thanks @chelsealong for the fix and @edgarstool for the report. |
Closes openclaw#152105 ## What Problem This Solves Fixes: A2A tasks return a model-fallback notice instead of the agent's answer when a failed primary model is followed by a successful fallback. ## User Impact A2A clients receive the actual answer in the completed task artifact. Authentication, task retention, cancellation behavior, and the A2A protocol are unchanged. ## Why This Change Was Made A delivery marked `final` can still be a supplemental notice preceding the answer. A2A now uses the existing terminal-reply classifier through the reply-payload SDK instead of treating every final-lane payload as task completion. The SDK contract documents that classification is separate from content, sendability, and authority checks. ## Evidence - Actual CLI-started Gateway, registered A2A JSON-RPC endpoints, and a local OpenAI-compatible HTTP provider: a primary HTTP 503 followed by a successful fallback returned only the fallback notice before the change and the exact answer afterward. Public chat history independently retained the answer in both cases. - Ordinary replies, terminal HTTP 401 diagnostics, cross-peer task isolation, both unsupported cancellation aliases, and slash-command rejection were exercised. Built runtime provenance and a separate public SDK consumer verified the shared classifier. - 207 focused tests passed; the A2A regression fails on the original production code. Build, scoped type-aware lint, documentation syntax, line-limit ratchets, SDK export registration, and the approved SDK surface check passed. - Known separate failure: the second queued followup stalls with `Async work scope is closed` on both baseline and candidate, consistent with the separately owned openclaw#148025 work. This PR does not claim an all-green queued-delivery flow or repair that lifecycle. The provider was a controlled local fixture; no paid-provider, native-client, or broader notice-only/TTS/abort proof is claimed. Co-authored-by: Ayaan Zaidi <[email protected]>
Closes #152105
What Problem This Solves
Fixes: A2A tasks return a model-fallback notice instead of the agent's answer when a failed primary model is followed by a successful fallback.
User Impact
A2A clients receive the actual answer in the completed task artifact. Authentication, task retention, cancellation behavior, and the A2A protocol are unchanged.
Why This Change Was Made
A delivery marked
finalcan still be a supplemental notice preceding the answer. A2A now uses the existing terminal-reply classifier through the reply-payload SDK instead of treating every final-lane payload as task completion. The SDK contract documents that classification is separate from content, sendability, and authority checks.Evidence
Async work scope is closedon both baseline and candidate, consistent with the separately owned fix(auto-reply): keep followup queue drains alive after the triggering request ends #148025 work. This PR does not claim an all-green queued-delivery flow or repair that lifecycle.The provider was a controlled local fixture; no paid-provider, native-client, or broader notice-only/TTS/abort proof is claimed.