diff --git a/src/auto-reply/reply/dispatch-from-config.ts b/src/auto-reply/reply/dispatch-from-config.ts index 1e90dd58887..2bdbeb2d9b9 100644 --- a/src/auto-reply/reply/dispatch-from-config.ts +++ b/src/auto-reply/reply/dispatch-from-config.ts @@ -387,6 +387,18 @@ export async function dispatchReplyFromConfig(params: { } } + if (!pluginOwnedBinding && hookRunner?.hasHooks("inbound_claim")) { + const inboundClaimResult = await hookRunner.runInboundClaim( + inboundClaimEvent, + inboundClaimContext, + ); + if (inboundClaimResult?.handled) { + markIdle("plugin_inbound_claim"); + recordProcessed("completed", { reason: "plugin-inbound-claimed" }); + return { queuedFinal: false, counts: dispatcher.getQueuedCounts() }; + } + } + // Trigger plugin hooks (fire-and-forget) if (hookRunner?.hasHooks("message_received")) { fireAndForgetHook(