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

4 Commits

Author SHA1 Message Date
zhi
532d829ca5 fix: prioritize ctx.channelId over prompt for turn gate
- 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
2026-02-28 19:49:09 +00:00
zhi
db3df0688b fix: add turn check debug logs + fallback to ctx.accountId
- Add detailed debug log for turn check showing agentId, resolvedAccountId, ctxAccountId, turnOrderLen
- Add fallback: if resolveAccountId fails, use ctx.accountId directly
2026-02-28 19:41:59 +00:00
zhi
1246e476dc fix: bypass no-reply for moderator bot handoff messages
- 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
2026-02-28 19:37:11 +00:00
zhi
80439b0912 Revert "Merge pull request 'fix: use systemPrompt instead of prependContext for end marker instruction' (#5) from fix/moderator-and-system-prompt into feat/turn-based-speaking"
This reverts commit 6a81f75fd0, reversing
changes made to 86fdc63802.
2026-02-28 19:34:37 +00:00