Problem Since 2.42, agentChatThread lives in the workspace schema, but its owner is still userWorkspaceId , a UUID that points at core.userWorkspace . That cross-schema reference led to the per-workspace FKs on core tables that #26547 removed. Since then nothing enforces it.