Repository navigation
Conversation
Greptile SummaryThis PR fixes a double-post bug for async media completions (e.g. music) by introducing Confidence Score: 5/5This PR is safe to merge — the fix is narrowly scoped, well-tested, and does not affect any code paths that aren't related to the deduplication logic. The change is small and targeted: one new exported function with a clear invariant, called at a single site in the agent-end flush. Both the new function and the lifecycle integration have dedicated unit tests covering all relevant branches (no-op early exits, partial discard, full discard + voice flag clear). No existing behaviour is altered outside the double-post scenario. No files require special attention. Reviews (1): Last reviewed commit: "fix(agents): dedupe async media completi..." | Re-trigger Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a35c3388be
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (state.pendingToolMediaUrls.length === 0) { | ||
| state.pendingToolAudioAsVoice = false; |
There was a problem hiding this comment.
Recompute voice flag after dropping already-sent media
After filtering pendingToolMediaUrls, the code only clears pendingToolAudioAsVoice when the list becomes empty. If pending media contains both audio and non-audio entries, and only the audio URL is removed as already sent, the remaining non-audio media is still emitted with audioAsVoice: true at agent end. This can mislabel the outbound payload and affect downstream channel delivery behavior for mixed-media turns where the messaging tool already delivered just the audio attachment.
Useful? React with 👍 / 👎.
|
Codex review: needs maintainer review before merge. What this changes: The PR adds an agent-end helper that removes pending generated media URLs already recorded as sent by a messaging tool, wires it before pending-media flush, and adds focused unit/lifecycle regressions. Maintainer follow-up before merge: This is an open maintainer-labeled implementation PR for a real, narrow bug, but the branch is dirty/unmergeable and should go through maintainer rebase/review instead of an automated replacement or cleanup close. Best possible solution: Rebase and adapt the PR onto current main so agent-end pending-media flushing subtracts URLs already delivered by successful messaging tools while preserving orphaned media delivery, no-block-callback retention, and trusted-media metadata semantics; then run the focused agent tests and the changed gate. Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against b7db63751b99. |
|
Closing this stale-branch symptom patch. Superseded by #74402, which fixes the shared async media wake instruction instead of lifecycle deduping. |
Summary
Test