Files
Dirigent/plugin/hooks/agent-end.ts
hzhang 74e6d61d4d fix: correct channelId extraction and dormant check in hooks
message-received.ts:
- message_received ctx has channelId/accountId/conversationId (not
  sessionKey). Add extraction from ctx.channelId and metadata.to
  ("channel:ID" format) before the conversation_info fallback.

agent-end.ts:
- When tail-match is interrupted, only call wakeFromDormant() if the
  channel is actually dormant. For non-dormant interrupts (e.g. the
  moderator bot's own trigger messages firing message_received on
  other agents), fall through to normal advanceSpeaker() so the turn
  cycle continues correctly instead of re-triggering the same speaker.
- Import isDormant from turn-manager.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 06:24:05 +01:00

9.0 KiB