Cardinal Manning has many writings, The Internal Mission of the Holy Ghost. Very good. Explains even there how the Holy Ghost works or does not work with the 7 gifts. This goes for anyone who has had Confirmation. So, in clarifying the definitions of Papal Infallibility, it reads that "might" the pope ask the Holy Ghost for His gifts, IF. This goes for the magisterium as well.
Things can go wrong and do. Another good reading, The Present Crisis in the Holy See. The True Story of the Council. Eye openers for those who have not read these and Vatican I.