Repository navigation
fix(agents): allow silent native completion fallback - #196305
Conversation
|
🦞👀 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 maintainer review before merge. What this changesAllows native harness completion turns to finish silently unless a visible reply is explicitly required. Example: A native child-completion fallback returns an empty assistant response.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a current completion-policy omission with a focused change and convincing Gateway proof; no actionable defects were found. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe completion SDK submits child results to the requester’s announcement pipeline, which assigns a reply expectation before Gateway execution and terminal recovery. flowchart TD
A[Child task completion] --> B[Completion SDK]
B --> C[Announcement delivery]
C --> D[Reply expectation owner]
D --> E[Gateway agent turn]
E --> F[Terminal recovery]
E --> G[Delivery receipt]
Technical reviewBest possible solution: Extend the existing reply-expectation owner to recognize native completions while preserving explicit reply obligations and separate delivery receipts. Do we have a high-confidence way to reproduce the issue? The SDK arguments and current-main policy establish the forced-reply path, corroborated by supplied base/head Gateway results; this read-only review ran no target code. Is this the best way to solve the issue? This is the smallest complete fix for forced continuation: one existing policy owner changes, and an existing delivery-boundary regression covers the omission without new machinery. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9cebce499eb5. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +2, Tests -1. Total +1 across 2 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReviewed November 9, 2026, 11:22 PM ET / November 10, 2026, 04:22 UTC (Revision 3). |
|
Added inspectable, redacted JSON output from the real Gateway/SDK base/head reproduction and the built Gateway's actual native-runtime run to the Evidence section. The raw counts distinguish the seed turn, empty completion, and remaining retryable receipt; no acknowledgment-loss fix is claimed. No source/head changes. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Proof on built Gateways (node 24.22.1, secretless Docker, scripted local stand-in model). main A minimal local harness plugin registers an agent harness that forwards each turn to the stand-in model, keeps the host-issued completion scope, and then calls the shipped
Tests: the existing direct-delivery custody test now uses |
fix(agents): let silent native harness completions settle quietly #185388 made subagent completion turns reply-optional, so a parent that has nothing to add can stay silent. Native harness completions are delivered through the same announcement path with sourceTool agent_harness_completion, and that source was missed. A silent or NO_REPLY parent turn after a native helper completion was treated as an empty required reply, triggered a visible-answer continuation, and sent a redundant second answer (#196253). agent_harness_completion now gets the same optional reply expectation. A caller that asks for a visible reply still gets one. Evidence: built Gateways on node 24.22.1 in secretless Docker with a scripted local stand-in model and a small local harness plugin calling the shipped deliverAgentHarnessCompletion. After a native completion where the parent replied empty or NO_REPLY, main made 2 model requests and sent 1 extra reply after "empty response detected ... visible-answer continuation"; this change makes 1 request and sends nothing. A native completion with a visible reply, a subagent_announce with an empty reply, and a yielded subagent_settle that requires a visible result behave the same on both. Details: openclaw/openclaw#196305 (comment). Closes #196253. Thanks @indra622. Co-authored-by: Ayaan Zaidi <[email protected]>
Main #196305 removed one test line after the first reviewed candidate. Reduce the warm-reload debt allocation from nine to eight so total credit is exactly 11 and the current 6615839-line tree has zero slack.
fix(agents): let silent native harness completions settle quietly #185388 made subagent completion turns reply-optional, so a parent that has nothing to add can stay silent. Native harness completions are delivered through the same announcement path with sourceTool agent_harness_completion, and that source was missed. A silent or NO_REPLY parent turn after a native helper completion was treated as an empty required reply, triggered a visible-answer continuation, and sent a redundant second answer (#196253). agent_harness_completion now gets the same optional reply expectation. A caller that asks for a visible reply still gets one. Evidence: built Gateways on node 24.22.1 in secretless Docker with a scripted local stand-in model and a small local harness plugin calling the shipped deliverAgentHarnessCompletion. After a native completion where the parent replied empty or NO_REPLY, main made 2 model requests and sent 1 extra reply after "empty response detected ... visible-answer continuation"; this change makes 1 request and sends nothing. A native completion with a visible reply, a subagent_announce with an empty reply, and a yielded subagent_settle that requires a visible result behave the same on both. Details: openclaw/openclaw#196305 (comment). Closes #196253. Thanks @indra622. Co-authored-by: Ayaan Zaidi <[email protected]>
#196432) * fix(test): reconcile warm reload and procfs test-line debt Allocate nine missing lines for #196385 and correct #196416 from 33 to its actual 36 test lines. #196423 is already fully allocated. Restore exactly 6615748 lines of ceiling with zero slack; preserve all regression coverage and the shared scalar. * fix(test): account for the latest main test-line offset Main #196305 removed one test line after the first reviewed candidate. Reduce the warm-reload debt allocation from nine to eight so total credit is exactly 11 and the current 6615839-line tree has zero slack.
#196432) * fix(test): reconcile warm reload and procfs test-line debt Allocate nine missing lines for #196385 and correct #196416 from 33 to its actual 36 test lines. #196423 is already fully allocated. Restore exactly 6615748 lines of ceiling with zero slack; preserve all regression coverage and the shared scalar. * fix(test): account for the latest main test-line offset Main #196305 removed one test line after the first reviewed candidate. Reduce the warm-reload debt allocation from nine to eight so total credit is exactly 11 and the current 6615839-line tree has zero slack. (cherry picked from commit 644ff7d)
…esults (#196266) * improve(tool-search): show input signatures for MCP tools in search results tool_search rendered input "unknown" for every MCP tool, so models called tool_describe before almost every MCP call. Render the same bounded, structure-only signature used for OpenClaw tools from the MCP input schema. Client tools keep "unknown" because Code Mode lists them in its system prompt from the same compact entries. Remote schemas can carry huge literals, so string literals longer than the hint budget are rejected before serialization. Code Mode prompt construction skips MCP entries before compaction; it never listed them. Co-authored-by: jalehman <[email protected]> Co-authored-by: GrahamMcBain <[email protected]> * improve(tool-search): show input signatures for MCP tools in search results Worked on by: - @jalehman - @GrahamMcBain Co-authored-by: jalehman <[email protected]> Co-authored-by: GrahamMcBain <[email protected]> OpenClaw-Publication: a0929bba-b988-4c27-b67d-606a685a1e6e * fix(test): restore the main test-line budget after warm reload changes (#196432) * fix(test): reconcile warm reload and procfs test-line debt Allocate nine missing lines for #196385 and correct #196416 from 33 to its actual 36 test lines. #196423 is already fully allocated. Restore exactly 6615748 lines of ceiling with zero slack; preserve all regression coverage and the shared scalar. * fix(test): account for the latest main test-line offset Main #196305 removed one test line after the first reviewed candidate. Reduce the warm-reload debt allocation from nine to eight so total credit is exactly 11 and the current 6615839-line tree has zero slack. (cherry picked from commit 644ff7d) * test(agents): align host-denial proof with immediate failure settlement --------- Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: jalehman <[email protected]> Co-authored-by: GrahamMcBain <[email protected]> Co-authored-by: Dallin Romney <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
fix(agents): let silent native harness completions settle quietly openclaw#185388 made subagent completion turns reply-optional, so a parent that has nothing to add can stay silent. Native harness completions are delivered through the same announcement path with sourceTool agent_harness_completion, and that source was missed. A silent or NO_REPLY parent turn after a native helper completion was treated as an empty required reply, triggered a visible-answer continuation, and sent a redundant second answer (openclaw#196253). agent_harness_completion now gets the same optional reply expectation. A caller that asks for a visible reply still gets one. Evidence: built Gateways on node 24.22.1 in secretless Docker with a scripted local stand-in model and a small local harness plugin calling the shipped deliverAgentHarnessCompletion. After a native completion where the parent replied empty or NO_REPLY, main made 2 model requests and sent 1 extra reply after "empty response detected ... visible-answer continuation"; this change makes 1 request and sends nothing. A native completion with a visible reply, a subagent_announce with an empty reply, and a yielded subagent_settle that requires a visible result behave the same on both. Details: openclaw#196305 (comment). Closes openclaw#196253. Thanks @indra622. Co-authored-by: Ayaan Zaidi <[email protected]>
openclaw#196432) * fix(test): reconcile warm reload and procfs test-line debt Allocate nine missing lines for openclaw#196385 and correct openclaw#196416 from 33 to its actual 36 test lines. openclaw#196423 is already fully allocated. Restore exactly 6615748 lines of ceiling with zero slack; preserve all regression coverage and the shared scalar. * fix(test): account for the latest main test-line offset Main openclaw#196305 removed one test line after the first reviewed candidate. Reduce the warm-reload debt allocation from nine to eight so total credit is exactly 11 and the current 6615839-line tree has zero slack.
…esults (openclaw#196266) * improve(tool-search): show input signatures for MCP tools in search results tool_search rendered input "unknown" for every MCP tool, so models called tool_describe before almost every MCP call. Render the same bounded, structure-only signature used for OpenClaw tools from the MCP input schema. Client tools keep "unknown" because Code Mode lists them in its system prompt from the same compact entries. Remote schemas can carry huge literals, so string literals longer than the hint budget are rejected before serialization. Code Mode prompt construction skips MCP entries before compaction; it never listed them. Co-authored-by: jalehman <[email protected]> Co-authored-by: GrahamMcBain <[email protected]> * improve(tool-search): show input signatures for MCP tools in search results Worked on by: - @jalehman - @GrahamMcBain Co-authored-by: jalehman <[email protected]> Co-authored-by: GrahamMcBain <[email protected]> OpenClaw-Publication: a0929bba-b988-4c27-b67d-606a685a1e6e * fix(test): restore the main test-line budget after warm reload changes (openclaw#196432) * fix(test): reconcile warm reload and procfs test-line debt Allocate nine missing lines for openclaw#196385 and correct openclaw#196416 from 33 to its actual 36 test lines. openclaw#196423 is already fully allocated. Restore exactly 6615748 lines of ceiling with zero slack; preserve all regression coverage and the shared scalar. * fix(test): account for the latest main test-line offset Main openclaw#196305 removed one test line after the first reviewed candidate. Reduce the warm-reload debt allocation from nine to eight so total credit is exactly 11 and the current 6615839-line tree has zero slack. (cherry picked from commit b67d29e) * test(agents): align host-denial proof with immediate failure settlement --------- Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: jalehman <[email protected]> Co-authored-by: GrahamMcBain <[email protected]> Co-authored-by: Dallin Romney <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
Related: #196253
What Problem This Solves
Fixes forced extra replies when a native child-completion fallback intentionally returns no assistant text.
User Impact
Native completion processing can remain silent instead of being retried with a visible-answer continuation. Explicit requests for a visible reply still require one.
This does not fix resumed-thread acknowledgment loss. An empty completion can still produce a retryable
visible_reply_missingdelivery receipt; receipt settlement and later delivery retries are unchanged. No configuration changes are required.Why This Change Was Made
Treat native harness completion notifications like other child-completion inputs at the existing reply-expectation owner. Available child findings alone do not create a new visible-reply obligation for their parent; the explicit visible-reply override keeps precedence.
Evidence
f947b3caf5d0fb04c780205dfeff509d87cd2527. No unrelated exports or guard baselines were changed.Inspectable execution output
The following JSON is copied from the retained synthetic-scenario execution summaries; no private prompts, native transcripts, credentials, IP addresses, or non-public endpoints are included.
Pristine base
f947b3caf5d0fb04c780205dfeff509d87cd2527: real Gateway/SDK with controlled backend I/O{ "native": false, "modelRequests": 2, "nativeStarts": 0, "delivery": { "delivered": true } }Candidate
55156431b17d068b1337eaf4d2b8c4ee99ba1798: same controlled scenario{ "native": false, "modelRequests": 1, "nativeStarts": 0, "delivery": { "delivered": false, "reason": "visible_reply_missing", "disposition": "retryable" } }Candidate: actual bundled native runtime through a normal built isolated Gateway
{ "native": true, "nativeStartsTotal": 2, "nativeStarts": 1, "assistantKind": "none", "assistantChars": 0, "delivery": { "delivered": false, "reason": "visible_reply_missing", "disposition": "retryable" } }The deterministic base check fails because it expects one inference and observes two; the candidate check passes with one. The live native run has two total starts because it includes one seed turn, with exactly one start during completion. Its empty completion emits no assistant text and no forced continuation. The remaining retryable missing-visible receipt is shown explicitly above and is not claimed fixed.
Validation commands:
pnpm test src/gateway/server.native-completion-proof.product.test.ts --maxWorkers=1on base and candidate;pnpm test src/gateway/server.native-completion-built-proof.product.test.ts --maxWorkers=1for the built native run. These temporary external validation fixtures exercise the production SDK/Gateway and are not additional committed product tests. The committed regression tests remain in this PR.