diff --git a/src/router/index.ts b/src/router/index.ts index 1970af6a..61e9a1b0 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -4,6 +4,7 @@ import { captureException, flush, setTag } from '../sentry.js'; // Bootstrap PM integrations before any adapters are loaded import '../pm/bootstrap.js'; import { initPrompts } from '../agents/prompts/index.js'; +import { registerBuiltInEngines } from '../backends/bootstrap.js'; import { initAgentMessages } from '../config/agentMessages.js'; import { seedAgentDefinitions } from '../db/seeds/seedAgentDefinitions.js'; import { registerBuiltInTriggers } from '../triggers/builtins.js'; @@ -34,6 +35,12 @@ import { setTag('role', 'router'); +// Register engine settings schemas before any loadConfig() call. +// EngineSettingsSchema uses a dynamic registry; without this, any project +// with claude-code/codex/opencode engineSettings causes a ZodError that +// silently drops all webhooks (same fix as dashboard.ts in #896). +registerBuiltInEngines(); + // Create trigger registry once at router startup for dispatch() calls const triggerRegistry = createTriggerRegistry(); registerBuiltInTriggers(triggerRegistry);