The seller (and if the agent knows) should disclose a death on the property if it happened in the last three years. The transfer disclosure statement has a question about it, the sellers questionnaire has a questions about it and the supplemental statutory disclosure asks the question.
You state you are " going into contract" which I take to mean you have written an offer and believe it will, or has been accepted. If so, they have X number of days to disclose material facts about the property. Unless you asked the question specifically, they would have no cause to offer up that information until disclosures were issued.
When an agent is holding an open house, it is not something they would greet the potential buyer with at the door. (Like any other issue with the home; termites, foundation issues, etc.) If the potential buyer asked, and the agent knew, then they are obligated to tell you.