Skip to content

fix(agents): route async media completions through wake media - #74402

Closed
steipete wants to merge 1 commit into
mainfrom
fix/async-media-completion-wake
Closed

steipete wants to merge 1 commit into
mainfrom
fix/async-media-completion-wake

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Summary

  • stop async media completion wakes from instructing the parent to call the message tool
  • rely on structured media carried by the wake, with MEDIA lines only as fallback
  • assert fallback instructions no longer mention message-tool delivery or NO_REPLY

Tests

  • pnpm vitest run src/agents/tools/music-generate-background.test.ts src/agents/tools/video-generate-background.test.ts
  • pnpm vitest run src/agents/pi-embedded-subscribe.subscribe-embedded-pi-session.subscribeembeddedpisession.test.ts -t "attaches media from internal completion events"

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS maintainer Maintainer-authored PR labels Apr 29, 2026
@greptile-apps

greptile-apps Bot commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR updates the async media completion wake instruction to stop directing the agent to call the message tool or emit NO_REPLY. The new instruction tells the agent to reply in its normal voice and rely on structured media already attached to the wake, with MEDIA: lines as a fallback. The test support helper is updated to assert the old patterns no longer appear in the replyInstruction.

Confidence Score: 5/5

Safe to merge — change is a targeted prompt-instruction fix with matching test coverage.

The diff is minimal (one string change in production code, one updated assertion block in test support), the unused import is cleaned up, and the new negative-assertion guards in the test helper confirm the old behaviour cannot regress.

No files require special attention.

Reviews (1): Last reviewed commit: "fix(agents): route async media completio..." | Re-trigger Greptile

@clawsweeper

clawsweeper Bot commented Apr 29, 2026 •

Copy link
Copy Markdown
Contributor

Thanks for the context here. I swept through the related work, and this is now duplicate or superseded.

Keep open for maintainer handling: the protected maintainer label blocks cleanup closure, and the branch is now both conflicted and superseded by the merged requester-agent generated-media completion path. The proposed prompt-only change is no longer a safe fix against current main because it forbids the message tool where current completion delivery explicitly requires message-tool evidence.

Root-cause cluster
Relationship: superseded
Canonical: #88141
Summary: The merged requester-agent generated-media completion PR covers the central useful direction for this prompt-only branch; broader duplicate and failure mechanisms are tracked in separate open issues.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Canonical path: Close this PR as superseded by #88141.

So I’m closing this here and keeping the remaining discussion on #88141.

Review details

Best possible solution:

Close this PR as superseded by #88141.

Do we have a high-confidence way to reproduce the issue?

Yes at source level: the PR diff forbids message-tool use, while current main requires message-tool evidence for some completion routes and fails the delivery when it is missing. I did not run a live media completion in this read-only review.

Is this the best way to solve the issue?

No. This prompt-only fix was plausible before the merged requester-agent handoff, but current main's visible-reply contract plus delivery evidence checks is the safer solution and this branch now conflicts with it.

Security review:

Security review cleared: The diff only changes agent prompt text and shared test assertions, with no dependency, workflow, secret, install, or package-publishing surface.

AGENTS.md: found and applied where relevant.

What I checked:

  • linked superseding PR: fix: route generated media completions through requester agent #88141 (fix: route generated media completions through requester agent) is merged at 2026-05-29T22:24:29Z.
  • cluster evidence: the durable review links that PR in the work cluster or recommended risk path.
  • no human follow-up: live comments and timeline hydrated by apply contain no non-automation activity after the ClawSweeper review.

Likely related people:

  • steipete: Peter Steinberger authored this PR, the merged requester-agent generated-media completion implementation, the typed media miss follow-up, and earlier async media wake hardening on the same files. (role: replacement implementation author and recent area contributor; confidence: high; commits: 3608f58058a9, 7f28c8bd07d3, beb42b12c989; files: src/agents/tools/media-generate-background-shared.ts, src/agents/tools/media-generate-background.test-support.ts, src/agents/subagent-announce-delivery.ts)
  • Vincent Koc: Recent history shows Vincent Koc refactored the shared media background lifecycle and test fixtures that this PR touches, and the latest release commit carries the current source snapshot. (role: shared media lifecycle contributor; confidence: medium; commits: 363c2bc17139, d96120ad7ba5, e085fa1a3ffd; files: src/agents/tools/media-generate-background-shared.ts, src/agents/tools/media-generate-background.test-support.ts, src/agents/subagent-announce-delivery.ts)
  • Josh Avant: Josh Avant authored the merged direct-message subagent completion fix on the same message-tool-only completion-delivery path. (role: adjacent delivery contract contributor; confidence: medium; commits: b3b962a05152; files: src/agents/subagent-announce-delivery.ts, src/agents/subagent-announce-delivery.test.ts)

Codex review notes: model internal, reasoning high; reviewed against 5361e5a0b455.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Jun 14, 2026
@clawsweeper clawsweeper Bot added the mantis: telegram-visible-proof Mantis should capture Telegram visible proof. label Jun 22, 2026
@clawsweeper clawsweeper Bot removed the mantis: telegram-visible-proof Mantis should capture Telegram visible proof. label Jul 3, 2026
@steipete

steipete commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Closing as superseded. #88141 merged the requester-agent generated-media completion path. This prompt-only branch would now conflict with the message-tool evidence required by current completion delivery.

@steipete steipete closed this Jul 5, 2026
@shakkernerd
shakkernerd deleted the fix/async-media-completion-wake branch October 19, 2026 23:19

This branch had an error being deployed

1 failed deployment
qa-live-shared — 3608f580 Deployed Jun 22, 2026 by clawsweeper[bot] via Run agentic native Telegram proof #216371
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling maintainer Maintainer-authored PR merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XS status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant