Repository navigation
fix(discord-bridge): dm-fallback honors [no-send]/[REPLIED]/[deduped:] markers - #726
Merged
Merged
Conversation
…] markers The main reply path (line ~2660) skips Discord delivery when a result body starts with `[no-send]`, `[REPLIED]`, or `[deduped:`. The dm-fallback poll loop, which kicks in when voice-agent is offline / didn't pick up the result, was calling dm-result.py unconditionally — so results written specifically to suppress delivery (e.g., deduped phone-task follow-ups) got DM'd to the owner anyway. Repro from today: I wrote `[no-send]` markers on results/task-phone-1778876451343.txt and results/task-phone-1778876570451.txt to suppress duplicate DMs (voice agent already delivered the content live during the call). The bridge dm-fallback poll picked them up and DM'd the owner anyway: [dm-fallback] sent task-phone-1778876451343.txt via dm-result.py [dm-fallback] sent task-phone-1778876570451.txt via dm-result.py Fix: peek the result body at the top of the dm-fallback loop; on marker match, archive both result+task (parity with main path) and continue. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 tasks done
5 tasks
liususan091219
pushed a commit
to liususan091219/sutando-fork
that referenced
this pull request
May 28, 2026
…] markers (sonichi#726) The main reply path (line ~2660) skips Discord delivery when a result body starts with `[no-send]`, `[REPLIED]`, or `[deduped:`. The dm-fallback poll loop, which kicks in when voice-agent is offline / didn't pick up the result, was calling dm-result.py unconditionally — so results written specifically to suppress delivery (e.g., deduped phone-task follow-ups) got DM'd to the owner anyway. Repro from today: I wrote `[no-send]` markers on results/task-phone-1778876451343.txt and results/task-phone-1778876570451.txt to suppress duplicate DMs (voice agent already delivered the content live during the call). The bridge dm-fallback poll picked them up and DM'd the owner anyway: [dm-fallback] sent task-phone-1778876451343.txt via dm-result.py [dm-fallback] sent task-phone-1778876570451.txt via dm-result.py Fix: peek the result body at the top of the dm-fallback loop; on marker match, archive both result+task (parity with main path) and continue. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
john-the-dev
added a commit
that referenced
this pull request
Aug 20, 2026
…not a conflict Self-review with the lesson from the #726 finding: `except OSError` on the stale-clear covered two cases whose correct responses are opposite. If an executor consumes the stale intent between our peek and our unlink, the path is now FREE and we should claim it — but the bare OSError catch reported IntentPending, telling the owner a request is pending that nobody made. FileNotFoundError now falls through to the retry; a genuine unlink failure (permissions, read-only) still refuses. Control: with the FileNotFoundError branch removed the new test errors; with it, 27/27 pass. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
discord-bridge.py:2660skips Discord delivery when a result body starts with[no-send],[REPLIED], or[deduped:. Thepoll_dm_fallbackloop did not have the same check — so results written specifically to suppress delivery still got DM'd to the owner when voice-agent was offline.Repro
Today: I wrote
[no-send]markers onresults/task-phone-1778876451343.txtandresults/task-phone-1778876570451.txt(voice agent had already delivered the inbox-query answer live during the call — re-DM would be duplicate). Bridge log:Both got DM'd to Chi despite the marker.
Test plan
[no-send]while voice-agent is offline; verify[dm-fallback] skipped (suppression marker)log line + no DM[REPLIED]and[deduped: task-XYZ]🤖 Generated with Claude Code