Repository navigation
Closed
Closed
Copy link
Labels
P2Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
Description
Problem
The runtime currently emits an internal completion event with wording "ready for user delivery" which agents interpret as a signal that the task is complete and ready to be reported to the user.
However, in subagent workflows, this creates a critical bug where:
- "subagent completed successfully" is treated as equivalent to "external objective completed"
- Agents respond "done/ready/complete" without verifying if external resources (GitHub, deployments, etc.) were actually modified
- Textual results from subagents are treated as confirmation rather than input material
Affected Files
The following runtime bundles contain the misleading event wording:
- compact-1mmJ_KWL.js - Line containing "ready for user delivery"
- pi-embedded-D6PpOsxP.js - Similar internal event wording
- reply-BCcP6j4h.js - Similar internal event wording
Proposed Fix
Change the event wording from:
- "ready for user delivery"
To:
- "available for review"
And add explicit instruction:
- "Verify whether the result is only text/analysis or if the external target was actually applied and verified. Do not say done/ready/complete without evidence of final state."
Impact
This mitigates the "premature success / missing final verification" pattern where agents incorrectly claim completion after subagent returns, without validating:
- Whether the subagent's scope included actual external changes
- Whether GitHub issues/PRs were actually modified
- Whether deployments were actually triggered
Related
- Session: 2026-03-12 mitigation applied locally
- Workspaces affected: reasoning, coder, writer
- Pattern: subagent completion != external objective verification
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
Type
Fields
Priority
None yet
Activity
openclaw-barnacle commentedon Apr 28, 2026
This issue has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.
clawsweeper commentedon Apr 28, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve.
Summary
Keep open: current main has replaced the exact subagent
ready for user deliveryinstruction with review/verification wording, but the issue is still paired with open closing PR #78985 and current main still carries remaining finality wording in related status/docs/task surfaces.Reproducibility: yes. Source inspection on current main shows the exact old
ready for user deliveryphrase is fixed, but remaining finality wording is still reproducible incompleted successfullystatus/docs text andBackground task donetask terminal output.Next step
An open PR with closing syntax already targets this issue, so a new ClawSweeper repair job would duplicate active work.
Review details
Best possible solution:
Review and either land or supersede #78985 after reconciling it with #82724, keeping review-first wording where a parent review actually occurs and direct-safe wording elsewhere.
Do we have a high-confidence way to reproduce the issue?
Yes. Source inspection on current main shows the exact old
ready for user deliveryphrase is fixed, but remaining finality wording is still reproducible incompleted successfullystatus/docs text andBackground task donetask terminal output.Is this the best way to solve the issue?
Yes, a source-level wording fix is the right direction; editing compiled bundles would be temporary. The active fix path should be reviewed against current main so the final wording does not promise parent review on direct-delivery paths.
What I checked:
src/agents/subagent-announce.ts:91, ac99494e443d)completed successfully, and focused formatter tests still assert that status label. (src/agents/subagent-announce.ts:463, ac99494e443d)Background task done, with task-registry tests asserting that queued event text. (src/tasks/task-executor-policy.ts:42, ac99494e443d)Statusascompleted successfullywhile also documenting the newer review instruction. Public docs:docs/tools/subagents.md. (docs/tools/subagents.md:100, ac99494e443d)Closes this issue. (f4f828fadb08)src/agents/subagent-announce.ts:91, fff8e79afbb0)Likely related people:
src/agents/subagent-announce.ts,src/agents/subagent-announce.format.e2e.test.ts,docs/tools/subagents.md)Background task donesurface. (role: task delivery policy contributor; confidence: high; commits: 817ac551b655, a1b656705992; files:src/tasks/task-executor-policy.ts,src/tasks/task-registry.ts,src/agents/subagent-announce.ts)src/agents/subagent-announce.ts,docs/tools/subagents.md,src/tasks/task-executor-policy.ts)src/tasks/task-executor-policy.ts. (role: adjacent task status surface contributor; confidence: medium; commits: b6debb4382f3; files:src/tasks/task-executor-policy.ts)Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against ac99494e443d.
steipete commentedon May 16, 2026
Fixed on main by squash merge 21244d9 from PR #78985.
Proof:
pnpm docs:list | rg -i "subagents|tools/subagents|agents"pnpm exec oxfmt --check --threads=1 src/agents/subagent-announce.ts src/agents/subagent-announce.format.e2e.test.ts src/tasks/task-registry.ts src/tasks/task-registry.test.ts src/tasks/task-executor-policy.ts src/tasks/task-executor-policy.test.tsnode scripts/run-vitest.mjs src/tasks/task-executor-policy.test.ts src/tasks/task-registry.test.ts src/agents/pi-embedded-runner/context-engine-maintenance.test.tsnode scripts/run-vitest.mjs --config test/vitest/vitest.e2e.config.ts src/agents/subagent-announce.format.e2e.test.tsorigin/mainThe fix labels delegated ACP/subagent completion handoffs as ready for parent review and routes successful ACP child completions back through the requester session so the parent can verify before calling the original task done. Direct-origin handoffs stay pending for durable retry after restart; non-delegated ACP completions and context-engine maintenance keep ordinary done behavior.