fix: bypass no-reply for moderator bot handoff messages #7

Closed
zhi wants to merge 4 commits from fix/moderator-bypass into feat/turn-based-speaking
Collaborator

Problem

Moderator handoff messages are treated as regular messages without 🔚, triggering no-reply for all agents.

Solution

Add moderator bypass in before_model_resolve: if senderId equals moderatorUserId, skip no-reply evaluation.

Changes

  • Add moderator bypass check before evaluateDecision
  • Add debug log when bypass is triggered

Discussion with Orion

  • Identified root cause: moderator handoff messages lack 🔚 → triggers no-reply → chain of no-replies
  • Recommended solution: bypass no-reply for moderator bot messages
## Problem Moderator handoff messages are treated as regular messages without 🔚, triggering no-reply for all agents. ## Solution Add moderator bypass in `before_model_resolve`: if `senderId` equals `moderatorUserId`, skip no-reply evaluation. ## Changes - Add moderator bypass check before `evaluateDecision` - Add debug log when bypass is triggered ## Discussion with Orion - Identified root cause: moderator handoff messages lack 🔚 → triggers no-reply → chain of no-replies - Recommended solution: bypass no-reply for moderator bot messages
zhi added 2 commits 2026-02-28 19:37:24 +00:00
This reverts commit 6a81f75fd0, reversing
changes made to 86fdc63802.
- Add moderator bypass in before_model_resolve: if senderId equals moderatorUserId,
  skip no-reply evaluation to prevent moderator handoff messages from being treated
  as regular messages without 🔚
- Add debug log when bypass is triggered
zhi added 1 commit 2026-02-28 19:42:05 +00:00
- Add detailed debug log for turn check showing agentId, resolvedAccountId, ctxAccountId, turnOrderLen
- Add fallback: if resolveAccountId fails, use ctx.accountId directly
zhi added 1 commit 2026-02-28 19:49:16 +00:00
- Add channelIdFromCtx parameter to deriveDecisionInputFromPrompt
- Priority: ctx.channelId > conv.chat_id > conv.channel_id
- This fixes turn gate not working because channelId was empty/wrong
- Update all 3 call sites to pass ctx.channelId
hzhang closed this pull request 2026-02-28 20:15:05 +00:00

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nav/Dirigent#7