LM Agents May Fail to Act on Their Own Risk Knowledge