Sefer Sar Torah relates the following story:
The Shach once came to the city of Kalish, where he delivered a drasha in the bais medrash. The Magen Avrohom zy’a was in attendance and had a question on the Shach’s words. When the Shach returned to his lodgings, the Magen Avrohom sent his student to ask his question. He told the student, ‘I assume that when you ask this question, he will offer such-and-such answer. If he says this, ask him such-and-such question…’
When the student met the Shach, he spoke with clarity and wisdom, as he had been instructed. After they finished discussing the drasha, the Shach began speaking to him about other Torah topics. He saw that the student was not as fluent in them as he seemed to be on the topic of the drasha and realized that he must have been sent by someone else. He demanded that the student tell him who sent him and, with no other choice, the student revealed that it was the Magen Avrohom.
The Shach told him to return to his teacher and to tell him that he wished to speak to him in person. When the Magen Avrohom arrived, he began speaking in learning with the Shach and their discussion became very heated, developing into a full-blown debate.
In the midst of the learned debate, there was a man in the house who he had come for a din Torah and had fallen ill. The other people in the house saw that the man was near death and told the Shach that he must hurry and leave the house because he was a kohen.
The Shach banged on the table with his cane and said, ‘I command him to wait.’
He added, ‘As long as we are here, he will not die. So I am permitted to stay here.’
And so it was. As long as the Shach was arguing in learning with the Magen Avrohom, the man remained alive. But as soon as he walked out the door of the house, the man died.