Repository navigation
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 real behavior proof before merge. What this changesThis PR tailors subagent completion guidance to tool-free and message-only requester turns. Example: A restricted completion turn receives a child result reporting three remaining lint errors.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 2 items remain This PR addresses a current source-level prompt mismatch, and the revised head resolves the earlier messaging restriction finding; no new correctness defect was identified. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe agent attempt owner receives completion prompts and internal events, resolves the permitted tool surface, and forwards matching instructions to CLI or embedded runners. flowchart TD
A[Child completion] --> B[Announcement prompt and event]
B --> C[Agent attempt]
C --> D[Completion tool policy]
D --> E[Capability matched guidance]
E --> F[CLI or embedded runner]
F --> G[Requester update]
Technical reviewBest possible solution: Use the existing attempt-level tool policy to qualify shared completion guidance while preserving truthful child outcomes and permitted delivery. Do we have a high-confidence way to reproduce the issue? Current-main source demonstrates that restricted completion attempts receive execution-follow-up instructions; false-failure output was not independently reproduced during this read-only review. Is this the best way to solve the issue? Adapting guidance where the actual tool policy is resolved is proportionate, and the patch preserves existing authority and delivery owners. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 89c5b179fc3d. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +69, Tests +109. Total +178 across 4 files. Added test files: 1. 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. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label 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 HistoryReview history (1 earlier review cycle)
Reviewed November 14, 2026, 12:05 PM ET / 17:05 UTC (Revision 2). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
What Problem This Solves
Fixes #198584
When a subagent completion handoff runs on a degraded path where execution tools are stripped (
!completionRetainsRequesterTools, including bothdisableTools: trueand["message"]-only delivery turns), the prompt andtask_completioninternal events still carriedSUBAGENT_COMPLETION_OUTCOME_INSTRUCTION, which instructs the model to "require continued work or a follow-up in the kept child session; report a blocker only when progress needs new user authority."Because the turn has no execution or delegation tools, models following that instruction literally either attempt blocked tool calls (burning tokens on error round-trips) or report a spurious task failure/blocker to the user for work that already succeeded.
Changes
SUBAGENT_COMPLETION_RELAY_ONLY_OUTCOME_INSTRUCTIONandrewriteSubagentCompletionReplyInstructionForRelayOnlyinsrc/agents/subagents/completion/subagent-completion-instructions.tsso relay-only turns are instructed not to attempt tool calls or follow-up runs and to report the captured result truthfully (noting any needed follow-up for a normal turn).adaptCompletionRelayTurnForToolSurfaceinsrc/agents/command/attempt-execution.helpers.ts(avoiding object spread in.map(...)) to rewrite bothpromptandtask_completioninternalEventswhenisSubagentAnnounceHandoff && !completionRetainsRequesterTools.adaptCompletionRelayTurnForToolSurfaceinto both the CLI and embedded execution paths insrc/agents/command/attempt-execution.ts.src/agents/command/attempt-execution.completion-relay.test.tscovering relay-only rewriting,task_completionevent immutability, and preservation when requester tools are retained or the turn is not a completion handoff.Evidence
adaptCompletionRelayTurnForToolSurfaceandrewriteSubagentCompletionReplyInstructionForRelayOnlyunit tests insrc/agents/command/attempt-execution.completion-relay.test.ts.attempt-execution.tsthreads the adaptedpromptandinternalEventsinto bothrunCliAgentandrunEmbeddedAgentwhenisSubagentAnnounceHandoff && !completionRetainsRequesterTools, while leaving retained-tool handoffs and non-handoff turns unchanged.checks,oxlint,vitest) will validate the full suite on this PR.