The Supreme Court has agreed to hear a petition seeking a probe by a sitting or a retired judge into the Pegasus spyware controversy.